\HeaderA{edgeFeatures}{Extraction of edge profiles and edge features from image objects}{edgeFeatures}
\aliasA{edgeProfile}{edgeFeatures}{edgeProfile}
\begin{Description}\relax
Extract the edge profile from image objects, computing for each object
the distances of edge points to the object geometric center, at
different rotation angles.
\end{Description}
\begin{Usage}
\begin{verbatim}
  edgeFeatures(x, ref)
  edgeProfile(x, ref, n=32, fft=TRUE, scale=TRUE, rotate=TRUE)
 
\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}] An integer value giving the number of angle measures. The
full circle of \code{[-pi,pi]} is divided into \code{n-1} segments, at
which edges the profile is approximated. 
\item[\code{fft}] A logical value. If \code{TRUE}, the resulting profile is the
\code{\LinkA{fft}{fft}} transformation of the distance profile giving the
frequences of angular changes in shape. 
\item[\code{scale}] A logical value. If \code{TRUE}, the resulting profile
is scaled by the effective radius (calcualted as part of
\code{link\{hull.features\}}) making the profile scale invariant. 
\item[\code{rotate}] A logical value. If \code{TRUE}, the resulting profile
is shifted by the object's roation angle (calculated from the
\code{\LinkA{moments}{moments}} on the \code{ref} image, if provided, and on the hull
otherwise. 
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
\code{edgeFeatures} returns the following features:
\Itemize{
\item \code{e.irr}: difference between the smallest and largest
distance profile values.
\item \code{e.f2Pi}: 2pi/1 frequency component of the distance
profile.
\item \code{e.fPi}: 2pi/2 frequency component of the distance
profile.
\item \code{e.f2Pi3}: 2pi/3 frequency component of the distance
profile.
\item \code{e.fPi2}: 2pi/4 frequency component of the distance
profile.
}
\end{Details}
\begin{Value}
\code{edgeFeatures} 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}.

\code{edgeProfile} returns a matrix ((or a list of matrices if
\code{x} contains multiple frames) of profile values, corresponding,
from left to right, to the equidistant divisions of the range
\code{[-pi,pi]} if \code{fft} is \code{FALSE}. Otherwise, the matrix
contains the FFT transform of the corresponding distance profile.
\end{Value}
\begin{Author}\relax
Oleg Sklyar, \email{osklyar@ebi.ac.uk}, 2007
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{getFeatures}{getFeatures}}, \code{\LinkA{ocontour}{ocontour}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
   example(getFeatures)
\end{ExampleCode}
\end{Examples}

