LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error using GetPixelValue Vi

Hi everybody:

 

Im desingning a progam using Vision which using  an IMAQ Detect Circles i get a X,Y coordenate, my issue begins when i use GetColorPixelValue VI, the PixelValue(U64) output is always 0 for all planes using X.Y coordenates as constant but if i use the circle position, it appears an error invalid type image.

I already created an image using image type as RGB(U32) and loading.

 

i`ll attach the program and images.

 

Thanks

Download All
0 Kudos
Message 1 of 3
(2,722 Views)

IMAQ image reference - is really reference, so it is changed by-reference, not by-value; so IMAQ Set Calibration Info VI rewrites that opened, original image (b/c you wire it as Destination Image). This is my suspicious, but if you'll take for that IMAQ Set Calibration Info vi not already opened original reference, but create new one (additional), then there is no that error, what you've mentioned in the thread...

I would recommend to dig more into examples, and functions description...

 

logos_middle.jpg

0 Kudos
Message 2 of 3
(2,686 Views)

-Your image type is U32 then why are you trying to get U64 value?

-Get Pixel Value U32 and if you require each plane values use Color to RGB.vi

-IMAQ Extract Single Color Plane extracts the plane you requested and converts Color(RGB U32) to Gratscale Image(U8).

-When you try to GetColorPixelValue on Grayscale image it throws error becasue it is not a valid color image.

-So add extra IMAQ Create to create additional buffer at IMAQ Extract Single Color Plane and connect to Img dst to avoid overwriting the Source Image.

-Try Block Diagram Cleanup tool to clean the diagram(Ctrl+U)

Thanks
uday
0 Kudos
Message 3 of 3
(2,670 Views)