Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

floating point display mapping

To avoid negative values I convert my images to floating point when they are full 16 bit.
But now i have another problem. De 16 bit display mapping function does not work. I i want to display a range of pixels (ex. grey values 40000 - > 50000) nothing happens. Is there a way to display a floating point image with a function like there is for 16 bit images (given range) without converting the actual pixels.
0 Kudos
Message 1 of 5
(3,356 Views)
This document explains the behavior you are seeing:
How are Floating Point Images Displayed? http://digital.ni.com/public.nsf/websearch/ECEA4E260A7BCBD486256DA90063A831

Hope this helps.
-Julie
Message 2 of 5
(3,356 Views)
Thanks for your answer.

Ok, converting to floating point is not a solution.
But how are we suppose to handle full 16 bit images.
It makes no sense that there are negative values in an image. In Imaq half the range of a full 16 bit image is negative (signed integer).
In histogram reports this is really confusing.

Please help.

Erik
0 Kudos
Message 3 of 5
(3,356 Views)
Try mapping the 16 bits to 8 bits, using this example program (you will need the Vision software):
http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=B45EACE3D8F956A4E034080020E74861&p_node=DZ52000_US&p_source=External

The difference in resolution is not distinguishable to the eye.
0 Kudos
Message 4 of 5
(3,356 Views)
This VI does only what the 16 bit display mapping function does (exept that there is an error made in this VI). The included 16 bit image is not full 16 bit (min = 176, max = 4095, only 15 bits are used). In attachment I included for you a full 16 bit image (values from 0 -> 65536) Imaq will read this as values ranging from -32768 -> 32767.
If you open this Image with the VI you suggested you will get a full black 8 bit image. The original image is a gray gradient from black to white.
The error in this VI is that the casting to I32 has to be done before you use the max-min function.
Otherwise you get 32767 -(-32768) = -1 because you have an overflow with I16.

This VI is not a solution because we have to analyze full 16 bit images for
there real gray values.
So if we convert the image to 8 bit we loose information. So if we take a line profile or a histogram it is difficult to use if the image is full 16 bit.

I can not understand why a signed data type is used for images. Images don't have negative values.
This is not the first time I mentioned this. I hope that NI understands the problem.
0 Kudos
Message 5 of 5
(3,356 Views)