Machine Learning, Histogram Equalization.
cdf_m_b = (cdf_m_b - cdf_m_b.min())*255/(cdf_m_b.max()-cdf_m_b.min()) cdf_final_b = np.ma.filled(cdf_m_b,0).astype('uint8') cdf_m_g = np.ma.masked_equal(cdf_g,0) cdf_m_g = (cdf_m_g - cdf_m_g.min())*255/(cdf_m_g.max()-cdf_m_g.min()) cdf_final_g = np.ma.filled(cdf_m_g,0).astype('uint8') cdf_m_r =