Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

you code works fine, if you comment the

cv::extractChannel(lab_image, lab_planes, 0);

line.

(you don't even need it, and the result of extractChannel should be a single channel Mat, not a vector<Mat>)

also, you can apply clahe "in-place", and save a copy:

clahe->apply(lab_planes[0], lab_planes[0]);