HALCON Reference Manual / Matrix / Arithmetic Operators

sub_matrix_mod (Operator)

Name

sub_matrix_mod — Subtract two matrices.

Synopsis

sub_matrix_mod( : : MatrixAID, MatrixBID : )

Description

The operator sub_matrix_mod computes the difference of the input matrices MatrixA and MatrixB given by the matrix handles MatrixAID and MatrixBID. Both matrices must have identical dimensions. The input matrix MatrixA is overwritten with the result. Access to the elements of the matrix is possible e.g. with the operator get_full_matrix. The formula for the calculation of the result is:

  MatrixA = MatrixA - MatrixB.

Example:

            /   3.0   1.0  -2.0  \                /   2.0   8.0  -3.0  \
  MatrixA = |  -5.0   7.0   2.0  |      MatrixB = |  -4.0  -1.0   5.0  |
            \  -9.0  -4.0   1.0  /                \   2.0  -4.0   7.0  /

                 /   1.0  -7.0   1.0  \
  ->   MatrixA = |  -1.0   8.0  -3.0  |
                 \ -11.0   0.0  -6.0  /

Attention

sub_matrix_mod modifies the content of an already existing matrix.

Parameters

MatrixAID (input_control) matrix (integer)
Matrix handle of the input matrix A.

MatrixBID (input_control) matrix (integer)
Matrix handle of the input matrix B.

Result

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

Parallelization Information

sub_matrix_mod is reentrant and processed without parallelization.

Possible Predecessors

create_matrix

Possible Successors

get_full_matrix, get_value_matrix

Alternatives

sub_matrix

See also

add_matrix, add_matrix_mod

Module

Foundation


HALCON Reference Manual / Matrix / Arithmetic Operators
Version 9.0.2 Copyright © 1996-2010 MVTec Software GmbH