LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Store a 12-bit gray scale image

Yes colman77, you perfectly understood my problem. I can't figure out what image format I should use to store 12-bit gray information... Does anyone have an idea ?
CLA, CTA, LV Champion
View Cyril Gambini's profile on LinkedIn
This post is made under CC BY 4.0 DEED licensing
0 Kudos
Message 11 of 18
(1,724 Views)
you may be able to find some info here, esp. in the VI attached to the second response.
 
0 Kudos
Message 12 of 18
(1,707 Views)


@colman77 wrote:
It seems that the outputted image is based on the "color palette" that you select... unfortunately it also seems that the only greyscale palette available limits you to 8 bpp...

What do you mean by "the only greyscale palette available limits you to 8 bpp... "
George Zou
0 Kudos
Message 13 of 18
(1,708 Views)


@zyl7 wrote:
I'm using the IMAQ function "IMAQ Write PNG file" to store the images. But then when you open these stored images with a basic software (such as Paint) each pixel is coded onto 256 levels. Do you think I should turn "Use bit depth?" option to True ?

I mean when you create the image using IMAQ Create.vi, you can specify grayscale I16.
The display of Paint doesn't mean anything here.  Even if you are opening a 16 bit grayscale image, Paint will convert it to 8 bit for display.

 

George Zou

http://gtoolbox.yeah.net

 

George Zou
0 Kudos
Message 14 of 18
(1,705 Views)


@zyl7 wrote:
Yes colman77, you perfectly understood my problem. I can't figure out what image format I should use to store 12-bit gray information... Does anyone have an idea ?


Display & save image are 2 different issue.

You can save your image in 16 bit gray scale png/tiff, but you can't display a 16 bit grayscale image.

Neither Windows system nor your vedio card support that.

All applications, including Paint, IMAQ, convert the image to 8 bit befoer display it.

The find out if you saved your image in a right image type, try IMAQ GetFileInfo

 

George Zou

http://gtoolbox.yeah.net

 

George Zou
Message 15 of 18
(1,704 Views)
George is absolutely right.
When configuring the properties of your graphic card you can get a maximum of 8 bit for each of the channels R, G and B. This is called True Color and supports 16.7 million different color values.
When displaying shades of grey you face the situation that even True Color only supports 256 values because the channels R, G and B get the same value when displaying any color between black (0,0,0) and white (255,255,255).
Guenter
0 Kudos
Message 16 of 18
(1,688 Views)


@zou wrote:

What do you mean by "the only greyscale palette available limits you to 8 bpp... "


if I understand correctly the "color palettes" are lookup tables, which creates grayscale by putting all 3 rgb channels to the same value... and since each channel is 8 bits, that would limit any grayscale image to 8 bpp?

 

EDIT: yeah, what guenter said 🙂

Message Edited by colman77 on 08-17-2007 04:42 PM

Message 17 of 18
(1,687 Views)


colman77 wrote:

if I understand correctly the "color palettes" are lookup tables, which creates grayscale by putting all 3 rgb channels to the same value... and since each channel is 8 bits, that would limit any grayscale image to 8 bpp?


You are right.  That color table is limit to 8 bit.

Don't konw if this require for that VI, but in general, you don't need a color table for grayscale image.  It's a constant.

 

George Zou

http://gtoolbox.yeah.net


 

George Zou
0 Kudos
Message 18 of 18
(1,668 Views)