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

set_sub_matrixset_sub_matrixset_sub_matrixSetSubMatrixSetSubMatrix (Operator)

Name

set_sub_matrixset_sub_matrixset_sub_matrixSetSubMatrixSetSubMatrix — Set a sub-matrix of a matrix.

Signature

set_sub_matrix( : : MatrixID, MatrixSubID, Row, Column : )

Herror set_sub_matrix(const Hlong MatrixID, const Hlong MatrixSubID, const Hlong Row, const Hlong Column)

Herror T_set_sub_matrix(const Htuple MatrixID, const Htuple MatrixSubID, const Htuple Row, const Htuple Column)

Herror set_sub_matrix(const HTuple& MatrixID, const HTuple& MatrixSubID, const HTuple& Row, const HTuple& Column)

void HMatrix::SetSubMatrix(const HMatrix& MatrixSubID, const HTuple& Row, const HTuple& Column) const

void HOperatorSetX.SetSubMatrix(
[in] VARIANT MatrixID, [in] VARIANT MatrixSubID, [in] VARIANT Row, [in] VARIANT Column)

void HMatrixX.SetSubMatrix(
[in] IHMatrixX* MatrixSubID, [in] Hlong Row, [in] Hlong Column)

static void HOperatorSet.SetSubMatrix(HTuple matrixID, HTuple matrixSubID, HTuple row, HTuple column)

void HMatrix.SetSubMatrix(HMatrix matrixSubID, int row, int column)

Description

The operator set_sub_matrixset_sub_matrixset_sub_matrixSetSubMatrixSetSubMatrix overwrites a part of the MatrixMatrixMatrixMatrixmatrix with the matrix MatrixSubMatrixSubMatrixSubMatrixSubmatrixSub. The input matrices are defined by the matrix handles MatrixIDMatrixIDMatrixIDMatrixIDmatrixID and MatrixSubIDMatrixSubIDMatrixSubIDMatrixSubIDmatrixSubID. The parameters RowRowRowRowrow and ColumnColumnColumnColumncolumn determine the position of the upper left corner of the sub-matrix MatrixSubMatrixSubMatrixSubMatrixSubmatrixSub in MatrixMatrixMatrixMatrixmatrix.

Example:


           /  3.0  0.0  9.0  1.0  \                 /  1.0  -2.0  \
  Matrix = | -5.0  3.0  1.0  6.0  |     MatrixSub = |  7.0   2.0  |
           \ -9.0  0.0  1.0 -1.0  /                 \ -4.0   1.0  /

  Row = 0   Column = 1

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

Attention

set_sub_matrixset_sub_matrixset_sub_matrixSetSubMatrixSetSubMatrix modifies the content of an already existing matrix.

The conditions 0 <= RowRowRowRowrow < size of matrix MatrixMatrixMatrixMatrixmatrix in the row direction, RowRowRowRowrow + size of matrix MatrixSubMatrixSubMatrixSubMatrixSubmatrixSub in the row direction <= size of matrix MatrixMatrixMatrixMatrixmatrix in the row direction, 0 <= ColumnColumnColumnColumncolumn < size of MatrixMatrixMatrixMatrixmatrix in the column direction, and ColumnColumnColumnColumncolumn + size of matrix MatrixSubMatrixSubMatrixSubMatrixSubmatrixSub in the columns direction <= size of MatrixMatrixMatrixMatrixmatrix in the column direction must be satisfied.

Parallelization

Parameters

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

Matrix handle of the input matrix.

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

Matrix handle of the input sub-matrix.

RowRowRowRowrow (input_control)  integer HTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong)

Upper row position of the sub-matrix in the matrix.

Default value: 0

Suggested values: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 30, 50, 100

Restriction: Row >= 0

ColumnColumnColumnColumncolumn (input_control)  integer HTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong)

Left column position of the sub-matrix in the matrix.

Default value: 0

Suggested values: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 30, 50, 100

Restriction: Column >= 0

Result

If the parameters are valid, the operator set_sub_matrixset_sub_matrixset_sub_matrixSetSubMatrixSetSubMatrix 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

See also

get_sub_matrixget_sub_matrixget_sub_matrixGetSubMatrixGetSubMatrix

Module

Foundation


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