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

min_matrixmin_matrixmin_matrixMinMatrixMinMatrix (Operator)

Name

min_matrixmin_matrixmin_matrixMinMatrixMinMatrix — Returns the elementwise minimum of a matrix.

Signature

min_matrix( : : MatrixID, MinType : MatrixMinID)

Herror min_matrix(const Hlong MatrixID, const char* MinType, Hlong* MatrixMinID)

Herror T_min_matrix(const Htuple MatrixID, const Htuple MinType, Htuple* MatrixMinID)

Herror min_matrix(const HTuple& MatrixID, const HTuple& MinType, Hlong* MatrixMinID)

HMatrix HMatrix::MinMatrix(const HTuple& MinType) const

void HOperatorSetX.MinMatrix(
[in] VARIANT MatrixID, [in] VARIANT MinType, [out] VARIANT* MatrixMinID)

IHMatrixX* HMatrixX.MinMatrix([in] BSTR MinType)

static void HOperatorSet.MinMatrix(HTuple matrixID, HTuple minType, out HTuple matrixMinID)

HMatrix HMatrix.MinMatrix(string minType)

Description

The operator min_matrixmin_matrixmin_matrixMinMatrixMinMatrix returns the minimum values of the elements of the MatrixMatrixMatrixMatrixmatrix defined by the matrix handle MatrixIDMatrixIDMatrixIDMatrixIDmatrixID. A new matrix MatrixMinMatrixMinMatrixMinMatrixMinmatrixMin is generated with the result and the matrix handle MatrixMinIDMatrixMinIDMatrixMinIDMatrixMinIDmatrixMinID of this matrix is returned. Access to the elements of the matrix is possible e.g. with the operator get_full_matrixget_full_matrixget_full_matrixGetFullMatrixGetFullMatrix.

The type of minimum determination of the matrix can be selected via the parameter MinTypeMinTypeMinTypeMinTypeminType:

'columns'"columns""columns""columns""columns":

The minimum is returned for each column of the MatrixMatrixMatrixMatrixmatrix separately. The resulting matrix MatrixMinMatrixMinMatrixMinMatrixMinmatrixMin has one row and the identical number of columns as the input matrix.

Example:


           /   8.0   4.0  -3.0  \
  Matrix = \  -6.0   2.0   7.0  /      MinType = 'columns'

  ->   MatrixMin = [ -6.0   2.0  -3.0  ]
  

'rows'"rows""rows""rows""rows":

The minimum is returned for each row of the MatrixMatrixMatrixMatrixmatrix separately. The resulting matrix MatrixMinMatrixMinMatrixMinMatrixMinmatrixMin has the identical number of rows as the input matrix and one column.

Example:


           /   8.0   4.0  -3.0  \
  Matrix = \  -6.0   2.0   7.0  /      MinType = 'rows'

                   / -3.0 \
  ->   MatrixMin = \ -6.0 /
  

'full'"full""full""full""full":

The minimum is returned using all elements of the MatrixMatrixMatrixMatrixmatrix. The resulting matrix MatrixMinMatrixMinMatrixMinMatrixMinmatrixMin has one row and one column.

Example:


           /   8.0   4.0  -3.0  \
  Matrix = \  -6.0   2.0   7.0  /      MinType = 'full'

  ->   MatrixMin = [ -6.0 ]
  

Parallelization

Parameters

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

Matrix handle of the input matrix.

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

Type of minimum determination.

Default value: 'columns' "columns" "columns" "columns" "columns"

List of values: 'columns'"columns""columns""columns""columns", 'rows'"rows""rows""rows""rows", 'full'"full""full""full""full"

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

Matrix handle with the minimum values of the input matrix.

Result

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

max_matrixmax_matrixmax_matrixMaxMatrixMaxMatrix

Module

Foundation


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