LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do you make a 16 bit image of all white pixels

I am trying to make a 16 bit image of all white pixels. I created a 16 bit image and then used array to image VI (from vision) and an array of values of 32767 (white pixel) to create the image, but the image created is all black and no matter which value I tried to give the array, the image is always black.
0 Kudos
Message 1 of 4
(2,965 Views)
Deanna Zhang;

Try the following: Right click on your array and select Format & Precision.... In the dialog box, change the format to Hexadecimal. Return to the main program and make sure your array is made of elements that read "FFFF".

Or, instead of using an array of numbers, try using an array of Color boxes. The color box in located in the control palette under Numeric. From the color box you can make sure you are selecting white. Then cast the array to the numeric representation you need (Function palette->Numeric->Conversion)

If none of this help, can you post a sample of your code?

Regards;
Enrique
www.vartortech.com
0 Kudos
Message 2 of 4
(2,965 Views)
Hi Enrique,
I tried both your techniques and both does not work. I am posting the code I used for the first method. Thank you for your help.
0 Kudos
Message 3 of 4
(2,965 Views)
Try changing one pixel value to 0. This should do the trick. What is going on is that by default 16-bit images are dynamically displayed to fit into the 256 gray-scale values that most monitors can display. This means it takes the high value in the image and the low value in the image sets these to 0 and 255, and scales the rest of the image to fit between. In the case where all the pixel values are the same value, everything is scaled to 0. You can change this behavior by changing the display mapping mode for the windraw window (see IMAQ WinDisplayMapping.vi help) If you are using LV 7.0 with the image display control, you'll need to use a property node to change the 16-bit display mapping behavior.

Hope this helps!
Message 4 of 4
(2,965 Views)