LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

save 16 bit array as image

Hello,

I am a new labview user. I am trying to save an image which is being correctly displayed on the front panel of my program as an intensity graph. I  am able to get a 2D array of the pixel values (using the variant to data function, the camera I use has an Active X interface with labview). The camera allows 16 bit or 12 bit digitization options. I would like to save the image pizel values as a 16 bit BMP or TIFF file. However, from what I understand, the flatten pixmap option in labview does not support 16 bit images. How do I go about saving my images? Any feedback would be extremely useful.

Thanks,
Sanhita
0 Kudos
Message 1 of 7
(7,000 Views)
Hello,

have a look at this example and tell me if it works as you expect Smiley Wink

hope this helps

Message Edité par TiTou le 07-07-2006 12:33 PM


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 2 of 7
(6,977 Views)

hi there

as far as i know a BMP only supports 1, 4, 8 and 24 Bits, so if you don't want to loose some data you have to convert the U16 to U32. see attachment (maybe you have to fondle a little with the color map)

 

Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
Message 3 of 7
(6,973 Views)
I guess your web camera return a 16 bit gray scale image.  Which is equivlent to 48 bit RGB image.  You can use IMAQ to save it to an TIFF file.  IMAQ is an addon to LabVIEW.
If you don't have IMAQ, you can try Image Toolbox at:
 
George Zou
0 Kudos
Message 4 of 7
(6,962 Views)
Thank you all for your replies. Unfortunately, I do not have some of the subvi's needed for your routines, i.e. IMAQ vision vi's. Hence I am pretty much stuck. I am currently toying with the idea of using the U16 to U32 conversion and playing with the color table if it works as suggested by one of you. 

I am also wondering if I should down convert to 8 bit. I will lose resolution. The only other option is to buy IMAQ Vision (I have IMAQ Vision utilities for LV 6.1 but there is no option to convert Array to Image, I suspect it is part of newer IMAQ vision versions). If I can convert an array to image then I can convert the image to TIFF.



Regards,
Sanhita
0 Kudos
Message 5 of 7
(6,945 Views)

hi there

i'm not sure that you really need the whole IMAQ Vision package. a subset of IMAQ is part of the LV - driver CDs (maybe they won't be installed by default). please check your CDs first.

Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
0 Kudos
Message 6 of 7
(6,925 Views)
If that doesn't work, and you can't afford IMAQ, you can try out ImageMagick.  It probably has something you can use.
0 Kudos
Message 7 of 7
(6,913 Views)