LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using IMAQ Cast Image to convert 16 bit to 8 bit image.

I am trying to convert a 16 bit image to a bit image, and I am using IMAQ Cast Image. I am wondering what I am supposed to wire into the # of shifts? When I use NI Vision Assistant it asks I can convert by the adjust dynamic method. Does anyone know how to do this with IMAQ Cast Image? Thank you in advance.
0 Kudos
Message 1 of 2
(3,510 Views)
The number of shifts is the number of bits that will be chopped (in the dark regions) from the initial image to fit into 8 bits.
For instance, if you have a 10 bit image, compressing into an 8 bit image will obviously introduce some losses. You can decide to loose information either in the "whithe" parts or in the "black" parts of the image.
With #shifts = 0, the two most significant bits will be lost, so the whitest parts of the image will be uniformely white, but the darl grey levels will be preserved.
With #shifts = 2, the two least significant bits will be lost, preversing the whitest parts grey variations, but losing the subtilities in the darkest parts.
With #shifts = 1, a single bit is lost on either sides...
Chilly Charly    (aka CC)
Message 2 of 2
(3,503 Views)