write_matrix — 将矩阵写入文件。
write_matrix( : : MatrixID, FileFormat, FileName : )
算子 write_matrix writes a matrix to the
file FileName. The matrix can be read with
read_matrix。The default HALCON file extension for the
matrix is 'mtx'. The format of the file can be selected
via the parameter FileFormat. The following values are
supported: 'binary' for a binary file format, and
'ascii' for a ascii text format. In the text format
each row of the file contains one row of the matrix. The columns
are separated with white spaces. The advantage of using the binary
file format instead of the ascii text format is a smaller size of
the output file.
MatrixID (输入控制) matrix → (handle)
输入矩阵的矩阵句柄。
FileFormat (输入控制) string → (string)
Format of the file.
默认值: 'binary'
值列表: 'ascii', 'binary'
FileName (输入控制) filename.write → (string)
File name.
File extension:
.mtx
如果文件名有效(具有写入权限),算子 write_matrix 返回值 2 ( H_MSG_TRUE )。如有必要,则抛出异常。
基础