BalaShiyamala / opencvdotnet

Automatically exported from code.google.com/p/opencvdotnet
0 stars 0 forks source link

CVRgbPixel wrong is CvImage is loaded from a filename with isColor = false #8

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. CvImage img = new CvImage("file.bmp", false);

What is the expected output? What do you see instead?
the output of img[0,0].R , img[0,0].B , img[0,0].G , img[0,0].BwValue and 
img[0,0].Greylevel should be the same. Instead I noticed that if isColor 
is set to false, the correct pixel intensity value is stored ONLY in the R 
property. So if I use GreyLevel, or BwValue the result is not correct.
You must store the same value in R,B and G fields, otherwise nothing will 
work!

What version of the product are you using? On what operating system?
0.7

Original issue reported on code.google.com by 84ye...@gmail.com on 12 Feb 2008 at 11:11

GoogleCodeExporter commented 8 years ago
I'm sorry, I made a mistake. the pixel value is stored in the B property (which 
might
remember "Black")

Original comment by 84ye...@gmail.com on 13 Feb 2008 at 5:41