Casting Images
The following table lists the way in which IMAQ Cast Image casts pixel values if the Image Src type and Image Type parameter are not the same.
Image Src Type | Image Type | Result |
If you provide a lookup table, the destination pixel will have the lookup value of the source pixel. If you do not provide a lookup table, the VI copies the source value to the destination unmodified. | ||
|
Each color component of the destination is set to the source value. If the source value is greater than 255, the VI sets each color component to 255. If the source value is less than 0, the VI sets each color component to 0. If the source image has a specified bit depth, the VI uses the bit depth when performing this conversion. | |
|
The VI sets the luminance component of the destination to the source value. If the source value is greater than 255, the VI sets the luminance to 255. If the source value is less than 0, the VI sets the luminance to 0. The VI sets hue and saturation component of the destination to 0. If the source image has a specified bit depth, the VI uses the bit depth when performing this conversion. | |
|
The VI sets the real component of the destination to the source value. The VI sets the imaginary component of the destination to 0. | |
The VI shifts the source value to the right by the given shift value (divides each source pixel value by 2^shift ) and stores the value in the destination. If the shifted value is greater than 255, the VI sets the destination value to 255. If the shift value is zero, the VI uses the specified bit depth of the source image. | ||
|
Each color component of the destination is set to the source value. If the source value is greater than 65535, the VI sets each color component to 65535. If the source value is less than 0, the VI sets each color component to 0. | |
The VI shifts the source value to the 8-bit range using the specified bit depth of the source image. Then the VI sets the destination value to the average of the three color components of the source. | ||
The VI sets the destination value to the average of the three color components of the source. If the average of the source color components is out of the range of the destination, the VI coerces the average to the range. | ||
The VI shifts the source value to the 8-bit range using the specified bit depth of the source image. Then the VI sets each color component in the destination value to the corresponding component in the source value. | ||
The VI shifts the source value to the 8-bit range using the specified bit depth of the source image. Then the VI converts each pixel from the RGB color space to the HSL color space. | ||
If you provide a lookup table, the destination pixel will have the lookup value of the source pixel. If you do not provide a lookup table, the VI copies the source value to the destination unmodified. | ||
The VI sets the destination value to the source value. If the source value is out of the range of the destination, the VI coerces the source to the range. | ||
The VI sets the destination value to the average of the three color components of the source. | ||
The VI converts each pixel from the RGB color space to the HSL color space. | ||
The VI sets the real portion of the destination value to the average of the three color components of the source, and it sets the imaginary portion of the destination to 0. | ||
The VI sets the destination value to the luminance component of the source value. | ||
The VI converts each pixel from the HSL color space to the RGB color space. | ||
The VI sets the real portion of the destination value to the value of the luminance component of the source, and it sets the imaginary portion of the destination to 0. If the source value is out of the range of the destination, the VI coerces the source to the range. | ||
The VI sets the destination value to the magnitude of the source value. If the source value is out of the range of the destination, the VI coerces the source to the range. | ||
The VI sets each color component of the destination value to the magnitude of the source value. If the source value is out of the range of the destination, the VI coerces the source to the range. | ||
The VI sets the luminance component of the destination value to the magnitude of the source value, and it sets the hue and saturation components to 0. | ||
The VI sets the destination value to the source value. If the source value is out of the range of the destination, the VI coerces the source to the range. | ||
The VI sets the destination value to the source value. If the source value is out of the range of the destination, the VI coerces the source to the range. |