Contrast enhancement using histogram equalization