ClassesClassesClassesClasses | | | | Operators

match_fourier_coeffT_match_fourier_coeffMatchFourierCoeffmatch_fourier_coeffMatchFourierCoeffMatchFourierCoeff (Operator)

Name

match_fourier_coeffT_match_fourier_coeffMatchFourierCoeffmatch_fourier_coeffMatchFourierCoeffMatchFourierCoeff — Similarity of two contours.

Warning

match_fourier_coeffmatch_fourier_coeffMatchFourierCoeffmatch_fourier_coeffMatchFourierCoeffMatchFourierCoeff is obsolete and is only provided for reasons of backward compatibility.

Signature

match_fourier_coeff( : : RealCoef1, ImaginaryCoef1, RealCoef2, ImaginaryCoef2, MaxCoef, Damping : Distance)

Herror T_match_fourier_coeff(const Htuple RealCoef1, const Htuple ImaginaryCoef1, const Htuple RealCoef2, const Htuple ImaginaryCoef2, const Htuple MaxCoef, const Htuple Damping, Htuple* Distance)

Herror match_fourier_coeff(const HTuple& RealCoef1, const HTuple& ImaginaryCoef1, const HTuple& RealCoef2, const HTuple& ImaginaryCoef2, const HTuple& MaxCoef, const HTuple& Damping, double* Distance)

void MatchFourierCoeff(const HTuple& RealCoef1, const HTuple& ImaginaryCoef1, const HTuple& RealCoef2, const HTuple& ImaginaryCoef2, const HTuple& MaxCoef, const HTuple& Damping, HTuple* Distance)

static double HMisc::MatchFourierCoeff(const HTuple& RealCoef1, const HTuple& ImaginaryCoef1, const HTuple& RealCoef2, const HTuple& ImaginaryCoef2, Hlong MaxCoef, const HString& Damping)

static double HMisc::MatchFourierCoeff(const HTuple& RealCoef1, const HTuple& ImaginaryCoef1, const HTuple& RealCoef2, const HTuple& ImaginaryCoef2, Hlong MaxCoef, const char* Damping)

void HOperatorSetX.MatchFourierCoeff(
[in] VARIANT RealCoef1, [in] VARIANT ImaginaryCoef1, [in] VARIANT RealCoef2, [in] VARIANT ImaginaryCoef2, [in] VARIANT MaxCoef, [in] VARIANT Damping, [out] VARIANT* Distance)

double HMiscX.MatchFourierCoeff(
[in] VARIANT RealCoef1, [in] VARIANT ImaginaryCoef1, [in] VARIANT RealCoef2, [in] VARIANT ImaginaryCoef2, [in] Hlong MaxCoef, [in] BSTR Damping)

static void HOperatorSet.MatchFourierCoeff(HTuple realCoef1, HTuple imaginaryCoef1, HTuple realCoef2, HTuple imaginaryCoef2, HTuple maxCoef, HTuple damping, out HTuple distance)

static double HMisc.MatchFourierCoeff(HTuple realCoef1, HTuple imaginaryCoef1, HTuple realCoef2, HTuple imaginaryCoef2, int maxCoef, string damping)

Description

The operator match_fourier_coeffmatch_fourier_coeffMatchFourierCoeffmatch_fourier_coeffMatchFourierCoeffMatchFourierCoeff calculates the Euclidean distance between two contours which are available as Fourier coefficients. In order to avoid that the higher frequencies are in some way too dominant, the following attenuation can be used:

none:

No attenuation.

1/index:

Absolute amounts of the Fourier coefficients will be divided by their index.

1/(index*index):

Absolute amounts of the Fourier coefficients will be divided by their square index.

The higher the result value, the greater the differences between the pattern and the test contour. For the input Fourier coefficients (RealCoef1RealCoef1RealCoef1RealCoef1RealCoef1realCoef1, ImaginaryCoef1ImaginaryCoef1ImaginaryCoef1ImaginaryCoef1ImaginaryCoef1imaginaryCoef1, RealCoef2RealCoef2RealCoef2RealCoef2RealCoef2realCoef2, ImaginaryCoef2ImaginaryCoef2ImaginaryCoef2ImaginaryCoef2ImaginaryCoef2imaginaryCoef2) only odd numbers of parameter values are allowed. If the number of coefficients is not the same, only the first n coefficients will be compared. The parameter MaxCoefMaxCoefMaxCoefMaxCoefMaxCoefmaxCoef indicates the number of the coefficients to be compared. If MaxCoefMaxCoefMaxCoefMaxCoefMaxCoefmaxCoef is set to zero, all coefficients will be used.

Parallelization

Parameters

RealCoef1RealCoef1RealCoef1RealCoef1RealCoef1realCoef1 (input_control)  real-array HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Real parts of the pattern Fourier coefficients.

ImaginaryCoef1ImaginaryCoef1ImaginaryCoef1ImaginaryCoef1ImaginaryCoef1imaginaryCoef1 (input_control)  real-array HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Imaginary parts of the pattern Fourier coefficients.

RealCoef2RealCoef2RealCoef2RealCoef2RealCoef2realCoef2 (input_control)  real-array HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Real parts of the Fourier coefficients to be compared.

ImaginaryCoef2ImaginaryCoef2ImaginaryCoef2ImaginaryCoef2ImaginaryCoef2imaginaryCoef2 (input_control)  real-array HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Imaginary parts of the Fourier coefficients to be compared.

MaxCoefMaxCoefMaxCoefMaxCoefMaxCoefmaxCoef (input_control)  integer HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Total number of Fourier coefficients.

Default value: 50

Suggested values: 0, 5, 10, 15, 20, 30, 40, 50, 70, 100, 200, 400

Restriction: MaxCoef >= 0

DampingDampingDampingDampingDampingdamping (input_control)  string HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Kind of attenuation.

Default value: '1/index' "1/index" "1/index" "1/index" "1/index" "1/index"

Suggested values: 'none'"none""none""none""none""none", '1/index'"1/index""1/index""1/index""1/index""1/index", '1/(index*index)'"1/(index*index)""1/(index*index)""1/(index*index)""1/(index*index)""1/(index*index)"

DistanceDistanceDistanceDistanceDistancedistance (output_control)  real HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Similarity of the contours.

Example (C++ (HALCON 5.0-10.0))

prep_contour_fourier(trow,tcol,"unsigned_area",&param_scale);
fourier_1dim(trow,tcol,param_scale,50,&frow,&fcol);
invar_fourier_coeff(frow,fcol,1,"affine_invar",&invrow,&invcol);
abs_invar_fourier_coeff(invrow,invcol,1,2,
                        "az_invar1",&absrow,&abscol);
match_fourier_coeff(contur1_row, contur1_col,
                    contur2_row, contur2_col, 50,
                    "1/index", &Distance_wert);

Possible Predecessors

invar_fourier_coeffinvar_fourier_coeffInvarFourierCoeffinvar_fourier_coeffInvarFourierCoeffInvarFourierCoeff

Module

Foundation


ClassesClassesClassesClasses | | | | Operators