write_matrix — Write a matrix to a file.
The operator 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.
Matrix handle of the input matrix.
Format of the file.
Default value: 'binary'
List of values: 'binary', 'ascii'
File extension: .mtx
If the file name is valid (write permission), the operator write_matrix returns the value 2 (H_MSG_TRUE). If necessary an exception is raised.