Used some of the python libraries to convert an image into a high contrast image.
- Matplotlib,
- IPython.display
- NumPy
- CV2
- Imported the required libraries ( Numpy, Matplotlib, PIL, IPython.display)
- Read the input image using Image using cv2 library
- Converted the image into an array and then flatten it making it a 1d array
- Count the number of occurance of each pixel in the image and hence getting an array of frequency count of each pixels
- Then making cdf from the frequency count list
- Normalizing the cdf
- Converting the cdf shape into the shape of given image
- Finally converted the image into contrast adjusted image