measure the CieLab color of a square
Hi, For compute the CieLab color of a square of an image do we have to compute the mean of each RVB channels then to convert this mean color to CieLab or a nother method ? Thank you ! Bye !
What did you try? There is a function for everything you need in OpenCV! You can get the desired ROI, compute the
mean
and convert the result usingcvtColor
but I want the true CieLab, the with the primary RGB and white coordinates calculus
What is the true CieLab for you? (and which is the false one?) There's only one CieLab standard as far as I know...
I am trying to find the true colors of the ROI so the RGB is not the true colors but depends of the material. In fact to convert properly the RGB of the image (depending of the hardware) to the CieLab we need the white and primary coordinates of the material to convert properly. The default OpenCV conversion use default coordinates which not suit to me. I hope you understand. Best regards
I don't really understand what you want. The RGB image you have is just a numerical representation of the scene. The CieLab also. The interest of CieLab is that the euclidean difference between 2 colors is the same as the perceptual difference. Not that it's a real representation of the material color. Just think of the white highlights on the surface of an object - it doesn't depend on the real color.
As the camera adjusts automatically the white balance of the image, you can take the D65 white point reference.
If you can access the RAW RGB values and you need to process the image using a known white point (color temperature), you can get from wikipedia the standard illuminant
x
andy
values and every formula needed to do the conversion yourself.