LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

16-bit greyscale colormap

Is there an easy way to create a 16-bit greyscale colormap?
I can do it for an 8-bit using the RGB to color.vi, but I'm not sure how to do it for 16-bit.
0 Kudos
Message 1 of 9
(6,308 Views)
rohrdt,
 
There are ways to display up to 24 bit images (PNG and BMP files) using the open file and Draw Flattened Pixmap.vi.  However, the LabVIEW Development Suites do not have the functionality similar to the RGB to Color.vi for 16-bit.  This functionality is included in the NI-VISION package though. 

Hope this helps!
Andy F.
-----------------------------------------------------------------
National Instruments
Message 2 of 9
(6,286 Views)
Andy F.
Thank you very much for your reply,
Right now I am evaluating the NI VISION toolkit.
What vi would I use in the toolkit?
Basically all I want to do is create a 16-bit test image in greyscale (covering all values 0-65535 or -32767 through 32768).
That way I can verify the histogram and other processing tools in the toolkit.
0 Kudos
Message 3 of 9
(6,281 Views)
Microsoft Windows only support 8 bit gray scale.
 
George Zou
George Zou
0 Kudos
Message 4 of 9
(6,274 Views)
Actually George, the display of images is limited to 8-bit grayscale and 32-bit RGBA.  (This is currently a standard because most architectures are based on 32-bit word data.) However, an image can contain any arbitrary bit depth, and industrial cameras customarily acquire 10-, 12-, 14- and 16-bit grayscale images, as well as 40- and 48-bit color images. The NI-Vision toolkit is equipped to handle and manipulate such image data as easily as 8-bit ones. 

When displaying an image with a bitdepth greater than 8, the image data is scaled down to 8-bits so Windows can handle it.  The original image isn't altered when doing this though, so you dont actually lose any resolution in your data.
David Staab, CLA
Staff Systems Engineer
National Instruments
0 Kudos
Message 5 of 9
(6,261 Views)
I know all that.  The bottom line is: LabVIEW can't display 16 bit gray scale, which is required in the original post.
 
George Zou
 
 
David S.  wrote:
Actually George, the display of images is limited to 8-bit grayscale and 32-bit RGBA.  (This is currently a standard because most architectures are based on 32-bit word data.) However, an image can contain any arbitrary bit depth, and industrial cameras customarily acquire 10-, 12-, 14- and 16-bit grayscale images, as well as 40- and 48-bit color images. The NI-Vision toolkit is equipped to handle and manipulate such image data as easily as 8-bit ones. 

When displaying an image with a bitdepth greater than 8, the image data is scaled down to 8-bits so Windows can handle it.  The original image isn't altered when doing this though, so you dont actually lose any resolution in your data.
George Zou
0 Kudos
Message 6 of 9
(6,256 Views)
Hi rohrdt -

The attached VI should do what you're asking.  It creates an image of arbitrary height that has pixels of every possible value along the width.  You can generate an image of any bit depth  The display on the front panel is using the "Full Dynamic" method of mapping images greater than 8-bit down to a format that can be displayed by Windows.  The actual image written to a PNG file is, however, at the original bit depth specified by the user.
David Staab, CLA
Staff Systems Engineer
National Instruments
0 Kudos
Message 7 of 9
(6,251 Views)
If you have to scaled down to 8-bits for display, it doesn't make whole lot of sense to pay for IMAQ.
Both intensity graph, and picture control can display 8 bit gray scale.
 
Scale down to 8-bit from 16 bit gray scale is piece of cake.
 
 
George Zou
George Zou
Message 8 of 9
(6,234 Views)

Thanks David S.

That was just what I was trying to do.

0 Kudos
Message 9 of 9
(6,207 Views)