views:

285

answers:

1

I have a jpeg. Its color profile is sRGB, of course. I load it into "image" and call

cvCvtColor(image, gray, CV_BGR2GRAY); 

to convert it to grayscale. When I step into that routine in the debugger, I find it multiplying pixels by these values:

#define cscGr_32f  0.299f
#define cscGg_32f  0.587f
#define cscGb_32f  0.114f

Waaaait a minute. Those are the luminance values for NTSC RGB, not sRGB. Furthermore, I cannot see that it's doing anything about gamma correction. I am confused. When OpenCV decodes the image, does it remove gamma correction and convert to NTSC RGB?

Bonus question: Is there an OpenCV forum where the gurus hang? I've googled in vain.