read_matrixT_read_matrixReadMatrixReadMatrix (Operator)

Name

read_matrixT_read_matrixReadMatrixReadMatrix — Einlesen eine Matrix von einer Datei.

Signatur

read_matrix( : : FileName : MatrixID)

Herror T_read_matrix(const Htuple FileName, Htuple* MatrixID)

void ReadMatrix(const HTuple& FileName, HTuple* MatrixID)

void HMatrix::HMatrix(const HString& FileName)

void HMatrix::HMatrix(const char* FileName)

void HMatrix::HMatrix(const wchar_t* FileName)   (Nur Windows)

void HMatrix::ReadMatrix(const HString& FileName)

void HMatrix::ReadMatrix(const char* FileName)

void HMatrix::ReadMatrix(const wchar_t* FileName)   (Nur Windows)

static void HOperatorSet.ReadMatrix(HTuple fileName, out HTuple matrixID)

public HMatrix(string fileName)

void HMatrix.ReadMatrix(string fileName)

Beschreibung

read_matrixread_matrixReadMatrixReadMatrixReadMatrix liest eine Matrix, die mit write_matrixwrite_matrixWriteMatrixWriteMatrixWriteMatrix geschrieben wurde, aus der Datei FileNameFileNameFileNameFileNamefileName ein. Die Dateiendung für die Matrix ist in HALCON 'mtx'. Das Dateiformat kann binär oder ascii sein. Jede Zeile der Datei enthält eine Zeile der Matrix mit einer Anzahl von Spalten. Die Spalten sind durch Leerzeichen oder Tabulatoren getrennt. Jede Zeile muss dieselbe Anzahl an Spalten beinhalten. Leere Zeilen werden ingnoriert.

Die eingelesenen Ergebnisse werden in der generierten Matrix MatrixMatrixMatrixMatrixmatrix gespeichert. Es wird das Matrix Handle MatrixIDMatrixIDMatrixIDMatrixIDmatrixID dieser Matrix zurückgegeben. Zugriff auf die Elemente der Matrizen ist z.B. mit dem Operator get_full_matrixget_full_matrixGetFullMatrixGetFullMatrixGetFullMatrix möglich.

Ausführungsinformationen

Dieser Operator liefert ein Handle zurück. Es ist zu beachten, dass der Zustand einer Instanz dieses Handletyps durch bestimmte Operatoren geändert werden kann, obwohl das Handle als Eingabeparameter in diesen Operatoren verwendet wird.

Parameter

FileNameFileNameFileNameFileNamefileName (input_control)  filename.read HTupleHTupleHtuple (string) (string) (HString) (char*)

Name der Datei.

Dateiendung: .mtx

MatrixIDMatrixIDMatrixIDMatrixIDmatrixID (output_control)  matrix HMatrix, HTupleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Matrix Handle.

Ergebnis

Ist der Dateiname korrekt, dann liefert read_matrixread_matrixReadMatrixReadMatrixReadMatrix den Wert 2 (H_MSG_TRUE). Gegebenenfalls wird eine Fehlerbehandlung durchgeführt.

Nachfolger

get_full_matrixget_full_matrixGetFullMatrixGetFullMatrixGetFullMatrix

Modul

Foundation