match_fourier_coeff — Similarity of two contours.
match_fourier_coeff is obsolete and is only provided for reasons of backward compatibility.
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:
Absolute amounts of the Fourier coefficients will be divided by their 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 (RealCoef1, ImaginaryCoef1, RealCoef2, ImaginaryCoef2) 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 MaxCoef indicates the number of the coefficients to be compared. If MaxCoef is set to zero, all coefficients will be used.
Real parts of the pattern Fourier coefficients.
Imaginary parts of the pattern Fourier coefficients.
Real parts of the Fourier coefficients to be compared.
Imaginary parts of the Fourier coefficients to be compared.
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
Kind of attenuation.
Default value: '1/index'
Suggested values: 'none', '1/index', '1/(index*index)'
Similarity of the contours.
prep_contour_fourier(trow,tcol,"unsigned_area",¶m_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);