Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Convert PixeLink image array to IMAQ image

I have a PixeLink PL-A782 FireWire camera. PixeLink has provided wrappers for their camera control software. They have a call to a DLL that will capture an image as a 1-D array of U8. I need to convert this an IMAQ image.

I've already tried the Map Pixel Pointer route, but my color image shows up as B&W with some odd artifacts. Help!
0 Kudos
Message 1 of 6
(5,809 Views)
If you have a color image represented by a 1-D array of U8, it may be a JPEG format. I am attaching a VI that will decode a byte stream into an IMAQ image. You will just need to insert a "Byte Array to String" function before this to convert your U8 array.
0 Kudos
Message 2 of 6
(5,804 Views)
I have tried the JPEG Decode with a different application. I found that JPEG Decode has a memory leak and crashed my program. Since I have an edge profile application, I need to use TIFF, not JPEG.

PixeLink provides a VI which converts the data stream into either BMP, TIFF, JPEG, or PSD format, all represent as 1-D array of U8.

After speaking with an applications engineer this morning, he suggest using Write Custom Data.vi. It is a newly available function in NI Vision 7.1 which will take an array of u8 and convert it to an IMAQ image indicator. It apparently works with any image format.
0 Kudos
Message 3 of 6
(5,804 Views)
Have you resolved your problem?

I have same problem. My camera is Pixelink PL-A654 and need to convert data returned by wrapper to NI Image type.
Some help will be appreciated.
0 Kudos
Message 4 of 6
(5,765 Views)
I have resolved this problem using the returned data from PimMegaReturnVideoData function of the wrapper.

1.- Create an labview image (IMAQ Create) Grayscale(U8)
2.- Set size to your image size (IMAQ SetImageSize)
3.- Reshape data returned by PimMegaReturnVideoData to an array with two dimensions with size like your image
4.- Copy array to image (IMAQ array to image) with the image created and data reshaped
5.- Create the final imaq image to store the converted image as (RGB32)
6.- Use Imaq Create Bayer Lut
7.- IMAQ bayer color decode the image and store in RGB32 created image

If you need more info dont hesitate to ask
0 Kudos
Message 5 of 6
(5,759 Views)
PixeLINK has recently posted updated wrappers for their SDK Version 4 functions that will allow direct grabs (GetNextFrame in the PixeLINK SDK) of image data to IMAQ image structures. In the downloadable LabVIEW files are demonstrations showing how to grab images to the IMAQ format. These functions will convert the RGB24 from PixeLINK color cameras to the RGB32 format required by IMAQ. The new wrappers apply to cameras using software version 4.
0 Kudos
Message 6 of 6
(5,642 Views)