Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I display and save 10-bit greyscale images (without loosing information)?

I am snapping 10-bit greyscale images. First I need to convert them in an array for which I use the IMAQ "ImageToArray" function. Second I need to convert the array back into an image wether bmp format or png format and I also want to display it.
The first part works: From my 10-bit greyscale image I get an array (I16-format) with a size of 768x576, in which each element has a value between 0 and 1023.
The second part is a problem, because I cannot find a function that converts 16-bit arrays in images. The pixmap function only allows to convert whether 1,4,8 or 24 bit arrays, but using the 24-bit connection of the function I have no possibility to set a certain colortable, since the function ignores the color-connection in that case.
I hope here is anybody who might help me. Thanks!
0 Kudos
Message 1 of 2
(3,132 Views)
Hi,

as there's the function IMAQ ImageToArray to convert images to arrays there's also a function IMAQ ArrayToImage for the other way around. This functions ships with the NI Vision Development Module.

Kind regards,

Philippe Goetz,
Applications Engineer, National Instruments
0 Kudos
Message 2 of 2
(3,112 Views)