read_matrix — 从文件中读取矩阵。
算子 read_matrix reads a matrix, which has
been written to the file with write_matrix, from the file
FileName. The default HALCON file extension for the
matrix is 'mtx'. The format of the file can be binary or ascii.
Each row of the file contains one row of a matrix with a number
of columns. The columns are separated with white spaces or tabs.
Each row must have the same number of columns. Empty lines are
ignored.
The reading results are stored in the matrix Matrix.
The operator returns the matrix handle MatrixID of this
matrix.可通过算子
get_full_matrix 等方式访问该矩阵的元素。
此算子返回一个句柄。请注意,即使该句柄被用作特定算子的输入参数,这些算子仍可能改变此句柄类型的实例状态。
FileName (输入控制) filename.read → (string)
File name.
File extension:
.mtx
MatrixID (输出控制) matrix → (handle)
Matrix handle.
If the file name is valid, the operator read_matrix 返回值 2 ( H_MSG_TRUE )。如有必要,则抛出异常。
基础