Image to matrix🔗
Takes in an image and outputs a matrix.
Inputs🔗
image
: Input image.outputType
: The type of the output matrix.normalizeIntensity
: A Boolean flag that enables or disables intensity range normalization. This flag has an effect only if outputType =Float
orDouble
. If this flag istrue
and channel_min of the input image is negative, the output range is [-1, 1] where pixels with intensity channel_min are mapped to -1 and pixels with intensity channel_max are mapped to 1. Otherwise, if channel_min is greater or equal to zero, the output range is [0, 1] where pixels with intensity channel_min are mapped to 0 and pixels with intensity channel_max are mapped to 1. If this flag isfalse
, the values of input pixels are copied to the output matrix as such. If the input is a color image, the pixels are first converted to grayscale.
Outputs🔗
matrix
: Output matrix. If input is an ARGB color image and outputType isRgbInt32
, the bytes in the elements of the output matrix are in order 0xAARRGGBB. For example, a green opaque pixel results in 0xff00ff00. Notice that this may be interpreted as a negative integer.