Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

IMAQ image to array vi not working with images extracted from avi file

Hi,
  I downloaded some avi's and uncompressed them so that I can analyze them within labview. I am trying to convert images I am reading from the avi file to an array. When I use "IMAQ image to array" I get the following error " IMAQ Image To Array  Invalid image type" -1074396080.
 
   I am able to display each read image and save them to the hard drive, but I am unable to convert the vision image to array. I verified that the image extracted from avi is the same as the image type I created in memory to hold the image.
 
  Please see the attached vi I created.
 
thank you
Ruz
0 Kudos
Message 1 of 6
(6,722 Views)

I am guessing the images in the AVI file are color, and you are trying to extract a grayscale array.  Use the "IMAQ Color Image to Array" instead.

Also, when you convert grayscale images to arrays, make sure you pick the correct output.  Very few images are represented using Floating point - most are U8 or I16.

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 2 of 6
(6,717 Views)

Hi Bruce,

Yes, that is exactly what it was. I wasn't aware the color image to array vi existed. I somehow assumed the double output contained the U32 data b/c the U32 output was not present.

Makes sense now.

Thanks

0 Kudos
Message 3 of 6
(6,706 Views)
May you supply an image of your example2.vi. I have an earlier version of LabView and cannot open your example2.vi. Thanks, Tom
Tom Lohre artist/scientist
Has a operating painting robot using RoboLab/RCX
Developing a LabView/ NXT robot that analyzes an image for aesthetic quality.
0 Kudos
Message 4 of 6
(6,453 Views)

Hi all, this thread was useful for me...but i have another doubt... when I try to extract a single plane (Luminance, Saturation, R,G,B...anyone) and try to save it in jpg as gray image, it saves an image with blue tones. I have examinated it using Matlab and checked that Red plane has low values (but not zero), the same for G plane and high values for B plane. An image of the VI is attached.

 

Thanks in advance

0 Kudos
Message 5 of 6
(5,511 Views)

Hi javijavi70,

 

What is your end goal for this application? If you are just trying to save an image in U8 grayscale you can cast your image to that type with the IMAQ Cast Image.

 

IMAQ Cast Image VI
http://zone.ni.com/reference/en-XX/help/370281P-01/imaqvision/imaq_cast_image/

 

Tim O

Applications Engineer
National Instruments
0 Kudos
Message 6 of 6
(5,498 Views)