03-05-2012 09:42 AM
I acquired a 2D array and want to transfer it into a gray scale image (12 bits) and save it into my hard disk but I don't know how to do it.
I can use Intensity graph to show the 2Darray into gray scale image, but the intensity graph.vi can not save the image in real time.
Solved! Go to Solution.
03-06-2012 07:24 AM
The 12-bits makes it rather difficult. If you are willing to save as 8-bit grayscale, you can use the internal picture funtions. Use Flatten to Pixmap to convert your array to a pixmap, then store it as a PNG. For 12-bit, you will need to use the call library node with an external library. Two that may work (although I have not done this) are ImageMagick and LibTiff.
03-07-2012 09:49 AM
Thank you DFGray,
I have finisehd the 8-bits according to your suggestion.
I saw there are also 24bits option on the Flatten to Pixmap VI, but when I ascale the array by 2^24-1 and then connect to the Flaten to Pixmap, then save the image, but when I oprn the saved image I found ther is no image information but noise.
I want to have larger bit-depth because of the requirement of my project, so can you tell me how can I save the iamge in 24-bits depth correctly?
03-07-2012 12:21 PM
The 24-bit is a color image with 8-bits per color channel per pixel (interleaved, if I remember correctly). It is not a 24-bit gray-level, so I don't think it will work for you. I believe the IMAQ library (a LabVIEW add-on) will handle 16-bit gray-scale, if you can get a copy.
As a native LabVIEW workaround, you could also split your image into two 8-bit images, with one image representing the high bytes, the other the low. You could then combine them when you do the analysis, if your analysis program is capable of this.
09-13-2012 05:55 PM
i might have the same problem, i am using image acquistion in labview
i am acquring a 16 bit grayscale image from a camera and a GPU is changing into a lookup table with varied colours.
but when i want to store the resulting image, it gets stored as an 8 bit avi file.
how can store it as a 16bit file?
thank for the help.
09-14-2012 08:02 AM
There are three options listed in the discussion above. The IMAQ one is the easiest, but also is an extra add-in the LabVIEW that is purchased separately. The other two will require more coding, but are free.