LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I save 16bit grayscale pictures in Labview without IMAQ

Solved!
Go to solution

Hi, I am trying to save the 512x512 16bits grayscale pictures from the camera for every certain amount of time ( eg. every 5 sec), and also have them displayed in the control panel in turns.

 

However, I can only get a bunch of blueish and greenish pictures instead of grayscale ones. Please give me some hints. I truly appreciate it.

 

Please see the VI attached. Thanks.

0 Kudos
Message 1 of 3
(2,982 Views)
Solution
Accepted by topic author heronbank

I would simplify the greyscale color table code:

 

GreyscaleColorTable.png

 

Next, you need to map the 16-bit values to 8-bit values for display.  Right now you are simply coercing the U16 array to U8 which is likely to wash out the highlights.  Instead you should find the Array max and min and scale the input so max->min scales to 0 -> 255. 

 

(x-min)/(max-min)*255

 

Fancier programs do not use a linear mapping, but it is a good start.

0 Kudos
Message 2 of 3
(2,973 Views)

Thanks Darin, I modified my vi a bit according to your instruction. Everything is good. The vi is attached.

 

For the others who may need this, I am using HAMAMATSU 16bit grayscale camera (driver is required) and Zeiss Z1 microscope to take the live images. This vi will help to save the images in grayscales to a folder with a given saving rate.

0 Kudos
Message 3 of 3
(2,970 Views)