
Contents |
Convert to Data
Convert a grayscale image to a numeric data matrix
1. img2m img:=mat(1) om:=mat(2) type:=byte;
2. img2m type:=byte;
| Display Name | Variable Name | I/O and Type | Default Value | Description |
|---|---|---|---|---|
| Input Matrix | img |
Input Image | |
Specifies the source image to be manipulated. The default input is the active image. |
| Output Matrix | om |
Output MatrixObject | |
Specifies the output image. By default, the output image is the same as the input image. See the syntax here. |
| Type | type |
Input int | |
Specifies the data type of the output data.
|
This img2m function converts the input image to a numeric data matrix. Note that if the input image is a color image, it will be first converted to a gray image, and then the gray image will be converted to a data matrix.
In this example, we use the img2m X-Function to convert the input image to a data matrix:
