HALCON Reference Manual 10.0.2
Table of Contents / Tools / Function ClassesClassesClasses | | | Operators

match_funct_1d_transT_match_funct_1d_transmatch_funct_1d_transMatchFunct1dTransMatchFunct1dTrans (Operator)

Name

match_funct_1d_transT_match_funct_1d_transmatch_funct_1d_transMatchFunct1dTransMatchFunct1dTrans — Calculate transformation parameters between two functions.

Signature

match_funct_1d_trans( : : Function1, Function2, Border, ParamsConst, UseParams : Params, ChiSquare, Covar)

Herror T_match_funct_1d_trans(const Htuple Function1, const Htuple Function2, const Htuple Border, const Htuple ParamsConst, const Htuple UseParams, Htuple* Params, Htuple* ChiSquare, Htuple* Covar)

Herror match_funct_1d_trans(const HTuple& Function1, const HTuple& Function2, const HTuple& Border, const HTuple& ParamsConst, const HTuple& UseParams, HTuple* Params, HTuple* ChiSquare, HTuple* Covar)

HTuple HFunction1D::MatchFunct1dTrans(const HTuple& Function2, const HTuple& Border, const HTuple& ParamsConst, const HTuple& UseParams, HTuple* ChiSquare, HTuple* Covar) const

void HOperatorSetX.MatchFunct1dTrans(
[in] VARIANT Function1, [in] VARIANT Function2, [in] VARIANT Border, [in] VARIANT ParamsConst, [in] VARIANT UseParams, [out] VARIANT* Params, [out] VARIANT* ChiSquare, [out] VARIANT* Covar)

VARIANT HFunction1DX.MatchFunct1dTrans(
[in] IHFunction1DX* Function2, [in] BSTR Border, [in] VARIANT ParamsConst, [in] VARIANT UseParams, [out] double* ChiSquare, [out] VARIANT* Covar)

static void HOperatorSet.MatchFunct1dTrans(HTuple function1, HTuple function2, HTuple border, HTuple paramsConst, HTuple useParams, out HTuple paramsVal, out HTuple chiSquare, out HTuple covar)

HTuple HFunction1D.MatchFunct1dTrans(HFunction1D function2, string border, HTuple paramsConst, HTuple useParams, out double chiSquare, out HTuple covar)

Description

match_funct_1d_transmatch_funct_1d_transmatch_funct_1d_transMatchFunct1dTransMatchFunct1dTrans calculates the transformation parameters between two functions given as the tuples Function1Function1Function1Function1function1 and Function2Function2Function2Function2function2 (see create_funct_1d_arraycreate_funct_1d_arraycreate_funct_1d_arrayCreateFunct1dArrayCreateFunct1dArray and create_funct_1d_pairscreate_funct_1d_pairscreate_funct_1d_pairsCreateFunct1dPairsCreateFunct1dPairs). The following model is used for the transformation between the two functions:

    y1(x) = a1*y2(a3*x+a4)+a2 .

The transformation parameters are determined by a least-squares minimization of the following function:

    n-1
    ----
    \                                  2
    /   (y1(x[i])-a1*y2(a3*x[i]+a4)+a2)  .
    ----
    i=0

The values of the function y2 are obtained by linear interpolation. The parameter BorderBorderBorderBorderborder determines the values of the function Function2Function2Function2Function2function2 outside of its domain. For BorderBorderBorderBorderborder='zero'"zero""zero""zero""zero" these values are set to 0, for BorderBorderBorderBorderborder='constant'"constant""constant""constant""constant" they are set to the corresponding value at the border, for BorderBorderBorderBorderborder='mirror'"mirror""mirror""mirror""mirror" they are mirrored at the border, and for BorderBorderBorderBorderborder='cyclic'"cyclic""cyclic""cyclic""cyclic" they are continued cyclically. The calculated transformation parameters are returned as a 4-tuple in ParamsParamsParamsParamsparamsVal. If some of the parameter values are known, the respective parameters can be excluded from the least-squares adjustment by setting the corresponding value in the tuple UseParamsUseParamsUseParamsUseParamsuseParams to the value 'false'"false""false""false""false". In this case, the tuple ParamsConstParamsConstParamsConstParamsConstparamsConst must contain the known value of the respective parameter. If a parameter is used for the adjustment (UseParamsUseParamsUseParamsUseParamsuseParams = 'true'"true""true""true""true"), the corresponding parameter in ParamsConstParamsConstParamsConstParamsConstparamsConst is ignored. On output, match_funct_1d_transmatch_funct_1d_transmatch_funct_1d_transMatchFunct1dTransMatchFunct1dTrans additionally returns the sum of the squared errors ChiSquareChiSquareChiSquareChiSquarechiSquare of the resulting function, i.e., the function obtained by transforming the input function with the transformation parameters, as well as the covariance matrix CovarCovarCovarCovarcovar of the transformation parameters ParamsParamsParamsParamsparamsVal. These parameters can be used to decide whether a successful matching of the functions was possible.

Parallelization

Parameters

Function1Function1Function1Function1function1 (input_control)  function_1d-array HFunction1D, HTupleHFunction1D, HTupleHFunction1DX, VARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong)

Function 1.

Function2Function2Function2Function2function2 (input_control)  function_1d-array HFunction1D, HTupleHFunction1D, HTupleHFunction1DX, VARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong)

Function 2.

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

Border treatment for function 2.

Default value: 'constant' "constant" "constant" "constant" "constant"

List of values: 'zero'"zero""zero""zero""zero", 'constant'"constant""constant""constant""constant", 'mirror'"mirror""mirror""mirror""mirror", 'cyclic'"cyclic""cyclic""cyclic""cyclic"

ParamsConstParamsConstParamsConstParamsConstparamsConst (input_control)  number-array HTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double)

Values of the parameters to remain constant.

Number of elements: 4

Default value: [1.0,0.0,1.0,0.0]

UseParamsUseParamsUseParamsUseParamsuseParams (input_control)  string-array HTupleHTupleVARIANTHtuple (string) (string) (char*) (BSTR) (char*)

Should a parameter be adapted for it?

Number of elements: 4

Default value: ['true','true','true','true'] ["true","true","true","true"] ["true","true","true","true"] ["true","true","true","true"] ["true","true","true","true"]

List of values: 'true'"true""true""true""true", 'false'"false""false""false""false"

ParamsParamsParamsParamsparamsVal (output_control)  number-array HTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double)

Transformation parameters between the functions.

Number of elements: 4

ChiSquareChiSquareChiSquareChiSquarechiSquare (output_control)  number HTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double)

Quadratic error of the output function.

CovarCovarCovarCovarcovar (output_control)  number-array HTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double)

Covariance Matrix of the transformation parameters.

Number of elements: 16

Possible Predecessors

create_funct_1d_arraycreate_funct_1d_arraycreate_funct_1d_arrayCreateFunct1dArrayCreateFunct1dArray, create_funct_1d_pairscreate_funct_1d_pairscreate_funct_1d_pairsCreateFunct1dPairsCreateFunct1dPairs

See also

gray_projectionsgray_projectionsgray_projectionsGrayProjectionsGrayProjections

Module

Foundation


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