Machine Learning, Histogram Equalization.
np.ma.masked_equal(cdf_r,0) cdf_m_r = (cdf_m_r - cdf_m_r.min())*255/(cdf_m_r.max()-cdf_m_r.min()) cdf_final_r = np.ma.filled(cdf_m_r,0).astype('uint8') # merge the images in the three channels img_b = cdf_final_b[b] img_g = cdf_final_g[g] img_r = cdf_final_r[r] img_out = cv2.merge((img_b, img_g,