Image to matrix🔗
Takes in an image and outputs a matrix.
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 =
Double. If this flag is
trueand 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 is
false, 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.
matrix: Output matrix. If input is an ARGB color image and outputType is
RgbInt32, 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.