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

Similarity of two contours.

The operator match_fourier_coeff 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 values of the Fourier coefficients will be
                   divided by their index.
  1/(index*index)  Absolute values 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. If the number of coefficients is not the same, only the first n coefficients will be compared. The parameter MaxCoef indicates the number of the coefficients to be compared. If MaxCoef is set to zero, all coefficients will be used.


Parameters

RealCoef1 (input_control)
real-array -> real
Real parts of the pattern Fourier coefficients.

ImaginaryCoef1 (input_control)
real-array -> real
Imaginary parts of the pattern Fourier coefficients.

RealCoef2 (input_control)
real-array -> real
Real parts of the Fourier coefficients to be compared.

ImaginaryCoef2 (input_control)
real-array -> real
Imaginary parts of the Fourier coefficients to be compared.

MaxCoef (input_control)
integer -> integer
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

Damping (input_control)
string -> string
Kind of attenuation.
Default value: ''1/index''
Suggested values: 'none', ''1/index'', ''1/(index*index)''

Distance (output_control)
real -> real
Similarity of the contours.


Example
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); 

Parallelization Information

match_fourier_coeff is reentrant and processed without parallelization.


Possible Predecessors

invar_fourier_coeff


Module

Fourier descriptors



Copyright © 1996-2005 MVTec Software GmbH