\HeaderA{zernikeMoments}{Extraction of Zernike moments from image objects.}{zernikeMoments}
\keyword{manip}{zernikeMoments}
\begin{Description}\relax
Computation of Zernike moment features from image objects.
\end{Description}
\begin{Usage}
\begin{verbatim}
  zernikeMoments(x, ref, N = 12, R = 30, apply.Gaussian, pseudo)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] An \code{Image} object or an array containing object masks.
Object masks are sets of pixels with the same unique integer value.
\item[\code{ref}] An \code{Image} object or an array, containing the
intensity values of the objects.
\item[\code{N}] A numeric. Indicates the maximal order of Zernike polynomials
to be computed. Default value is 12.
\item[\code{R}] A numeric. Defines the radius of the circle in pixels around
object centers from which the features are calculated.
\item[\code{apply.Gaussian, pseudo}] Deprecated.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
Zernike features are computed by projecting image objects on the
Zernike complex polynomials, using:

\code{z.\{nl\} = (n+1) / pi * abs( sum\_x,y(V*nl(x,y) * i(x,y)) )},

where \code{0 <= l <= n, n - l} is even and \code{i(x,y)} is the
intensity of the reference image at the coordinates \code{(x,y)} that
fall withing a circle of radius \code{R} from the object's centre.
Coordinates are taken relative to the object's centre.

\code{V*nl} is a complex conjugate of a Zernike polynomial of degree
\code{n} and angular dependence \code{l}:

\code{Vnl(x,y) = Qnl(x,y) * exp(j*l*theta)}, where \code{j = sqrt(-1),
    theta=atan2(y,x)}, and

\code{Qnl(x,y) = sum[\_m=0\textasciicircum{}((n-l)/2)] ((-1)\textasciicircum{}m * (n-m)! * r\textasciicircum{}(n-2*m)) /
    (m! * ((n-2*m+l)/2)! * ((n-2*m-l)/2)!) }, where \code{r =
    sqrt(x\textasciicircum{}2+y\textasciicircum{}2)}.
\end{Details}
\begin{Value}
Returns a matrix (or a list of matrices if \code{x} contains multiple
frames) of features computed of the objects present in \code{x} and
using the  intensity values of \code{ref}.
\end{Value}
\begin{Author}\relax
Oleg Sklyar, \email{osklyar@ebi.ac.uk}; Mike Smith, \email{msmith@ebi.ac.uk}, 2007
\end{Author}
\begin{References}\relax
F. Zernike. \emph{Beugungstheorie des Schneidenverfahrens und seiner verbesserten
Form, der Phasenkontrastmethode (Diffraction theory of the cut procedure and
its improved form, the phase contrast method)}. Physica, 1:pp. 689-704, 1934.

Jamie Shutler, \emph{Complex Zernike Moments}:
\url{http://homepages.inf.ed.ac.uk/rbf/CVonline/LOCAL_COPIES/SHUTLER3/node11.html}
\end{References}
\begin{SeeAlso}\relax
\code{\LinkA{getFeatures}{getFeatures}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
 example(getFeatures)
\end{ExampleCode}
\end{Examples}

