Assignment 2
Assignment 2
CODE:
OUTPUT:
**************************************
Task 2: Take a grayscale image that has an 8-bit pixel depth. Plot the 8-bit planes 0-7 as separate
images.
CODE:
OUTPUT:
**************************************
Task 3: Plot a histogram of pixel intensities of a grayscale image.
CODE:
OUTPUT:
**************************************
Task 4: Perform histogram sliding on a grayscale image. Do two types of sliding, add and subtract.
CODE:
OUTPUT:
**************************************
Task 5: Histogram stretching, implement the code in the slides regarding histogram stretching.
CODE:
OUTPUT:
**************************************
Task 6: Linear contrast stretching (Normalization) of the grayscale image where min is 0 and is max
grayscale value.
CODE:
OUTPUT:
**************************************
Task 7: Perform Binary Contrast Enhancement on an appropriate grayscale image (water damaged and
so forth), finding the proper threshold will take some testing.
CODE:
OUTPUT:
**************************************
Task 8: Perform Brightness Slicing on an appropriate image, multiply the selected pixel range by 1
instead of setting them at max, and set the rest to 0.
CODE:
OUTPUT:
**************************************