Register variables [xoff],[yoff] receive integer approximations of the
offset from the quasi-symmetry center. Registers [xr],[yr] receive real
number coordinates of the offset from the quasi-symmetry center.
To place the center of quasi-symmetry at the image center one has to use the
'SH' operation and reverse the signs of the shifts.
Implemented by G.Kishchenko.
The operation is noise- and fool-proof. It's based on
two-fold quasi-symmetry of objects. This operation usually
produces results similar to operation 'CG PH',
but it is preferred, since it does not report incorrect
center for dumbbell-shaped objects.''
The estimation of center of quasi-symmetry in this algorithm is based
on cross-correlation between original image and the image after a
180-degree rotation, implemented as follows:
i) The 2D Fourier transform of original image is computed.
ii) The square of a complex number in each point of 2D Fourier transform
is computed. (Notes: it's an equivalent of multiplication of Fourier
transform of original image and complex conjugate of image after a
180-degree rotation, because conjugate of image after a 180-degree
rotation is equal to Fourier transform of original image.)
iii) The reversed 2D Fourier transform is computed to obtain 2D
cross-correlation function. This is based on cross-correlation theorem
that states that Fourier transform of the cross-correlation of two
functions is equal to the product of multiplication of the individual
Fourier transforms, where one of them has been complex conjugated.
iii) The reversed 2D Fourier transform is computed to obtain 2D
cross-correlation. This is based on cross-correlation theorem the states
that Fourier transform of the cross-correlation of two functions is
equal to the product of multiplication of the individual Fourier
transforms, where one of them has been complex conjugated.
iv) The X,Y-coordinates corresponding to maximum of correlation function
are divided by 2 to obtain the center of object.