\hypertarget{a02630}{
\section{mln::labeling Namespace Reference}
\label{d0/d3f/a02630}\index{mln::labeling@{mln::labeling}}
}


Namespace of labeling routines.  


\subsection*{Namespaces}
\begin{DoxyCompactItemize}
\item 
namespace \hyperlink{a02632}{impl}


\begin{DoxyCompactList}\small\item\em Implementation namespace of labeling namespace. \item\end{DoxyCompactList}

\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
{\footnotesize template$<$typename I , typename N , typename L $>$ }\\mln::trait::ch\_\-value$<$ I, L $>$::ret \hyperlink{a02630_abf523b1cb719d5fcc109a1e35ad22bd8}{background} (const \hyperlink{a00044}{Image}$<$ I $>$ \&input, const \hyperlink{a00296}{Neighborhood}$<$ N $>$ \&nbh, L \&nlabels)
\item 
{\footnotesize template$<$typename I , typename N , typename L $>$ }\\mln::trait::ch\_\-value$<$ I, L $>$::ret \hyperlink{a02630_aaef8630659f1fc38b900d6f698b7259b}{blobs} (const \hyperlink{a00044}{Image}$<$ I $>$ \&input, const \hyperlink{a00296}{Neighborhood}$<$ N $>$ \&nbh, L \&nlabels)
\begin{DoxyCompactList}\small\item\em Connected component labeling of the binary objects of a binary image. \item\end{DoxyCompactList}\item 
{\footnotesize template$<$typename I , typename N , typename L , typename A $>$ }\\\hyperlink{a00392}{util::couple}$<$ mln::trait::ch\_\-value$<$ I, L $>$::ret, \hyperlink{a00392}{util::couple}$<$ \hyperlink{a00027}{util::array}$<$ typename A::result $>$, \hyperlink{a00027}{util::array}$<$ A $>$ $>$ $>$ \hyperlink{a02630_ac68778afbd68e72dc2089b4fe55fb6a1}{blobs\_\-and\_\-compute} (const \hyperlink{a00044}{Image}$<$ I $>$ \&input, const \hyperlink{a00296}{Neighborhood}$<$ N $>$ \&nbh, L \&nlabels, const \hyperlink{a00026}{Accumulator}$<$ A $>$ \&accu)
\item 
{\footnotesize template$<$typename V , typename L $>$ }\\mln::trait::ch\_\-value$<$ L, V $>$::ret \hyperlink{a02630_adbb61d9ab8f8dd6086b4049413206d18}{colorize} (const V \&value, const \hyperlink{a00044}{Image}$<$ L $>$ \&\hyperlink{a00256}{labeled\_\-image}, const typename L::value \&nlabels)
\begin{DoxyCompactList}\small\item\em Create a new color image from a labeled image and fill each component with a random color. \item\end{DoxyCompactList}\item 
{\footnotesize template$<$typename V , typename L $>$ }\\mln::trait::ch\_\-value$<$ L, V $>$::ret \hyperlink{a02630_a44d7b69f2fc6bb31c223ab4a94d9a3fa}{colorize} (const V \&value, const \hyperlink{a00044}{Image}$<$ L $>$ \&\hyperlink{a00256}{labeled\_\-image})
\item 
{\footnotesize template$<$typename L $>$ }\\mln::trait::ch\_\-value$<$ L, \hyperlink{a00431}{mln::value::rgb8} $>$::ret \hyperlink{a02630_a4e4ad3e8d3fe0db936ddd9f8774c1c7f}{colorize} (const \hyperlink{a00044}{Image}$<$ L $>$ \&input, const typename L::value \&nlabels)
\item 
{\footnotesize template$<$typename A , typename I , typename L $>$ }\\\hyperlink{a00027}{util::array}$<$ mln\_\-meta\_\-accu\_\-result(A, typename I::value)$>$ \hyperlink{a02630_af4caa7ecc88aef0de3fa6799c18766c5}{compute} (const \hyperlink{a00052}{Meta\_\-Accumulator}$<$ A $>$ \&a, const \hyperlink{a00044}{Image}$<$ I $>$ \&input, const \hyperlink{a00044}{Image}$<$ L $>$ \&\hyperlink{a00427}{label}, const typename L::value \&nlabels)
\begin{DoxyCompactList}\small\item\em Compute an accumulator onto the pixel values of the image {\ttfamily input}. \item\end{DoxyCompactList}\item 
{\footnotesize template$<$typename A , typename L $>$ }\\\hyperlink{a00027}{util::array}$<$ typename A::result $>$ \hyperlink{a02630_a23b40dd9a6e1144c46d5c86754f7433c}{compute} (const \hyperlink{a00026}{Accumulator}$<$ A $>$ \&a, const \hyperlink{a00044}{Image}$<$ L $>$ \&\hyperlink{a00427}{label}, const typename L::value \&nlabels)
\begin{DoxyCompactList}\small\item\em Compute an accumulator onto the pixel sites of each component domain of {\ttfamily label}. \item\end{DoxyCompactList}\item 
{\footnotesize template$<$typename A , typename L $>$ }\\\hyperlink{a00027}{util::array}$<$ mln\_\-meta\_\-accu\_\-result(A, typename L::psite)$>$ \hyperlink{a02630_ac3cb7ac90ca7bf02ef992a8f0dda96e0}{compute} (const \hyperlink{a00052}{Meta\_\-Accumulator}$<$ A $>$ \&a, const \hyperlink{a00044}{Image}$<$ L $>$ \&\hyperlink{a00427}{label}, const typename L::value \&nlabels)
\begin{DoxyCompactList}\small\item\em Compute an accumulator onto the pixel sites of each component domain of {\ttfamily label}. \item\end{DoxyCompactList}\item 
{\footnotesize template$<$typename A , typename I , typename L $>$ }\\\hyperlink{a00027}{util::array}$<$ typename A::result $>$ \hyperlink{a02630_a3f888189712c272a6cb55c0e1685ed45}{compute} (\hyperlink{a00027}{util::array}$<$ A $>$ \&a, const \hyperlink{a00044}{Image}$<$ I $>$ \&input, const \hyperlink{a00044}{Image}$<$ L $>$ \&\hyperlink{a00427}{label}, const typename L::value \&nlabels)
\begin{DoxyCompactList}\small\item\em Compute an accumulator onto the pixel values of the image {\ttfamily input}. \item\end{DoxyCompactList}\item 
{\footnotesize template$<$typename A , typename I , typename L $>$ }\\\hyperlink{a00027}{util::array}$<$ typename A::result $>$ \hyperlink{a02630_a1ac252bc27ff64d56f53c60ebb99afe1}{compute} (const \hyperlink{a00026}{Accumulator}$<$ A $>$ \&a, const \hyperlink{a00044}{Image}$<$ I $>$ \&input, const \hyperlink{a00044}{Image}$<$ L $>$ \&\hyperlink{a00427}{label}, const typename L::value \&nlabels)
\begin{DoxyCompactList}\small\item\em Compute an accumulator onto the pixel values of the image {\ttfamily input}. \item\end{DoxyCompactList}\item 
{\footnotesize template$<$typename A , typename I , typename L $>$ }\\mln::trait::ch\_\-value$<$ L, typename A::result $>$::ret \hyperlink{a02630_acc65facf81e5090b309be249990057bc}{compute\_\-image} (const \hyperlink{a00027}{util::array}$<$ typename A::result $>$ \&a, const \hyperlink{a00044}{Image}$<$ I $>$ \&input, const \hyperlink{a00044}{Image}$<$ L $>$ \&labels, const typename L::value \&nlabels)
\begin{DoxyCompactList}\small\item\em Compute an accumulator onto the pixel values of the image {\ttfamily input}. \item\end{DoxyCompactList}\item 
{\footnotesize template$<$typename A , typename I , typename L $>$ }\\mln::trait::ch\_\-value$<$ L, typename A::result $>$::ret \hyperlink{a02630_a73b0f6c9b9b9e6c3b3266fbd07db1a31}{compute\_\-image} (const \hyperlink{a00026}{Accumulator}$<$ A $>$ \&accu, const \hyperlink{a00044}{Image}$<$ I $>$ \&input, const \hyperlink{a00044}{Image}$<$ L $>$ \&labels, const typename L::value \&nlabels)
\begin{DoxyCompactList}\small\item\em Compute an accumulator onto the pixel values of the image {\ttfamily input}. \item\end{DoxyCompactList}\item 
{\footnotesize template$<$typename A , typename I , typename L $>$ }\\mln::trait::ch\_\-value$<$ L, typename mln::internal::meta\_\-accu\_\-ret\_\-result\_\-helper$<$ A, typename I::value $>$::result $>$::ret \hyperlink{a02630_a2736ee0faaec978ba04be6c9fddee8c7}{compute\_\-image} (const \hyperlink{a00052}{Meta\_\-Accumulator}$<$ A $>$ \&accu, const \hyperlink{a00044}{Image}$<$ I $>$ \&input, const \hyperlink{a00044}{Image}$<$ L $>$ \&labels, const typename L::value \&nlabels)
\begin{DoxyCompactList}\small\item\em Compute an accumulator onto the pixel values of the image {\ttfamily input}. \item\end{DoxyCompactList}\item 
{\footnotesize template$<$typename I , typename N , typename L $>$ }\\mln::trait::concrete$<$ I $>$::ret \hyperlink{a02630_aef1649904ead819f9557994af2e99122}{fill\_\-holes} (const \hyperlink{a00044}{Image}$<$ I $>$ \&input, const \hyperlink{a00296}{Neighborhood}$<$ N $>$ \&nbh, L \&nlabels)
\begin{DoxyCompactList}\small\item\em Filling holes of a single object in a binary image. \item\end{DoxyCompactList}\item 
{\footnotesize template$<$typename I , typename N , typename L $>$ }\\mln::trait::ch\_\-value$<$ I, L $>$::ret \hyperlink{a02630_aa0d36f289617995589937f089b16ac17}{flat\_\-zones} (const \hyperlink{a00044}{Image}$<$ I $>$ \&input, const \hyperlink{a00296}{Neighborhood}$<$ N $>$ \&nbh, L \&nlabels)
\begin{DoxyCompactList}\small\item\em Connected component labeling of the flat zones of an image. \item\end{DoxyCompactList}\item 
{\footnotesize template$<$typename I , typename N , typename L $>$ }\\mln::trait::ch\_\-value$<$ I, L $>$::ret \hyperlink{a02630_a119fd66662fc90fc77f89e9a733abc9c}{foreground} (const \hyperlink{a00044}{Image}$<$ I $>$ \&input, const \hyperlink{a00296}{Neighborhood}$<$ N $>$ \&nbh, L \&nlabels)
\item 
{\footnotesize template$<$typename I $>$ }\\mln::trait::concrete$<$ I $>$::ret \hyperlink{a02630_a6d73675fbf4a27323d9d7381176bb745}{pack} (const \hyperlink{a00044}{Image}$<$ I $>$ \&\hyperlink{a00427}{label}, typename I::value \&new\_\-nlabels, fun::i2v::array$<$ typename I::value $>$ \&repack\_\-fun)
\begin{DoxyCompactList}\small\item\em Relabel a labeled image in order to have a contiguous labeling. \item\end{DoxyCompactList}\item 
{\footnotesize template$<$typename I $>$ }\\mln::trait::concrete$<$ I $>$::ret \hyperlink{a02630_a0850136899d8c5239f10bc0379f92a74}{pack} (const \hyperlink{a00044}{Image}$<$ I $>$ \&\hyperlink{a00427}{label}, typename I::value \&new\_\-nlabels)
\item 
{\footnotesize template$<$typename I $>$ }\\void \hyperlink{a02630_ad066cdf374c1081c15bbeec2716f5d9c}{pack\_\-inplace} (\hyperlink{a00044}{Image}$<$ I $>$ \&\hyperlink{a00427}{label}, typename I::value \&new\_\-nlabels)
\item 
{\footnotesize template$<$typename I $>$ }\\void \hyperlink{a02630_adfaad5153ab73c6c4a560036f0d56363}{pack\_\-inplace} (\hyperlink{a00044}{Image}$<$ I $>$ \&\hyperlink{a00427}{label}, typename I::value \&new\_\-nlabels, fun::i2v::array$<$ typename I::value $>$ \&repack\_\-fun)
\begin{DoxyCompactList}\small\item\em Relabel inplace a labeled image in order to have a contiguous labeling. \item\end{DoxyCompactList}\item 
{\footnotesize template$<$typename I , typename N , typename L $>$ }\\mln::trait::ch\_\-value$<$ I, L $>$::ret \hyperlink{a02630_a000a28dd0dda7730c1a7fd2be647e8a4}{regional\_\-maxima} (const \hyperlink{a00044}{Image}$<$ I $>$ \&input, const \hyperlink{a00296}{Neighborhood}$<$ N $>$ \&nbh, L \&nlabels)
\item 
{\footnotesize template$<$typename I , typename N , typename L $>$ }\\mln::trait::ch\_\-value$<$ I, L $>$::ret \hyperlink{a02630_aa75e876604a2960c22139b59965edefd}{regional\_\-minima} (const \hyperlink{a00044}{Image}$<$ I $>$ \&input, const \hyperlink{a00296}{Neighborhood}$<$ N $>$ \&nbh, L \&nlabels)
\item 
{\footnotesize template$<$typename I , typename F $>$ }\\mln::trait::concrete$<$ I $>$::ret \hyperlink{a02630_a25622fdab81544f1e10cfad30a3d618e}{relabel} (const \hyperlink{a00044}{Image}$<$ I $>$ \&\hyperlink{a00427}{label}, const typename I::value \&nlabels, typename I::value \&new\_\-nlabels, const \hyperlink{a00033}{Function\_\-v2b}$<$ F $>$ \&fv2b)
\begin{DoxyCompactList}\small\item\em Remove components and relabel a labeled image. \item\end{DoxyCompactList}\item 
{\footnotesize template$<$typename I , typename F $>$ }\\mln::trait::concrete$<$ I $>$::ret \hyperlink{a02630_a466a70953a9a946efed0e32f77c6b82e}{relabel} (const \hyperlink{a00044}{Image}$<$ I $>$ \&\hyperlink{a00427}{label}, const typename I::value \&nlabels, const \hyperlink{a00034}{Function\_\-v2v}$<$ F $>$ \&fv2v)
\begin{DoxyCompactList}\small\item\em Remove components and relabel a labeled image. \item\end{DoxyCompactList}\item 
{\footnotesize template$<$typename I , typename F $>$ }\\void \hyperlink{a02630_a056a0654a28c83e6c4569a162783dc1c}{relabel\_\-inplace} (\hyperlink{a00044}{Image}$<$ I $>$ \&\hyperlink{a00427}{label}, const typename I::value \&nlabels, const \hyperlink{a00034}{Function\_\-v2v}$<$ F $>$ \&fv2v)
\begin{DoxyCompactList}\small\item\em Remove components and relabel a labeled image inplace. \item\end{DoxyCompactList}\item 
{\footnotesize template$<$typename I , typename F $>$ }\\void \hyperlink{a02630_a0090b0318adbed61bf417f0d1f6bb5bc}{relabel\_\-inplace} (\hyperlink{a00044}{Image}$<$ I $>$ \&\hyperlink{a00427}{label}, const typename I::value \&nlabels, const \hyperlink{a00033}{Function\_\-v2b}$<$ F $>$ \&fv2b)
\begin{DoxyCompactList}\small\item\em Remove components and relabel a labeled image inplace. \item\end{DoxyCompactList}\item 
{\footnotesize template$<$typename I , typename J $>$ }\\mln::trait::concrete$<$ I $>$::ret \hyperlink{a02630_ab379e1c37de7694343d8d716795862b8}{superpose} (const \hyperlink{a00044}{Image}$<$ I $>$ \&lhs, const typename I::value \&lhs\_\-nlabels, const \hyperlink{a00044}{Image}$<$ J $>$ \&rhs, const typename J::value \&rhs\_\-nlabels, typename I::value \&new\_\-nlabels)
\begin{DoxyCompactList}\small\item\em Superpose two labeled image. \item\end{DoxyCompactList}\item 
{\footnotesize template$<$typename I , typename N , typename L $>$ }\\mln::trait::ch\_\-value$<$ I, L $>$::ret \hyperlink{a02630_aa2463df9fff3602ea069800458bfd9cc}{value} (const \hyperlink{a00044}{Image}$<$ I $>$ \&input, const typename I::value \&val, const \hyperlink{a00296}{Neighborhood}$<$ N $>$ \&nbh, L \&nlabels)
\begin{DoxyCompactList}\small\item\em Connected component labeling of the image sites at a given value. \item\end{DoxyCompactList}\item 
{\footnotesize template$<$typename I , typename N , typename L , typename A $>$ }\\\hyperlink{a00392}{util::couple}$<$ mln::trait::ch\_\-value$<$ I, L $>$::ret, \hyperlink{a00392}{util::couple}$<$ \hyperlink{a00027}{util::array}$<$ typename A::result $>$, \hyperlink{a00027}{util::array}$<$ A $>$ $>$ $>$ \hyperlink{a02630_a2a1cc8fb7e5bdc5962e8d5cfe59e4d97}{value\_\-and\_\-compute} (const \hyperlink{a00044}{Image}$<$ I $>$ \&input, const typename I::value \&val, const \hyperlink{a00296}{Neighborhood}$<$ N $>$ \&nbh, L \&nlabels, const \hyperlink{a00026}{Accumulator}$<$ A $>$ \&accu)
\begin{DoxyCompactList}\small\item\em Connected component labeling of the image sites at a given value. \item\end{DoxyCompactList}\item 
{\footnotesize template$<$typename V , typename I $>$ }\\mln::trait::ch\_\-value$<$ I, V $>$::ret \hyperlink{a02630_af15bbc82a3d209353f258c22c139a3c3}{wrap} (const V \&value\_\-type, const \hyperlink{a00044}{Image}$<$ I $>$ \&input)
\begin{DoxyCompactList}\small\item\em Wrap labels such as 0 -\/$>$ 0 and \mbox{[}1, lmax\mbox{]} maps to \mbox{[}1, Lmax\mbox{]} (using modulus). \item\end{DoxyCompactList}\item 
{\footnotesize template$<$typename I $>$ }\\mln::trait::ch\_\-value$<$ I, \hyperlink{a00427}{mln::value::label\_\-8} $>$::ret \hyperlink{a02630_aed74169632fea4234ca55997646d6a20}{wrap} (const \hyperlink{a00044}{Image}$<$ I $>$ \&input)
\begin{DoxyCompactList}\small\item\em Wrap labels such as 0 -\/$>$ 0 and \mbox{[}1, lmax\mbox{]} maps to \mbox{[}1, Lmax\mbox{]} (using modulus). \item\end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Namespace of labeling routines. 

\subsection{Function Documentation}
\hypertarget{a02630_abf523b1cb719d5fcc109a1e35ad22bd8}{
\index{mln::labeling@{mln::labeling}!background@{background}}
\index{background@{background}!mln::labeling@{mln::labeling}}
\subsubsection[{background}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename I , typename N , typename L $>$ mln::trait::ch\_\-value$<$ I, L $>$::ret mln::labeling::background (
\begin{DoxyParamCaption}
\item[{const Image$<$ I $>$ \&}]{ input, }
\item[{const Neighborhood$<$ N $>$ \&}]{ nbh, }
\item[{L \&}]{ nlabels}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d0/d3f/a02630_abf523b1cb719d5fcc109a1e35ad22bd8}
Connected component labeling of the background part in a binary image.


\begin{DoxyParams}{Parameters}
\item[\mbox{\tt[in]} {\em input}]The input image. \item[\mbox{\tt[in]} {\em nbh}]The connexity of the background. \item[\mbox{\tt[out]} {\em nlabels}]The number of labels. \end{DoxyParams}
\begin{DoxyReturn}{Returns}
The label image.
\end{DoxyReturn}
\begin{DoxyPrecond}{Precondition}
The input image has to be binary (checked at compile-\/time).
\end{DoxyPrecond}
This routine actually calls \hyperlink{a02630_aa2463df9fff3602ea069800458bfd9cc}{mln::labeling::value} with the value set to {\ttfamily false}.

\begin{DoxySeeAlso}{See also}
\hyperlink{a02630_aa2463df9fff3602ea069800458bfd9cc}{mln::labeling::value} 
\end{DoxySeeAlso}


Definition at line 69 of file background.hh.



References value().



Referenced by fill\_\-holes().

\hypertarget{a02630_aaef8630659f1fc38b900d6f698b7259b}{
\index{mln::labeling@{mln::labeling}!blobs@{blobs}}
\index{blobs@{blobs}!mln::labeling@{mln::labeling}}
\subsubsection[{blobs}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename I , typename N , typename L $>$ mln::trait::ch\_\-value$<$ I, L $>$::ret mln::labeling::blobs (
\begin{DoxyParamCaption}
\item[{const Image$<$ I $>$ \&}]{ input, }
\item[{const Neighborhood$<$ N $>$ \&}]{ nbh, }
\item[{L \&}]{ nlabels}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d0/d3f/a02630_aaef8630659f1fc38b900d6f698b7259b}


Connected component labeling of the binary objects of a binary image. 


\begin{DoxyParams}{Parameters}
\item[\mbox{\tt[in]} {\em input}]The input image. \item[\mbox{\tt[in]} {\em nbh}]The connexity of the objects. \item[\mbox{\tt[out]} {\em nlabels}]The Number of labels. Its value is set in the algorithms. \end{DoxyParams}
\begin{DoxyReturn}{Returns}
The label image.
\end{DoxyReturn}
\begin{DoxyPrecond}{Precondition}
The input image has to be binary (checked at compile-\/time).
\end{DoxyPrecond}
A fast queue is used so that the algorithm is not recursive and can handle large binary objects (blobs). 

Definition at line 102 of file labeling/blobs.hh.



Referenced by blobs\_\-and\_\-compute(), and mln::graph::labeling().

\hypertarget{a02630_ac68778afbd68e72dc2089b4fe55fb6a1}{
\index{mln::labeling@{mln::labeling}!blobs\_\-and\_\-compute@{blobs\_\-and\_\-compute}}
\index{blobs\_\-and\_\-compute@{blobs\_\-and\_\-compute}!mln::labeling@{mln::labeling}}
\subsubsection[{blobs\_\-and\_\-compute}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename I , typename N , typename L , typename A $>$ {\bf util::couple}$<$ mln::trait::ch\_\-value$<$ I, L $>$::ret, {\bf util::couple}$<$ {\bf util::array}$<$ typename A::result $>$, {\bf util::array}$<$ A $>$ $>$ $>$ mln::labeling::blobs\_\-and\_\-compute (
\begin{DoxyParamCaption}
\item[{const Image$<$ I $>$ \&}]{ input, }
\item[{const Neighborhood$<$ N $>$ \&}]{ nbh, }
\item[{L \&}]{ nlabels, }
\item[{const Accumulator$<$ A $>$ \&}]{ accu}
\end{DoxyParamCaption}
)}}
\label{d0/d3f/a02630_ac68778afbd68e72dc2089b4fe55fb6a1}
Label an image and compute given accumulators.


\begin{DoxyParams}{Parameters}
\item[\mbox{\tt[in]} {\em input}]A binary image. \item[\mbox{\tt[in]} {\em nbh}]A neighborhood used for labeling. \item[\mbox{\tt[in,out]} {\em nlabels}]The number of labels found. \item[\mbox{\tt[in]} {\em accu}]An accumulator to be computed while labeling.\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The labeled image, computed attributes for each regions and an array of the accumulators used to compute the attributes. 
\end{DoxyReturn}


Definition at line 160 of file blobs\_\-and\_\-compute.hh.



References blobs(), and mln::make::couple().

\hypertarget{a02630_adbb61d9ab8f8dd6086b4049413206d18}{
\index{mln::labeling@{mln::labeling}!colorize@{colorize}}
\index{colorize@{colorize}!mln::labeling@{mln::labeling}}
\subsubsection[{colorize}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename V , typename L $>$ mln::trait::ch\_\-value$<$ L, V $>$::ret mln::labeling::colorize (
\begin{DoxyParamCaption}
\item[{const V \&}]{ value, }
\item[{const Image$<$ L $>$ \&}]{ labeled\_\-image, }
\item[{const typename L::value \&}]{ nlabels}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d0/d3f/a02630_adbb61d9ab8f8dd6086b4049413206d18}


Create a new color image from a labeled image and fill each component with a random color. 

litera::black is used for component 0, e.g. the background. Min and max values for RGB values can be set through the global variables mln::labeling::colorize\_\-::min\_\-value and mln::labeling::colorize\_\-::max\_\-value.


\begin{DoxyParams}{Parameters}
\item[\mbox{\tt[in]} {\em value}]value type used in the returned image. \item[\mbox{\tt[in]} {\em \hyperlink{a00256}{labeled\_\-image}}]A labeled image (\end{DoxyParams}
\begin{DoxySeeAlso}{See also}
\hyperlink{a02630_aaef8630659f1fc38b900d6f698b7259b}{labeling::blobs}). 
\end{DoxySeeAlso}

\begin{DoxyParams}{Parameters}
\item[\mbox{\tt[in]} {\em nlabels}]Number of labels. \end{DoxyParams}


Definition at line 190 of file colorize.hh.



References mln::literal::black, and mln::data::transform().



Referenced by colorize().

\hypertarget{a02630_a44d7b69f2fc6bb31c223ab4a94d9a3fa}{
\index{mln::labeling@{mln::labeling}!colorize@{colorize}}
\index{colorize@{colorize}!mln::labeling@{mln::labeling}}
\subsubsection[{colorize}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename V , typename L $>$ mln::trait::ch\_\-value$<$ L, V $>$::ret mln::labeling::colorize (
\begin{DoxyParamCaption}
\item[{const V \&}]{ value, }
\item[{const Image$<$ L $>$ \&}]{ labeled\_\-image}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d0/d3f/a02630_a44d7b69f2fc6bb31c223ab4a94d9a3fa}
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. 

Definition at line 228 of file colorize.hh.



References colorize(), and compute().

\hypertarget{a02630_a4e4ad3e8d3fe0db936ddd9f8774c1c7f}{
\index{mln::labeling@{mln::labeling}!colorize@{colorize}}
\index{colorize@{colorize}!mln::labeling@{mln::labeling}}
\subsubsection[{colorize}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename L $>$ mln::trait::ch\_\-value$<$ L, {\bf mln::value::rgb8} $>$::ret mln::labeling::colorize (
\begin{DoxyParamCaption}
\item[{const Image$<$ L $>$ \&}]{ input, }
\item[{const typename L::value \&}]{ nlabels}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d0/d3f/a02630_a4e4ad3e8d3fe0db936ddd9f8774c1c7f}
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. 

Definition at line 247 of file colorize.hh.



References colorize().

\hypertarget{a02630_af4caa7ecc88aef0de3fa6799c18766c5}{
\index{mln::labeling@{mln::labeling}!compute@{compute}}
\index{compute@{compute}!mln::labeling@{mln::labeling}}
\subsubsection[{compute}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A , typename I , typename L $>$ {\bf util::array}$<$ mln\_\-meta\_\-accu\_\-result(A, typename I::value)$>$ mln::labeling::compute (
\begin{DoxyParamCaption}
\item[{const Meta\_\-Accumulator$<$ A $>$ \&}]{ a, }
\item[{const Image$<$ I $>$ \&}]{ input, }
\item[{const Image$<$ L $>$ \&}]{ label, }
\item[{const typename L::value \&}]{ nlabels}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d0/d3f/a02630_af4caa7ecc88aef0de3fa6799c18766c5}


Compute an accumulator onto the pixel values of the image {\ttfamily input}. 

for each component of the image {\ttfamily label}.


\begin{DoxyParams}{Parameters}
\item[\mbox{\tt[in]} {\em a}]A meta-\/accumulator. \item[\mbox{\tt[in]} {\em input}]The input image. \item[\mbox{\tt[in]} {\em label}]The labeled image. \item[\mbox{\tt[in]} {\em nlabels}]The number of labels in {\ttfamily label}. \end{DoxyParams}
\begin{DoxyReturn}{Returns}
A \hyperlink{a00027}{util::array} of accumulator result (one result per label). 
\end{DoxyReturn}


Definition at line 734 of file labeling/compute.hh.



References compute().

\hypertarget{a02630_a23b40dd9a6e1144c46d5c86754f7433c}{
\index{mln::labeling@{mln::labeling}!compute@{compute}}
\index{compute@{compute}!mln::labeling@{mln::labeling}}
\subsubsection[{compute}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A , typename L $>$ {\bf util::array}$<$ typename A::result $>$ mln::labeling::compute (
\begin{DoxyParamCaption}
\item[{const Accumulator$<$ A $>$ \&}]{ a, }
\item[{const Image$<$ L $>$ \&}]{ label, }
\item[{const typename L::value \&}]{ nlabels}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d0/d3f/a02630_a23b40dd9a6e1144c46d5c86754f7433c}


Compute an accumulator onto the pixel sites of each component domain of {\ttfamily label}. 


\begin{DoxyParams}{Parameters}
\item[\mbox{\tt[in]} {\em a}]An accumulator. \item[\mbox{\tt[in]} {\em label}]The labeled image. \item[\mbox{\tt[in]} {\em nlabels}]The number of labels in {\ttfamily label}. \end{DoxyParams}
\begin{DoxyReturn}{Returns}
A \hyperlink{a00027}{util::array} of accumulator result (one result per label). 
\end{DoxyReturn}


Definition at line 771 of file labeling/compute.hh.

\hypertarget{a02630_ac3cb7ac90ca7bf02ef992a8f0dda96e0}{
\index{mln::labeling@{mln::labeling}!compute@{compute}}
\index{compute@{compute}!mln::labeling@{mln::labeling}}
\subsubsection[{compute}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A , typename L $>$ {\bf util::array}$<$ mln\_\-meta\_\-accu\_\-result(A, typename L::psite)$>$ mln::labeling::compute (
\begin{DoxyParamCaption}
\item[{const Meta\_\-Accumulator$<$ A $>$ \&}]{ a, }
\item[{const Image$<$ L $>$ \&}]{ label, }
\item[{const typename L::value \&}]{ nlabels}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d0/d3f/a02630_ac3cb7ac90ca7bf02ef992a8f0dda96e0}


Compute an accumulator onto the pixel sites of each component domain of {\ttfamily label}. 


\begin{DoxyParams}{Parameters}
\item[\mbox{\tt[in]} {\em a}]A meta-\/accumulator. \item[\mbox{\tt[in]} {\em label}]The labeled image. \item[\mbox{\tt[in]} {\em nlabels}]The number of labels in {\ttfamily label}. \end{DoxyParams}
\begin{DoxyReturn}{Returns}
A \hyperlink{a00027}{util::array} of accumulator result (one result per label). 
\end{DoxyReturn}


Definition at line 792 of file labeling/compute.hh.



References compute().

\hypertarget{a02630_a3f888189712c272a6cb55c0e1685ed45}{
\index{mln::labeling@{mln::labeling}!compute@{compute}}
\index{compute@{compute}!mln::labeling@{mln::labeling}}
\subsubsection[{compute}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A , typename I , typename L $>$ {\bf util::array}$<$ typename A::result $>$ mln::labeling::compute (
\begin{DoxyParamCaption}
\item[{util::array$<$ A $>$ \&}]{ a, }
\item[{const Image$<$ I $>$ \&}]{ input, }
\item[{const Image$<$ L $>$ \&}]{ label, }
\item[{const typename L::value \&}]{ nlabels}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d0/d3f/a02630_a3f888189712c272a6cb55c0e1685ed45}


Compute an accumulator onto the pixel values of the image {\ttfamily input}. 

for each component of the image {\ttfamily label}.


\begin{DoxyParams}{Parameters}
\item[\mbox{\tt[in]} {\em a}]An array of accumulator. \item[\mbox{\tt[in]} {\em input}]The input image. \item[\mbox{\tt[in]} {\em label}]The labeled image. \item[\mbox{\tt[in]} {\em nlabels}]The number of labels in {\ttfamily label}. \end{DoxyParams}
\begin{DoxyReturn}{Returns}
A \hyperlink{a00027}{util::array} of accumulator result (one result per label). 
\end{DoxyReturn}


Definition at line 696 of file labeling/compute.hh.

\hypertarget{a02630_a1ac252bc27ff64d56f53c60ebb99afe1}{
\index{mln::labeling@{mln::labeling}!compute@{compute}}
\index{compute@{compute}!mln::labeling@{mln::labeling}}
\subsubsection[{compute}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A , typename I , typename L $>$ {\bf util::array}$<$ typename A::result $>$ mln::labeling::compute (
\begin{DoxyParamCaption}
\item[{const Accumulator$<$ A $>$ \&}]{ a, }
\item[{const Image$<$ I $>$ \&}]{ input, }
\item[{const Image$<$ L $>$ \&}]{ label, }
\item[{const typename L::value \&}]{ nlabels}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d0/d3f/a02630_a1ac252bc27ff64d56f53c60ebb99afe1}


Compute an accumulator onto the pixel values of the image {\ttfamily input}. 

for each component of the image {\ttfamily label}.


\begin{DoxyParams}{Parameters}
\item[\mbox{\tt[in]} {\em a}]An accumulator. \item[\mbox{\tt[in]} {\em input}]The input image. \item[\mbox{\tt[in]} {\em label}]The labeled image. \item[\mbox{\tt[in]} {\em nlabels}]The number of labels in {\ttfamily label}. \end{DoxyParams}
\begin{DoxyReturn}{Returns}
A \hyperlink{a00027}{util::array} of accumulator result (one result per label). 
\end{DoxyReturn}


Definition at line 715 of file labeling/compute.hh.



Referenced by colorize(), compute(), compute\_\-image(), fill\_\-holes(), mln::make::p\_\-edges\_\-with\_\-mass\_\-centers(), mln::make::p\_\-vertices\_\-with\_\-mass\_\-centers(), pack(), and pack\_\-inplace().

\hypertarget{a02630_acc65facf81e5090b309be249990057bc}{
\index{mln::labeling@{mln::labeling}!compute\_\-image@{compute\_\-image}}
\index{compute\_\-image@{compute\_\-image}!mln::labeling@{mln::labeling}}
\subsubsection[{compute\_\-image}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A , typename I , typename L $>$ mln::trait::ch\_\-value$<$ L , typename A ::result $>$::ret mln::labeling::compute\_\-image (
\begin{DoxyParamCaption}
\item[{const util::array$<$ typename A::result $>$ \&}]{ a, }
\item[{const Image$<$ I $>$ \&}]{ input, }
\item[{const Image$<$ L $>$ \&}]{ labels, }
\item[{const typename L::value \&}]{ nlabels}
\end{DoxyParamCaption}
)}}
\label{d0/d3f/a02630_acc65facf81e5090b309be249990057bc}


Compute an accumulator onto the pixel values of the image {\ttfamily input}. 

for each component of the image {\ttfamily label}.


\begin{DoxyParams}{Parameters}
\item[\mbox{\tt[in]} {\em a}]The \hyperlink{a00300}{mln::p\_\-array} of accumulator result. \item[\mbox{\tt[in]} {\em input}]The input image (values). \item[\mbox{\tt[in]} {\em labels}]The label image. \item[\mbox{\tt[in]} {\em nlabels}]The count of labels.\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The image where labels are replaced by the result of the accumulator. 
\end{DoxyReturn}


Referenced by compute\_\-image().

\hypertarget{a02630_a73b0f6c9b9b9e6c3b3266fbd07db1a31}{
\index{mln::labeling@{mln::labeling}!compute\_\-image@{compute\_\-image}}
\index{compute\_\-image@{compute\_\-image}!mln::labeling@{mln::labeling}}
\subsubsection[{compute\_\-image}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A , typename I , typename L $>$ mln::trait::ch\_\-value$<$ L, typename A::result $>$::ret mln::labeling::compute\_\-image (
\begin{DoxyParamCaption}
\item[{const Accumulator$<$ A $>$ \&}]{ accu, }
\item[{const Image$<$ I $>$ \&}]{ input, }
\item[{const Image$<$ L $>$ \&}]{ labels, }
\item[{const typename L::value \&}]{ nlabels}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d0/d3f/a02630_a73b0f6c9b9b9e6c3b3266fbd07db1a31}


Compute an accumulator onto the pixel values of the image {\ttfamily input}. 

for each component of the image {\ttfamily label}.


\begin{DoxyParams}{Parameters}
\item[\mbox{\tt[in]} {\em accu}]The accumulator. \item[\mbox{\tt[in]} {\em input}]The input image (values). \item[\mbox{\tt[in]} {\em labels}]The label image. \item[\mbox{\tt[in]} {\em nlabels}]The count of labels.\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The image where labels are replaced by the result of the accumulator. 
\end{DoxyReturn}


Definition at line 161 of file compute\_\-image.hh.



References compute(), and compute\_\-image().

\hypertarget{a02630_a2736ee0faaec978ba04be6c9fddee8c7}{
\index{mln::labeling@{mln::labeling}!compute\_\-image@{compute\_\-image}}
\index{compute\_\-image@{compute\_\-image}!mln::labeling@{mln::labeling}}
\subsubsection[{compute\_\-image}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A , typename I , typename L $>$ mln::trait::ch\_\-value$<$ L, typename mln::internal::meta\_\-accu\_\-ret\_\-result\_\-helper$<$ A, typename I::value $>$::result $>$::ret mln::labeling::compute\_\-image (
\begin{DoxyParamCaption}
\item[{const Meta\_\-Accumulator$<$ A $>$ \&}]{ accu, }
\item[{const Image$<$ I $>$ \&}]{ input, }
\item[{const Image$<$ L $>$ \&}]{ labels, }
\item[{const typename L::value \&}]{ nlabels}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d0/d3f/a02630_a2736ee0faaec978ba04be6c9fddee8c7}


Compute an accumulator onto the pixel values of the image {\ttfamily input}. 

for each component of the image {\ttfamily label}.


\begin{DoxyParams}{Parameters}
\item[\mbox{\tt[in]} {\em accu}]The meta-\/accumulator. \item[\mbox{\tt[in]} {\em input}]The input image (values). \item[\mbox{\tt[in]} {\em labels}]The label image. \item[\mbox{\tt[in]} {\em nlabels}]The count of labels.\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The image where labels are replaced by the result of the accumulator. 
\end{DoxyReturn}


Definition at line 181 of file compute\_\-image.hh.



References compute(), and compute\_\-image().

\hypertarget{a02630_aef1649904ead819f9557994af2e99122}{
\index{mln::labeling@{mln::labeling}!fill\_\-holes@{fill\_\-holes}}
\index{fill\_\-holes@{fill\_\-holes}!mln::labeling@{mln::labeling}}
\subsubsection[{fill\_\-holes}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename I , typename N , typename L $>$ mln::trait::concrete$<$ I $>$::ret mln::labeling::fill\_\-holes (
\begin{DoxyParamCaption}
\item[{const Image$<$ I $>$ \&}]{ input, }
\item[{const Neighborhood$<$ N $>$ \&}]{ nbh, }
\item[{L \&}]{ nlabels}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d0/d3f/a02630_aef1649904ead819f9557994af2e99122}


Filling holes of a single object in a binary image. 


\begin{DoxyParams}{Parameters}
\item[\mbox{\tt[in]} {\em input}]The input image. \item[\mbox{\tt[in]} {\em nbh}]The connexity of the background. \item[\mbox{\tt[out]} {\em nlabels}]The number of labels. \end{DoxyParams}
\begin{DoxyReturn}{Returns}
The binary image with a simple object without holes.
\end{DoxyReturn}
\begin{DoxyPrecond}{Precondition}
The input image has to be binary (checked at compile-\/time).
\end{DoxyPrecond}
This routine actually calls \hyperlink{a02630_abf523b1cb719d5fcc109a1e35ad22bd8}{mln::labeling::background}

\begin{DoxySeeAlso}{See also}
\hyperlink{a02630_abf523b1cb719d5fcc109a1e35ad22bd8}{mln::labeling::background} 
\end{DoxySeeAlso}


Definition at line 73 of file fill\_\-holes.hh.



References background(), compute(), mln::util::array$<$ T $>$::nelements(), and mln::data::transform().

\hypertarget{a02630_aa0d36f289617995589937f089b16ac17}{
\index{mln::labeling@{mln::labeling}!flat\_\-zones@{flat\_\-zones}}
\index{flat\_\-zones@{flat\_\-zones}!mln::labeling@{mln::labeling}}
\subsubsection[{flat\_\-zones}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename I , typename N , typename L $>$ mln::trait::ch\_\-value$<$ I, L $>$::ret mln::labeling::flat\_\-zones (
\begin{DoxyParamCaption}
\item[{const Image$<$ I $>$ \&}]{ input, }
\item[{const Neighborhood$<$ N $>$ \&}]{ nbh, }
\item[{L \&}]{ nlabels}
\end{DoxyParamCaption}
)}}
\label{d0/d3f/a02630_aa0d36f289617995589937f089b16ac17}


Connected component labeling of the flat zones of an image. 


\begin{DoxyParams}{Parameters}
\item[\mbox{\tt[in]} {\em input}]The input image. \item[\mbox{\tt[in]} {\em nbh}]The connexity of the flat zones. \item[\mbox{\tt[out]} {\em nlabels}]The number of labels. \end{DoxyParams}
\begin{DoxyReturn}{Returns}
The label image. 
\end{DoxyReturn}


Definition at line 124 of file flat\_\-zones.hh.

\hypertarget{a02630_a119fd66662fc90fc77f89e9a733abc9c}{
\index{mln::labeling@{mln::labeling}!foreground@{foreground}}
\index{foreground@{foreground}!mln::labeling@{mln::labeling}}
\subsubsection[{foreground}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename I , typename N , typename L $>$ mln::trait::ch\_\-value$<$ I, L $>$::ret mln::labeling::foreground (
\begin{DoxyParamCaption}
\item[{const Image$<$ I $>$ \&}]{ input, }
\item[{const Neighborhood$<$ N $>$ \&}]{ nbh, }
\item[{L \&}]{ nlabels}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d0/d3f/a02630_a119fd66662fc90fc77f89e9a733abc9c}
Connected component labeling of the object part in a binary image.


\begin{DoxyParams}{Parameters}
\item[\mbox{\tt[in]} {\em input}]The input image. \item[\mbox{\tt[in]} {\em nbh}]The connexity of the foreground. \item[\mbox{\tt[out]} {\em nlabels}]The number of labels. \end{DoxyParams}
\begin{DoxyReturn}{Returns}
The label image.
\end{DoxyReturn}
\begin{DoxyPrecond}{Precondition}
The input image has to be binary (checked at compile-\/time).
\end{DoxyPrecond}
This routine actually calls \hyperlink{a02630_aa2463df9fff3602ea069800458bfd9cc}{mln::labeling::value} with the value set to {\ttfamily true}.

\begin{DoxySeeAlso}{See also}
\hyperlink{a02630_aa2463df9fff3602ea069800458bfd9cc}{mln::labeling::value} 
\end{DoxySeeAlso}


Definition at line 69 of file foreground.hh.



References value().

\hypertarget{a02630_a6d73675fbf4a27323d9d7381176bb745}{
\index{mln::labeling@{mln::labeling}!pack@{pack}}
\index{pack@{pack}!mln::labeling@{mln::labeling}}
\subsubsection[{pack}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename I $>$ mln::trait::concrete$<$ I $>$::ret mln::labeling::pack (
\begin{DoxyParamCaption}
\item[{const Image$<$ I $>$ \&}]{ label, }
\item[{typename I::value \&}]{ new\_\-nlabels, }
\item[{fun::i2v::array$<$ typename I::value $>$ \&}]{ repack\_\-fun}
\end{DoxyParamCaption}
)}}
\label{d0/d3f/a02630_a6d73675fbf4a27323d9d7381176bb745}


Relabel a labeled image in order to have a contiguous labeling. 


\begin{DoxyParams}{Parameters}
\item[\mbox{\tt[in]} {\em label}]The labeled image. \item[\mbox{\tt[out]} {\em new\_\-nlabels}]The number of labels after relabeling. \item[\mbox{\tt[out]} {\em repack\_\-fun}]The function used to repack the labels.\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The relabeled image. 
\end{DoxyReturn}


Definition at line 124 of file pack.hh.



References compute(), mln::make::relabelfun(), and mln::data::transform().



Referenced by pack().

\hypertarget{a02630_a0850136899d8c5239f10bc0379f92a74}{
\index{mln::labeling@{mln::labeling}!pack@{pack}}
\index{pack@{pack}!mln::labeling@{mln::labeling}}
\subsubsection[{pack}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename I $>$ mln::trait::concrete$<$ I $>$::ret mln::labeling::pack (
\begin{DoxyParamCaption}
\item[{const Image$<$ I $>$ \&}]{ label, }
\item[{typename I::value \&}]{ new\_\-nlabels}
\end{DoxyParamCaption}
)}}
\label{d0/d3f/a02630_a0850136899d8c5239f10bc0379f92a74}
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. 

Definition at line 115 of file pack.hh.



References pack().

\hypertarget{a02630_ad066cdf374c1081c15bbeec2716f5d9c}{
\index{mln::labeling@{mln::labeling}!pack\_\-inplace@{pack\_\-inplace}}
\index{pack\_\-inplace@{pack\_\-inplace}!mln::labeling@{mln::labeling}}
\subsubsection[{pack\_\-inplace}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename I $>$ void mln::labeling::pack\_\-inplace (
\begin{DoxyParamCaption}
\item[{Image$<$ I $>$ \&}]{ label, }
\item[{typename I::value \&}]{ new\_\-nlabels}
\end{DoxyParamCaption}
)}}
\label{d0/d3f/a02630_ad066cdf374c1081c15bbeec2716f5d9c}
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. 

Definition at line 148 of file pack.hh.



References pack\_\-inplace().

\hypertarget{a02630_adfaad5153ab73c6c4a560036f0d56363}{
\index{mln::labeling@{mln::labeling}!pack\_\-inplace@{pack\_\-inplace}}
\index{pack\_\-inplace@{pack\_\-inplace}!mln::labeling@{mln::labeling}}
\subsubsection[{pack\_\-inplace}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename I $>$ void mln::labeling::pack\_\-inplace (
\begin{DoxyParamCaption}
\item[{Image$<$ I $>$ \&}]{ label, }
\item[{typename I::value \&}]{ new\_\-nlabels, }
\item[{fun::i2v::array$<$ typename I::value $>$ \&}]{ repack\_\-fun}
\end{DoxyParamCaption}
)}}
\label{d0/d3f/a02630_adfaad5153ab73c6c4a560036f0d56363}


Relabel inplace a labeled image in order to have a contiguous labeling. 


\begin{DoxyParams}{Parameters}
\item[\mbox{\tt[in]} {\em label}]The labeled image. \item[\mbox{\tt[out]} {\em new\_\-nlabels}]The number of labels after relabeling. \item[\mbox{\tt[out]} {\em repack\_\-fun}]The function used to repack the labels. \end{DoxyParams}


Definition at line 157 of file pack.hh.



References compute(), mln::make::relabelfun(), and mln::data::transform().



Referenced by pack\_\-inplace().

\hypertarget{a02630_a000a28dd0dda7730c1a7fd2be647e8a4}{
\index{mln::labeling@{mln::labeling}!regional\_\-maxima@{regional\_\-maxima}}
\index{regional\_\-maxima@{regional\_\-maxima}!mln::labeling@{mln::labeling}}
\subsubsection[{regional\_\-maxima}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename I , typename N , typename L $>$ mln::trait::ch\_\-value$<$ I, L $>$::ret mln::labeling::regional\_\-maxima (
\begin{DoxyParamCaption}
\item[{const Image$<$ I $>$ \&}]{ input, }
\item[{const Neighborhood$<$ N $>$ \&}]{ nbh, }
\item[{L \&}]{ nlabels}
\end{DoxyParamCaption}
)}}
\label{d0/d3f/a02630_a000a28dd0dda7730c1a7fd2be647e8a4}
Connected component labeling of the regional maxima of an image.


\begin{DoxyParams}{Parameters}
\item[\mbox{\tt[in]} {\em input}]The input image. \item[\mbox{\tt[in]} {\em nbh}]The connexity of the regional maxima. \item[\mbox{\tt[out]} {\em nlabels}]The number of labeled regions. \end{DoxyParams}
\begin{DoxyReturn}{Returns}
The label image. 
\end{DoxyReturn}


Definition at line 130 of file regional\_\-maxima.hh.

\hypertarget{a02630_aa75e876604a2960c22139b59965edefd}{
\index{mln::labeling@{mln::labeling}!regional\_\-minima@{regional\_\-minima}}
\index{regional\_\-minima@{regional\_\-minima}!mln::labeling@{mln::labeling}}
\subsubsection[{regional\_\-minima}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename I , typename N , typename L $>$ mln::trait::ch\_\-value$<$ I, L $>$::ret mln::labeling::regional\_\-minima (
\begin{DoxyParamCaption}
\item[{const Image$<$ I $>$ \&}]{ input, }
\item[{const Neighborhood$<$ N $>$ \&}]{ nbh, }
\item[{L \&}]{ nlabels}
\end{DoxyParamCaption}
)}}
\label{d0/d3f/a02630_aa75e876604a2960c22139b59965edefd}
Connected component labeling of the regional minima of an image.


\begin{DoxyParams}{Parameters}
\item[\mbox{\tt[in]} {\em input}]The input image. \item[\mbox{\tt[in]} {\em nbh}]The connexity of the regional minima. \item[\mbox{\tt[out]} {\em nlabels}]The number of labeled regions. \end{DoxyParams}
\begin{DoxyReturn}{Returns}
The label image. 
\end{DoxyReturn}


Definition at line 140 of file regional\_\-minima.hh.



Referenced by mln::morpho::meyer\_\-wst().

\hypertarget{a02630_a25622fdab81544f1e10cfad30a3d618e}{
\index{mln::labeling@{mln::labeling}!relabel@{relabel}}
\index{relabel@{relabel}!mln::labeling@{mln::labeling}}
\subsubsection[{relabel}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename I , typename F $>$ mln::trait::concrete$<$ I $>$::ret mln::labeling::relabel (
\begin{DoxyParamCaption}
\item[{const Image$<$ I $>$ \&}]{ label, }
\item[{const typename I::value \&}]{ nlabels, }
\item[{typename I::value \&}]{ new\_\-nlabels, }
\item[{const Function\_\-v2b$<$ F $>$ \&}]{ fv2b}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d0/d3f/a02630_a25622fdab81544f1e10cfad30a3d618e}


Remove components and relabel a labeled image. 


\begin{DoxyParams}{Parameters}
\item[\mbox{\tt[in]} {\em label}]the labeled image. \item[\mbox{\tt[in]} {\em nlabels}]the number of labels in {\ttfamily label}. \item[\mbox{\tt[out]} {\em new\_\-nlabels}]the number of labels after relabeling. \item[\mbox{\tt[in]} {\em fv2b}]function returning whether a label must be replaced by the background.\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the relabeled image. 
\end{DoxyReturn}


Definition at line 200 of file relabel.hh.



References mln::make::relabelfun().



Referenced by superpose().

\hypertarget{a02630_a466a70953a9a946efed0e32f77c6b82e}{
\index{mln::labeling@{mln::labeling}!relabel@{relabel}}
\index{relabel@{relabel}!mln::labeling@{mln::labeling}}
\subsubsection[{relabel}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename I , typename F $>$ mln::trait::concrete$<$ I $>$::ret mln::labeling::relabel (
\begin{DoxyParamCaption}
\item[{const Image$<$ I $>$ \&}]{ label, }
\item[{const typename I::value \&}]{ nlabels, }
\item[{const Function\_\-v2v$<$ F $>$ \&}]{ fv2v}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d0/d3f/a02630_a466a70953a9a946efed0e32f77c6b82e}


Remove components and relabel a labeled image. 


\begin{DoxyParams}{Parameters}
\item[\mbox{\tt[in]} {\em label}]the labeled image. \item[\mbox{\tt[in]} {\em nlabels}]the number of labels in {\ttfamily label}. \item[\mbox{\tt[in]} {\em fv2v}]function returning the new component id for each pixel value.\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the relabeled image. 
\end{DoxyReturn}


Definition at line 179 of file relabel.hh.



References mln::data::transform().

\hypertarget{a02630_a056a0654a28c83e6c4569a162783dc1c}{
\index{mln::labeling@{mln::labeling}!relabel\_\-inplace@{relabel\_\-inplace}}
\index{relabel\_\-inplace@{relabel\_\-inplace}!mln::labeling@{mln::labeling}}
\subsubsection[{relabel\_\-inplace}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename I , typename F $>$ void mln::labeling::relabel\_\-inplace (
\begin{DoxyParamCaption}
\item[{Image$<$ I $>$ \&}]{ label, }
\item[{const typename I::value \&}]{ nlabels, }
\item[{const Function\_\-v2v$<$ F $>$ \&}]{ fv2v}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d0/d3f/a02630_a056a0654a28c83e6c4569a162783dc1c}


Remove components and relabel a labeled image inplace. 


\begin{DoxyParams}{Parameters}
\item[\mbox{\tt[in,out]} {\em label}]the labeled image. \item[\mbox{\tt[in]} {\em nlabels}]the number of labels in {\ttfamily label}. \item[\mbox{\tt[in]} {\em fv2v}]function returning the new component id for each pixel value. \end{DoxyParams}


Definition at line 221 of file relabel.hh.



References mln::data::transform\_\-inplace().

\hypertarget{a02630_a0090b0318adbed61bf417f0d1f6bb5bc}{
\index{mln::labeling@{mln::labeling}!relabel\_\-inplace@{relabel\_\-inplace}}
\index{relabel\_\-inplace@{relabel\_\-inplace}!mln::labeling@{mln::labeling}}
\subsubsection[{relabel\_\-inplace}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename I , typename F $>$ void mln::labeling::relabel\_\-inplace (
\begin{DoxyParamCaption}
\item[{Image$<$ I $>$ \&}]{ label, }
\item[{const typename I::value \&}]{ nlabels, }
\item[{const Function\_\-v2b$<$ F $>$ \&}]{ fv2b}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d0/d3f/a02630_a0090b0318adbed61bf417f0d1f6bb5bc}


Remove components and relabel a labeled image inplace. 


\begin{DoxyParams}{Parameters}
\item[\mbox{\tt[in,out]} {\em label}]the labeled image. \item[\mbox{\tt[in]} {\em nlabels}]the number of labels in {\ttfamily label}. \item[\mbox{\tt[in]} {\em fv2b}]function returning whether a label must be replaced by the background. \end{DoxyParams}


Definition at line 240 of file relabel.hh.



References mln::make::relabelfun().



Referenced by mln::labeled\_\-image\_\-base$<$ I, E $>$::relabel().

\hypertarget{a02630_ab379e1c37de7694343d8d716795862b8}{
\index{mln::labeling@{mln::labeling}!superpose@{superpose}}
\index{superpose@{superpose}!mln::labeling@{mln::labeling}}
\subsubsection[{superpose}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename I , typename J $>$ mln::trait::concrete$<$ I $>$::ret mln::labeling::superpose (
\begin{DoxyParamCaption}
\item[{const Image$<$ I $>$ \&}]{ lhs, }
\item[{const typename I::value \&}]{ lhs\_\-nlabels, }
\item[{const Image$<$ J $>$ \&}]{ rhs, }
\item[{const typename J::value \&}]{ rhs\_\-nlabels, }
\item[{typename I::value \&}]{ new\_\-nlabels}
\end{DoxyParamCaption}
)}}
\label{d0/d3f/a02630_ab379e1c37de7694343d8d716795862b8}


Superpose two labeled image. 

Labels in {\ttfamily lhs} are preserved in the output. Labels of {\ttfamily rhs} are renumbered from the last label value of {\ttfamily lhs}. It avoids duplicate label values in several components.


\begin{DoxyParams}{Parameters}
\item[\mbox{\tt[in]} {\em lhs}]A labeled image. \item[\mbox{\tt[in]} {\em lhs\_\-nlabels}]The number of labels in {\ttfamily lhs}. \item[\mbox{\tt[in]} {\em rhs}]A labeled image. \item[\mbox{\tt[in]} {\em rhs\_\-nlabels}]The number of labels in {\ttfamily rhs}. \item[\mbox{\tt[out]} {\em new\_\-nlabels}]The number of labels in the output image.\end{DoxyParams}
\begin{DoxyReturn}{Returns}
An image with all the components of {\ttfamily rhs} and {\ttfamily lhs}.
\end{DoxyReturn}
\begin{DoxyPrecond}{Precondition}
{\ttfamily rhs} and lhs must have the same domain. 

{\ttfamily The} value type of rhs must be convertible towards lhs's. 
\end{DoxyPrecond}


Definition at line 83 of file labeling/superpose.hh.



References mln::duplicate(), mln::value::equiv(), mln::data::paste(), relabel(), and mln::literal::zero.

\hypertarget{a02630_aa2463df9fff3602ea069800458bfd9cc}{
\index{mln::labeling@{mln::labeling}!value@{value}}
\index{value@{value}!mln::labeling@{mln::labeling}}
\subsubsection[{value}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename I , typename N , typename L $>$ mln::trait::ch\_\-value$<$ I, L $>$::ret mln::labeling::value (
\begin{DoxyParamCaption}
\item[{const Image$<$ I $>$ \&}]{ input, }
\item[{const typename I::value \&}]{ val, }
\item[{const Neighborhood$<$ N $>$ \&}]{ nbh, }
\item[{L \&}]{ nlabels}
\end{DoxyParamCaption}
)}}
\label{d0/d3f/a02630_aa2463df9fff3602ea069800458bfd9cc}


Connected component labeling of the image sites at a given value. 


\begin{DoxyParams}{Parameters}
\item[\mbox{\tt[in]} {\em input}]The input image. \item[\mbox{\tt[in]} {\em val}]The value to consider. \item[\mbox{\tt[in]} {\em nbh}]The connectivity of components. \item[\mbox{\tt[out]} {\em nlabels}]The number of labels. \end{DoxyParams}
\begin{DoxyReturn}{Returns}
The label image. 
\end{DoxyReturn}


Definition at line 149 of file labeling/value.hh.



Referenced by background(), and foreground().

\hypertarget{a02630_a2a1cc8fb7e5bdc5962e8d5cfe59e4d97}{
\index{mln::labeling@{mln::labeling}!value\_\-and\_\-compute@{value\_\-and\_\-compute}}
\index{value\_\-and\_\-compute@{value\_\-and\_\-compute}!mln::labeling@{mln::labeling}}
\subsubsection[{value\_\-and\_\-compute}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename I , typename N , typename L , typename A $>$ {\bf util::couple}$<$ mln::trait::ch\_\-value$<$ I, L $>$::ret, {\bf util::couple}$<$ {\bf util::array}$<$ typename A::result $>$, {\bf util::array}$<$ A $>$ $>$ $>$ mln::labeling::value\_\-and\_\-compute (
\begin{DoxyParamCaption}
\item[{const Image$<$ I $>$ \&}]{ input, }
\item[{const typename I::value \&}]{ val, }
\item[{const Neighborhood$<$ N $>$ \&}]{ nbh, }
\item[{L \&}]{ nlabels, }
\item[{const Accumulator$<$ A $>$ \&}]{ accu}
\end{DoxyParamCaption}
)}}
\label{d0/d3f/a02630_a2a1cc8fb7e5bdc5962e8d5cfe59e4d97}


Connected component labeling of the image sites at a given value. 


\begin{DoxyParams}{Parameters}
\item[\mbox{\tt[in]} {\em input}]The input image. \item[\mbox{\tt[in]} {\em val}]The value to consider. \item[\mbox{\tt[in]} {\em nbh}]The connectivity of components. \item[\mbox{\tt[out]} {\em nlabels}]The number of labels. \end{DoxyParams}
\begin{DoxyReturn}{Returns}
The label image. 
\end{DoxyReturn}


Definition at line 212 of file value\_\-and\_\-compute.hh.



References mln::make::couple().

\hypertarget{a02630_af15bbc82a3d209353f258c22c139a3c3}{
\index{mln::labeling@{mln::labeling}!wrap@{wrap}}
\index{wrap@{wrap}!mln::labeling@{mln::labeling}}
\subsubsection[{wrap}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename V , typename I $>$ mln::trait::ch\_\-value$<$ I, V $>$::ret mln::labeling::wrap (
\begin{DoxyParamCaption}
\item[{const V \&}]{ value\_\-type, }
\item[{const Image$<$ I $>$ \&}]{ input}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d0/d3f/a02630_af15bbc82a3d209353f258c22c139a3c3}


Wrap labels such as 0 -\/$>$ 0 and \mbox{[}1, lmax\mbox{]} maps to \mbox{[}1, Lmax\mbox{]} (using modulus). 


\begin{DoxyParams}{Parameters}
\item[\mbox{\tt[in]} {\em value\_\-type}]The type used to wrap the label type. \item[\mbox{\tt[in]} {\em input}]The label image.\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A new image with values wrapped with type V. 
\end{DoxyReturn}


Definition at line 75 of file labeling/wrap.hh.



References mln::data::transform().



Referenced by wrap().

\hypertarget{a02630_aed74169632fea4234ca55997646d6a20}{
\index{mln::labeling@{mln::labeling}!wrap@{wrap}}
\index{wrap@{wrap}!mln::labeling@{mln::labeling}}
\subsubsection[{wrap}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename I $>$ mln::trait::ch\_\-value$<$ I, {\bf mln::value::label\_\-8} $>$::ret mln::labeling::wrap (
\begin{DoxyParamCaption}
\item[{const Image$<$ I $>$ \&}]{ input}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d0/d3f/a02630_aed74169632fea4234ca55997646d6a20}


Wrap labels such as 0 -\/$>$ 0 and \mbox{[}1, lmax\mbox{]} maps to \mbox{[}1, Lmax\mbox{]} (using modulus). 

Use label\_\-8 as label type.


\begin{DoxyParams}{Parameters}
\item[\mbox{\tt[in]} {\em input}]The label image.\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A new image with values wrapped with type label\_\-8. 
\end{DoxyReturn}


Definition at line 93 of file labeling/wrap.hh.



References wrap().

