06-15-2006 05:18 PM
06-19-2006 05:56 PM
06-20-2006 07:25 AM
I am testing a camera that has a filter that switches the camera from Color to B+W. I have a calibrated image that has various color images that I am using for various tests/measurements. When the camera filter is turned on, the image appears B+W but it is saved as an RGB Image. I am trying to detect if the filter actaully turned on. I have a specific color patterned rectangle in my test image. I am trying to pattern match by color only but can not get the image to learn. Any Suggestions?
06-21-2006 07:24 AM
I tried using the imaqGetPixel function. The function returns a 1 (success) but the pixval is NULL. I set pixval to NULL because I get an initialization error. Any suggestions? Here is my code:
int r,g,b;
PixelValue *pixval=NULL;
Point rgbpt;
rgbpt.x=centerx;
rgbpt.y=centery;
stat = imaqGetPixel (tempImage, rgbpt, pixval);
r= pixval->rgb.R;
b= pixval->rgb.B;
g= pixval->rgb.G;
06-21-2006 08:40 AM
Whoops! I found the problem. I refrenced everything wrong!! It works fine now, Thank You!!
PixelValue pixval;
stat = imaqGetPixel (tempImage, rgbpt, &pixval); r=pixval.rgb.R;
b= pixval.rgb.B;
g= pixval.rgb.G;