Discussion:
Store a 12-bit gray scale image
(too old to reply)
zou
2007-08-16 17:40:07 UTC
Permalink
You can't use Write PNG File.vi.  It's for 8 bit gray scale or 32 bit RGB color.
For 12/16 bit gray scale, you should use IMAQ.
 
George Zou
<a href="http://gtoolbox.yeah.net" target="_blank">http://gtoolbox.yeah.net</a>
&nbsp;
zou
2007-08-16 19:40:09 UTC
Permalink
IMAQ support 16 bit gray scale.&nbsp; What image type are you using?
Both PNG and TIFF support 16 gray scale.
&nbsp;
&nbsp;
George Zou
<a href="http://gtoolbox.yeah.net" target="_blank">http://gtoolbox.yeah.net</a>
&nbsp;
chrisger
2007-08-17 11:10:09 UTC
Permalink
hi there
well, if you have IMAQ, why don't you write a little viewer in LabVIEW? The IMAQ display delivers built-in tools for viewing a pixels value.
zou
2007-08-17 19:40:10 UTC
Permalink
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 &amp; 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
&nbsp;
George Zou
<a href="http://gtoolbox.yeah.net" target="_blank">http://gtoolbox.yeah.net</a>
&nbsp;
zou
2007-08-17 19:40:06 UTC
Permalink
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... "
colman77
2007-08-17 20:40:07 UTC
Permalink
zou wrote:What do you mean by "the only greyscale palette available limits you to 8 bpp... "


if I understand correctly the "color palettes"&nbsp;are&nbsp;lookup tables, which creates grayscale by putting all 3 rgb channels to the same value... and since each channel is&nbsp;8 bits, that would limit any grayscale image to 8 bpp?
zou
2007-08-18 00:40:04 UTC
Permalink
colman77 wrote:
if I understand correctly the "color palettes"&nbsp;are&nbsp;lookup tables, which creates grayscale by putting all 3 rgb channels to the same value... and since each channel is&nbsp;8 bits, that would limit any grayscale image to 8 bpp?


You are right.&nbsp; 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.&nbsp; It's a constant.
&nbsp;
George Zou
<a href="http://gtoolbox.yeah.net" target="_blank">http://gtoolbox.yeah.net</a>
&nbsp;

zou
2007-08-17 19:40:09 UTC
Permalink
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.&nbsp; Even if you are opening a 16 bit grayscale image, Paint will&nbsp;convert it to 8 bit for display.
&nbsp;
George Zou
<a href="http://gtoolbox.yeah.net" target="_blank">http://gtoolbox.yeah.net</a>
&nbsp;
Continue reading on narkive:
Loading...