HALCON Reference Manual 10.0.2
Table of Contents / Matrix / File ClassesClassesClasses | | | Operators

write_matrixwrite_matrixwrite_matrixWriteMatrixWriteMatrix (Operator)

Name

write_matrixwrite_matrixwrite_matrixWriteMatrixWriteMatrix — Write a matrix to a file.

Signature

write_matrix( : : MatrixID, FileFormat, FileName : )

Herror write_matrix(const Hlong MatrixID, const char* FileFormat, const char* FileName)

Herror T_write_matrix(const Htuple MatrixID, const Htuple FileFormat, const Htuple FileName)

Herror write_matrix(const HTuple& MatrixID, const HTuple& FileFormat, const HTuple& FileName)

void HMatrix::WriteMatrix(const HTuple& FileFormat, const HTuple& FileName) const

void HOperatorSetX.WriteMatrix(
[in] VARIANT MatrixID, [in] VARIANT FileFormat, [in] VARIANT FileName)

void HMatrixX.WriteMatrix(
[in] BSTR FileFormat, [in] BSTR FileName)

static void HOperatorSet.WriteMatrix(HTuple matrixID, HTuple fileFormat, HTuple fileName)

void HMatrix.WriteMatrix(string fileFormat, string fileName)

Description

The operator write_matrixwrite_matrixwrite_matrixWriteMatrixWriteMatrix writes a matrix to the file FileNameFileNameFileNameFileNamefileName. The matrix can be read with read_matrixread_matrixread_matrixReadMatrixReadMatrix. The default HALCON file extension for the matrix is 'mtx'. The format of the file can be selected via the parameter FileFormatFileFormatFileFormatFileFormatfileFormat. The following values are supported: 'binary'"binary""binary""binary""binary" for a binary file format, and 'ascii'"ascii""ascii""ascii""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.

Parallelization

Parameters

MatrixIDMatrixIDMatrixIDMatrixIDmatrixID (input_control)  matrix HMatrix, HTupleHMatrix, HTupleHMatrixX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong)

Matrix handle of the input matrix.

FileFormatFileFormatFileFormatFileFormatfileFormat (input_control)  string HTupleHTupleVARIANTHtuple (string) (string) (char*) (BSTR) (char*)

Format of the file.

Default value: 'binary' "binary" "binary" "binary" "binary"

List of values: 'binary'"binary""binary""binary""binary", 'ascii'"ascii""ascii""ascii""ascii"

FileNameFileNameFileNameFileNamefileName (input_control)  filename.write HTupleHTupleVARIANTHtuple (string) (string) (char*) (BSTR) (char*)

File name.

File extension: .mtx

Result

If the file name is valid (write permission), the operator write_matrixwrite_matrixwrite_matrixWriteMatrixWriteMatrix returns the value 2 (H_MSG_TRUE). If necessary an exception is raised.

Possible Predecessors

create_matrixcreate_matrixcreate_matrixCreateMatrixCreateMatrix

Module

Foundation


Table of Contents / Matrix / File ClassesClassesClasses | | | Operators
HALCON Reference Manual 10.0.2 Copyright © 1996-2011 MVTec Software GmbH