[Attachment(s) from Mathieu Dubois included below]
I wanted to check some code that I wrote for Lab conversion by
comparing the output to OpenCV but I'm facing some problems.
In order to check that, I wrote the attached program and tested it
with attached image (use ./convert_lab test2.ppm).
The image is 1x4 matrix and consists in a white pixel, a red pixel,
a green pixel, a blue pixel and soft green pixel.
The program loads an image, and convert it to Lab. Here are the
values disaplyed by OpenCV:
Clearly the value of the (0,2) pixel (the green one) and the (0,4)
pixel (which is also green) are strange (especially the one in
In order to test I first converted the image to XYZ with OpenCV and
then computed Lab with my own code (using the formulas found on
OpenCV help). Here are the values:
While I won't claim that my code is correct the values make more
sense. Note that they are very close to those computed by OpenCV
except for the green pixels.
My question is then: is there something wrong in the way I convert
to Lab with OpenCV? if no, why I don't get the same results than in
Thanks in advance,
Attachment(s) from Mathieu Dubois
1 of 1 File(s)
Change settings: http://www.yahoogroups.com/mygroups,
Get Emails (get all posts)
Daily Digest (one summary email per day)
Read on the web (read posts on the web only)Or Unsubscribe by mailing OpenCV-unsubscribe <at> yahoogroups.com