LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Convert a 10 bit grayscale imag to color

Solved!
Go to solution

Hi, all

    I am a 8-year labview experience programmer, but new to image procession or NI-Vision. And now I have come to a problem with image conversion.

    I have a image acquision board which acquires 1k*1k 10 bit grayscale image, I saved the acquired image into *.raw format (binary), and now I am required to convert these image into bmp (jpeg,png,or diff) format. When I try to use the "Imaq save 2" VI , I got a error saying something like "not supported image type". After searching this forum, it seems as if I should use a color-type image to save as the bmp format, but to receive my 10 bit raw data, I should first create a U16 Grayscale image. So how can I solve this problem?

Thanks for any suggestions!

0 Kudos
Message 1 of 3
(3,224 Views)
Solution
Accepted by topic author 飞雨天

My guess: You are referring to the "IMAQ Write File 2.VI" as I don't know any "IMAQ Save ... VIs".

 

The "IMAQ Write File 2.VI" does not support writing 16-bit BMPs.  You can take this information from the supported image types of this VI, see here.  Look at the images above the VI description: "IMAQ Write File BMP 2" says, it accepts the image types "U8" and "RGB32".

 

Proposal: Write a PNG.

Message 2 of 3
(3,202 Views)

Saving as PNG is OK!!!

And I can save as bmp by converting from PNG, through a indirect way. So does JPEG.

Thanks soooooooooooooooooooooo much!!!

0 Kudos
Message 3 of 3
(3,195 Views)