Noisy or Unexpected Looking Image In LabVIEW Image Display

Updated Dec 12, 2022

Reported In

Hardware

  • Camera

Software

  • Vision Development Module
  • Vision Assistant

Driver

  • NI-IMAQdx

Issue Details

  • I have a 10-bit monochrome camera and I am trying to acquire images in LabVIEW. When I do a grab in Measurement & Automation Explorer (MAX) the images look good, even when they are all black or close to all black. However, when I do a grab in LabVIEW and display the image on an Image Display, the images that should be all black come out grey and look very noisy. What is wrong?
  • I have a 16-bit image that is not showing as expected in the Image Display on my Front Panel. Why is this happening?
  • Why are the 16-bit images I'm exporting from my code different from what I can see on my Image Display?

Solution

The phenomenon that you are seeing in LabVIEW is related to the image display itself. The image display in LabVIEW only displays 8 bits of information. As such, when it is fed a 16-bit image, it does what is known as 16-bit display mapping, which maps 16 bits of data to 8 bits. This applies to coercing 10-bit and 12-bit images as well.

By default, the LabVIEW Image Display does a full dynamic range adjustment, where the algorithm takes the maximum and minimum pixel values in an image and automatically maps the minimum intensity value to 0 and the maximum intensity value to 255. If you have a 16-bit image that is black you will see it as a greyish image that has a lot of 'noise' because the display is mapping a small range of the available pixel values (maybe only 0 to 10 bits) to a full scale range of 0 to 255.

To change the behavior of the image display, you must change the 16-bit image mapping conversion mode. To do this, right-click on the image display and select Create»Property Node. On the block diagram, click on the Visible property and change it to 16-bit Display Mapping»Conversion Method. There is a list of options to change the display. 
 
 
The image above shows the properties to set if you would like the image display to show a 10-bit mono image with no dynamic range adjustment. To do this, set the Conversion Method property to Given Range, and set the minimum and maximum values to 0 and 1023 respectively. This same procedure can be applied to any camera with any bit depth.  

You can also change the 16-bit display mapping settings by right-clicking on the Image Display control on the front panel and selecting 16-Bit Display Mapping. This pops up a dialog box in which the Conversion Method can be set to Given Range and minimum and maximum values can be configured too.

This should eliminate the noise when you are looking at a near-black or near-white image. Again, this is just a display issue. The pixel values of the image will still be accurate.