![]() Merge the the color planes back into an Lab imageĬv::cvtColor(lab_image, image_clahe, CV_Lab2BGR) apply the CLAHE algorithm to the L channel ![]() READ RGB color image and convert it to LabĬv::Mat bgr_image = cv::imread("image.png") Ĭv::cvtColor(bgr_image, lab_image, CV_BGR2Lab) Ĭv::split(lab_image, lab_planes) // now we have the L image in lab_planes You can read about CLAHE in Graphics Gems IV, pp474-485Īnd here is the C++ that produced the above image, based on, but extended for color. However, as far as I know it is not documented. What you want is OpenCV's CLAHE (Contrast Limited Adaptive Histogram Equalization) algorithm. Finally convert the resulting Lab back to RGB. Convert the RGB image to Lab color-space (e.g., any color-space with a luminance channel will work fine), then apply adaptive histogram equalization to the L channel.
0 Comments
Leave a Reply. |