02-05-2009 06:48 PM
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! |
02-05-2009 09:53 PM
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
02-06-2009 04:47 PM
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.
02-09-2009 05:19 PM - edited 02-09-2009 05:19 PM
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:
Let me know if you need more help with this.