LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

image to array

Hello,

 

I am acquiring images from a Lumenera USB 2.0 camera - 1392X1040 8-bit image. I need to convert it to an array with the 1392X1040 elements. Using the imagetoarray vi built in to LV Vision gives an output of 0X0. I am using a greyscale image. When I do this with a FireWire camera with 16-bit image I do not get any problems. Any idea what I am doing wrong?

 

Thanks!

0 Kudos
Message 1 of 4
(2,845 Views)

Hi Femtovahan,

 

Do you wire an output from Image Pixels (U8) of Image To Array function?

If you wire an output from a wrong terminal, this VI will not give any value.

If you already try it, and doesn't work, please send me your U8 picture so that I can give it a shot.

Note: I use LV 8.6 + VDM 8.6.4 + VACQ 8.6.

 

Regards, Kate

0 Kudos
Message 2 of 4
(2,831 Views)

Thanks, Kate. I actually figured what the problem was. I was trying to acquire in 16-bit and the camera's default is 8-bit, so I had to change the pixel format first. Sorry for the confusion.

 

What I need to do now is to swap the color format (byte order) btw big and small endian, however it seems that the camera does not have that property available, or I am doing something wrong.

0 Kudos
Message 3 of 4
(2,803 Views)

Hi femtovahan,

 

That functionality isn't available from the vision USB drivers. However, you can reverse byte order in your LabVIEW code by using theSwap Byte function. You will more than likely have to index your image and iterate through each bit that needs to be swapped. Here is another forum that outlines how you can do this:

 

Endian Forum

 

Let me know if you need more help with this.

Message Edited by Sappster on 02-09-2009 05:19 PM
Sappster
0 Kudos
Message 4 of 4
(2,753 Views)