LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

using pixelink software development kit with labview

Hello, thank you for this VI. The issue is that I have a RGB color. Let me show you the result I have with the software fournished with the camera (attached file n°1) and the raw of data I have in th VI of the SDK (attachment n°2). Unfortunately the VI you send to me concerned B&W image. Is it possible to convert the raw in RGB raw or something like that ?

Regards

Download All
0 Kudos
Message 11 of 12
(832 Views)
Hi Nicobono,

What is the length of your U8 image array?  If it is 5,242,880 elements long (1280*1024*4), then you do have an RGB32 image (or 3,932,160 for RGB24).  But because the array is U8, I suspect that the image is already converted to U8 greyscale when it comes out of the loop, and will be 1,310,720 elements long (1280*1024).  If the image is greyscale, then the VI I posted will work.  If the image is RGB, then you will have to transform the image into RGB32, and use the IMAQ ArrayToColorImage.vi to convert to an image. 

One simple way to convert from a U8 array to a U32 array of two dimensions is to use nested while loops, and the RGB to color VI for three consecutive elements for each pixel. That method iterates through the entire pixel array however, which is quite slow.  A more succinct method is to use array manipulation.  I have attached a VI that performs both methods, assuming an RGB24 image in a U8 array form.

Hope this helps!

Maclean G.
Applications Engineering
National Instruments
0 Kudos
Message 12 of 12
(810 Views)