HI,
I am trying to lighten an image by converting to HLS and then adjusting the lightness channel
cv::Mat hls;
cv::Mat planes[3];
cv::cvtColor(frame, hls, cv::ColorConversionCodes::COLOR_BGR2HLS);
cv::split(hls, planes);
planes[1] += 50;
cv::merge(planes, 3, hls);
// make BGR image to display
cv::cvtColor(hls, frame, cv::ColorConversionCodes::COLOR_HLS2BGR);
The problem is though that, after it has been lightened by the planes[1] += 50; call, the image has had it's colours changed and the darker pixels in the image now appear green, the other pixels do seem to be lightened though (the original image was a dark monotone image).
Any idea why this is happening and how I can get round this problem, I think it must be something to do with the Chroma component of the HLS-RGB conversion scheme?
Cheers
Dave