Artificial Intelligence, Computer Vision, Digital Image Processing, Histogram Equalization, Python.
save_filename = 'output_image.jpg' #load file as pillow Image img = Image.open(img_filename) # convert to grayscale imgray = img.convert(mode='L') #convert to NumPy array img_array = np.asarray(imgray) #PERFORM HISTOGRAM EQUALIZATION AND ASSIGN OUTPUT TO eq_img_array #convert NumPy array to pillow