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

copy_matrixcopy_matrixcopy_matrixCopyMatrixCopyMatrix (Operator)

Name

copy_matrixcopy_matrixcopy_matrixCopyMatrixCopyMatrix — Copy a matrix.

Signature

copy_matrix( : : MatrixID : MatrixCopyID)

Herror copy_matrix(const Hlong MatrixID, Hlong* MatrixCopyID)

Herror T_copy_matrix(const Htuple MatrixID, Htuple* MatrixCopyID)

Herror copy_matrix(const HTuple& MatrixID, Hlong* MatrixCopyID)

HMatrix HMatrix::CopyMatrix() const

void HOperatorSetX.CopyMatrix(
[in] VARIANT MatrixID, [out] VARIANT* MatrixCopyID)

IHMatrixX* HMatrixX.CopyMatrix()

static void HOperatorSet.CopyMatrix(HTuple matrixID, out HTuple matrixCopyID)

HMatrix HMatrix.CopyMatrix()

Description

The operator copy_matrixcopy_matrixcopy_matrixCopyMatrixCopyMatrix creates the new matrix MatrixCopyMatrixCopyMatrixCopyMatrixCopymatrixCopy and copies all elements of the input MatrixMatrixMatrixMatrixmatrix to this new matrix. The input MatrixMatrixMatrixMatrixmatrix is defined by the matrix handle MatrixIDMatrixIDMatrixIDMatrixIDmatrixID. The operator returns the matrix handle MatrixCopyIDMatrixCopyIDMatrixCopyIDMatrixCopyIDmatrixCopyID of the matrix MatrixCopyMatrixCopyMatrixCopyMatrixCopymatrixCopy. Access to the elements of the matrix is possible e.g. with the operator get_full_matrixget_full_matrixget_full_matrixGetFullMatrixGetFullMatrix. With this operator a matrix can be saved before the matrix is modified by the operators set_value_matrixset_value_matrixset_value_matrixSetValueMatrixSetValueMatrix, set_full_matrixset_full_matrixset_full_matrixSetFullMatrixSetFullMatrix, set_sub_matrixset_sub_matrixset_sub_matrixSetSubMatrixSetSubMatrix, or set_diagonal_matrixset_diagonal_matrixset_diagonal_matrixSetDiagonalMatrixSetDiagonalMatrix.

Example:


           /   3.0   1.0  -2.0  \                   /   3.0   1.0  -2.0  \
  Matrix = |  -5.0   7.0   2.0  |  ->  MatrixCopy = |  -5.0   7.0   2.0  |
           \  -9.0  -4.0   1.0  /                   \  -9.0  -4.0   1.0  /

Parallelization

Parameters

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

Matrix handle of the input matrix.

MatrixCopyIDMatrixCopyIDMatrixCopyIDMatrixCopyIDmatrixCopyID (output_control)  matrix HMatrix, HTupleHMatrix, HTupleHMatrixX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong)

Matrix handle of the copied matrix.

Result

If the parameters are valid, the operator copy_matrixcopy_matrixcopy_matrixCopyMatrixCopyMatrix returns the value 2 (H_MSG_TRUE). If necessary, an exception is raised.

Possible Predecessors

create_matrixcreate_matrixcreate_matrixCreateMatrixCreateMatrix

Possible Successors

get_full_matrixget_full_matrixget_full_matrixGetFullMatrixGetFullMatrix, get_value_matrixget_value_matrixget_value_matrixGetValueMatrixGetValueMatrix

Alternatives

repeat_matrixrepeat_matrixrepeat_matrixRepeatMatrixRepeatMatrix

Module

Foundation


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