I am trying to convert the Lab values to its corresponding RGB values.I don’t want to convert Lab image to RGB image but some values of L a and b.The function cvCvtColor only works for images.Can anybody tell me how to do this.
Thanks;
Code :
CvMat* rgb = cvCreateMat(centres->rows,centres->cols,centres->type);
cvCvtColor(centres,rgb,CV_Lab2BGR);
I don’t know how to do it in OpenCV, but if something else is alright I’ve implemented it in C. See function
color_Lab_to_LinearRGBandcolor_LinearRGB_to_RGB.Here’s the code: