fourier_1dim ( : : Rows, Columns, ParContour, MaxCoef : RealCoef, ImaginaryCoef )
Calculates the Fourier coefficients of a parameterized contour.
The operator fourier_1dim calculates the Fourier coefficients
of a parameterized contour by using a valid parameter scale. This
parameter scale may, for instance, be created with the help of the
procedure create_param_cont. This function serves to
calculate the Fourier coefficients of closed contours which are treated
like complex-valued curves. Therefore, in order to determine the
Fourier coefficients, the Fourier transform for periodical
functions is used. Hereby the parameter MaxCoef determines
the absolute value + 1 of the maximal number of Fourier coefficients,
i.e. if n coefficients are indicated, the procedure will calculate
coefficients ranging from -n to n. The contour will be approximated
without loss, if n = number of the contour points, whereby n = 100
approximates the contour so well that an error can hardly be
distinguished; n [40,50] however is sufficient for most
applications. If the parameter MaxCoef is set to 0, all
coefficients will be determined.
Parameters
Rows (input_control)
|
contour.y-array -> integer
|
Row coordinates of the contour. |
Columns (input_control)
|
contour.x-array -> integer
|
Colmumn coordinates of the contour. |
ParContour (input_control)
|
real-array -> real
|
Parameter scale. |
MaxCoef (input_control)
|
integer -> integer
|
Desired number of Fourier coefficients
or all of them (0). |
Default value: 50 |
Suggested values: 0, 5, 10, 15, 20, 30, 40, 50, 60, 70, 80, 90, 100, 150, 200, 400 |
Restriction: MaxCoef >= 0 |
RealCoef (output_control)
|
real-array -> real
|
Real parts of the Fourier coefficients. |
ImaginaryCoef (output_control)
|
real-array -> real
|
Imaginary parts of the Fourier coefficients. |
Example
fetch_contur(single,&row,&col);
move_contour_orig(row,col,&trow,&tcol);
create_param_cont(trow,tcol,"unsigned_area",¶m_scale);
fourier_1dim(trow,tcol,param_scale,&frow,&fcol);
invariances(frow,fcol,1,"affine_invar",&invrow,&invcol);
absolute_invariant(invrow,invcol,1,2,"az_invar1",&absrow,&abscol);
Possible Predecessors
create_param_cont
Possible Successors
invariances,
disp_polygon
Alternatives
fft__
Copyright © 1996-1997 MVTec Software GmbH