\HeaderA{normalize}{Intensity values linear scaling}{normalize}
\begin{Description}\relax
Linearly scale the intensity values of an image to a specified range.
\end{Description}
\begin{Usage}
\begin{verbatim}
  normalize(x, separate=TRUE, ft=c(0,1))
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] An \code{Image} object or an array.
\item[\code{separate}] If \code{TRUE}, normalizes each frame separately.
\item[\code{ft}] A numeric vector of 2 values, target minimum and maximum 
intensity values after normalization. 
\end{ldescription}
\end{Arguments}
\begin{Value}
An \code{Image} object or an array, containing the transformed version
of \code{x}.
\end{Value}
\begin{Author}\relax
Oleg Sklyar, \email{osklyar@ebi.ac.uk}, 2006-2007
\end{Author}
\begin{Examples}
\begin{ExampleCode}
  x = readImage(system.file('images', 'shapes.png', package='EBImage'))
  x = x[110:512,1:130]
  y = bwlabel(x)
  if (interactive()) display(x, title='Original')

  print(range(y))
  y = normalize(y)
  print(range(y))

  if (interactive()) display(y, title='Segmented')
\end{ExampleCode}
\end{Examples}

