LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I convert IMAQ image to array?

I have just hooked up an XStream camera, that outputs (greyscale) IMAQ images in LabVIEW using a vendor-supplied VI. They also supply a VI to convert the image to a picture for easy display. Now I need to do more than look at it, I need to do some analytical math on a pixel-by-pixel basis ... so what I really want is a 2-d array of doubles holding the pixel values.

Is there an easy way to do this conversion?

Previously we were skunk-working this with a little Logitech webcam, and it output a very friendly byte array rather than an "Image" or a "picture" (not even really sure what those things are, but they're not easy to work with).

Thanks
Eric Coppock
Ball Aerospace
0 Kudos
Message 1 of 5
(3,966 Views)
Seems to me that, with LabVIEW 7.1, picture functions exist to handle this. At worst, save it as a file and open it with picture functions?
0 Kudos
Message 2 of 5
(3,953 Views)
Use the IMAQImageToArray function. The VI in the following link may be of help.

http://digital.ni.com/public.nsf/websearch/BC566B893D963B8C86256C87005EB923?OpenDocument

Prakash K
0 Kudos
Message 3 of 5
(3,945 Views)
OK, making some progress. I have the IMAQImageToArray function in my VI, but...

I've wired a valid IMAQ image into this function, but I'm getting a zero-element array out the other side. I know the image is OK because if I separately wire it to an ImageToPict function and then display the picture, it comes up just fine. I'm just not getting anything out of the ImageToArray function.

Also, there's no help available for ImageToArray (grayed out). Any suggestions?

Thanks,
Eric C
0 Kudos
Message 4 of 5
(3,920 Views)
Never mind, I just located the other output (which has the data in it).

EC
0 Kudos
Message 5 of 5
(3,918 Views)