IMAQ WindDisplayMapping VI

LabView NI Vision

IMAQ WindDisplayMapping VI

Owning Palette: External DisplayInstalled With: NI Vision Development Module

Sets/gets the pixel mapping policy for displaying 16-bit images with an unspecified bit depth. Because 16-bit grayscale images cannot be displayed with their full resolution on 32-bit color displays using common video adapters limited to 8-bit resolution/per pixel/color, 16-bit images need to be mapped to the 8-bit range (0 to 255).

Details

IMAQ WindDisplayMapping

ci32.gif

Window Number (0...15) specifies the image window to configure. The window is identified by a number from 0 to 15. The default value is 0. Specify a value of 15 to configure the video out port on a LabVIEW Real-Time system.

cnclst.gif

Conversion Policy (Full Dynamic) is the display conversion to use if Get/Set Status? is set to TRUE.

cu32.gif

Conversion Method has the following values:

Full Dynamic (0)

The full dynamic range of the 16-bit image is mapped to an 8-bit (256 grayscale values) scale. 16-bit images are displayed by scaling the data to 8 bits, calculated as a function of the dynamic range from the image source. The minimum value (min) and the maximum value (max) are calculated automatically. Then the following formula is applied to each pixel:

Display(x, y) = (Src(x, y) - min) × 255/(max - min)

Downshift (1)

The 16-bit image pixels are shifted to the right the number of times specified by the # Shifts cluster member.

Given Range (2)

The pixel values in the range specified by Minimum Value and Maximum Value are mapped to an 8-bit scale.

90 % Dynamic (3)

The dynamic range containing the middle 90% of the cumulated histogram of the image is mapped to an 8-bit (256 grayscale values) scale.

Given Percent Range (4)

The pixel values in the relative percentage range (0 to 100) of the cumulated histogram specified by Minimum Value and Maximum Value are mapped to an 8-bit scale.

ci32.gif

Minimum Value is the minimum value used for Given Range and Given Percent Range. When Conversion Method is set to Given Range, Minimum Value represents the value that is mapped to 0. When Conversion Method is set to Given Percent Range, Minimum Value represents the percentage of the range used to compute the pixel value mapped to 0.

ci32.gif

Maximum Value is the maximum value used for Given Range and Given Percent Range. When Conversion Method is set to Given Range, Maximum Value represents the value that is mapped to 255. When Conversion Method is set to Given Percent Range, Maximum Value represents the percentage of the range used to compute the pixel value mapped to 255.

ci32.gif

# Shifts is the number of bits to right-shift the pixel values for the Downshift conversion method.

cerrcodeclst.gif

error in (no error) describes the error status before this VI or function runs. The default is no error. If an error occurred before this VI or function runs, the VI or function passes the error in value to error out. This VI or function runs normally only if no error occurred before this VI or function runs. If an error occurs while this VI or function runs, it runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use error in and error out to check errors and to specify execution order by wiring error out from one node to error in of the next node.

cbool.gif

status is TRUE (X) if an error occurred before this VI or function ran or FALSE (checkmark) to indicate a warning or that no error occurred before this VI or function ran. The default is FALSE.

ci32.gif

code is the error or warning code. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.

cstr.gif

source describes the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning. The default is an empty string.

cbool.gif

Get/Set Status? (Set) specifies whether to retrieve (Get) or modify (Set) the conversion policy for displaying a 16-bit image in an image window The default value is TRUE (Set).

inclst.gif

Conversion Policy out returns the current display conversion policy for the Window Number specified.

iu32.gif

Conversion Method has the following values:

Full Dynamic (0)

The full dynamic range of the 16-bit image is mapped to an 8-bit (256 grayscale values) scale. 16-bit images are displayed by scaling the data to 8 bits, calculated as a function of the dynamic range from the image source. The minimum value (min) and the maximum value (max) are calculated automatically. Then the following formula is applied to each pixel:

Display(x, y) = (Src(x, y) - min) × 255/(max - min)

Downshift (1)

The 16-bit image pixels are shifted to the right the number of times specified by the # Shifts cluster member.

Given Range (2)

The pixel values in the range specified by Minimum Value and Maximum Value are mapped to an 8-bit scale.

90 % Dynamic (3)

The dynamic range containing the middle 90% of the cumulated histogram of the image is mapped to an 8-bit (256 grayscale values) scale.

Given Percent Range (4)

The pixel values in the relative percentage range (0 to 100) of the cumulated histogram specified by Minimum Value and Maximum Value are mapped to an 8-bit scale.

ii32.gif

Minimum Value is the minimum value used for Given Range and Given Percent Range. When Conversion Method is set to Given Range, Minimum Value represents the value that is mapped to 0. When Conversion Method is set to Given Percent Range, Minimum Value represents the percentage of the range used to compute the pixel value mapped to 0.

ii32.gif

Maximum Value is the maximum value used for Given Range and Given Percent Range. When Conversion Method is set to Given Range, Maximum Value represents the value that is mapped to 255. When Conversion Method is set to Given Percent Range, Maximum Value represents the percentage of the range used to compute the pixel value mapped to 255.

ii32.gif

# Shifts is the number of bits to right-shift the pixel values for the Downshift conversion method.

ierrcodeclst.gif

error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces. Right-click the error out indicator on the front panel and select Explain Error from the shortcut menu for more information about the error.

ibool.gif

status is TRUE (X) if an error occurred or FALSE (checkmark) to indicate a warning or that no error occurred.

ii32.gif

code is the error or warning code. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.

istr.gif

source describes the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning. The default is an empty string.

Details

IMAQ WindDisplayMapping enables the mapping technique used when displaying a 16-bit grayscale image. According to the Conversion Method selected, the image full dynamic is mapped to 8 bits (Full Dynamic), a given number of right shift is applied to the 16-bit pixels (Downshift), the range corresponding to the center 90% of the cumulative histogram is mapped to 8-bits (90% Dynamic). The default mapping technique is the Full Dynamic, where 16-bit images are displayed by scaling the data to 8 bits, calculated as a function of the dynamic range from the image source. The minimum value (min) and the maximum value (max) are calculated automatically. Then the following formula is applied to each pixel:

Display(x, y) = (Src(x, y) - min) × 255/(max - min)