Matrix to image🔗

Converts a matrix to an image. The type of the image is determined by outputType.

Inputs🔗

  • matrix: The input matrix. If the type of the input matrix is float or double, the range of the values is assumed to be either on range [0, 1] or [-1, 1]. The positive range [0, 1] is assumed if the output is a color image or an 8-bit gray level image. The negative range [-1, 1] is assumed if the output is 16-bit or 32-bit gray level image.

  • outputRange: If outputRange = Measured, the output range (i.e. channel_min and channel_max) is set to the true minimum and maximum values of the input matrix. If outputRange = Estimated, the output range is set large enough to hold all possible values of the output type. This parameter is ignored if the type of the input matrix is double or float.

  • image: Optional reference image which is used for setting calibration factors only. Pixel data is not used. The size of the reference image does not affect the output.

  • outputType: Type of the output image.

Outputs🔗

  • image: The output image.

enum OutputType🔗

Type of the output image.

Values:

enumerator Auto🔗

Output type is deduced from the value range of the input matrix.

The output is always a gray-level image.

enumerator Gray8🔗

8-bit gray level image

enumerator Gray16🔗

16-bit gray level image

enumerator Gray32🔗

32-bit gray level image

enumerator Rgb32🔗

RGB color image.

Matrix entries are interpreted as 32-bit numbers 0xAARRGGBB where RR, GG and BB are 8-bit values for red, green and blue intensities, respectively. Eight most significant bits (“AA”) are ignored.

enumerator Rgba32🔗

RGBA color image.

Matrix entries are interpreted as 32-bit numbers 0xAARRGGBB where AA, RR, GG and BB are 8-bit values for red, green and blue and alpha intensities, respectively.

enum OutputRange🔗

Ways of determining the possible range of values in the color channels of the output image.

Values:

enumerator Measured🔗

Output range (i.e.

channel_min and channel_max) is measured from the value range of the input matrix.

enumerator Maximum🔗

Output range (i.e.

channel_min and channel_max) is assumed to be the largest possible value range of the output image. For example, if the output type is Gray16, channel_min will be -32768 and channel_max will be 32767.