$extrastylesheet
Olena  User documentation 2.1
An Image Processing Platform
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
mln::labeling Namespace Reference

Namespaces

namespace  colorize_
namespace  impl

Functions

template<typename I , typename N , typename L >
mln::trait::ch_value< I, L >::ret background (const Image< I > &input, const Neighborhood< N > &nbh, L &nlabels)
template<typename I , typename N , typename L >
mln::trait::ch_value< I, L >::ret blobs (const Image< I > &input, const Neighborhood< N > &nbh, L &nlabels)
template<typename I , typename N , typename L , typename A >
util::couple
< mln::trait::ch_value< I, L >
::ret, util::couple
< util::array< typename
A::result >, util::array< A > > > 
blobs_and_compute (const Image< I > &input, const Neighborhood< N > &nbh, L &nlabels, const Accumulator< A > &accu)
template<typename V , typename L >
mln::trait::ch_value< L, V >::ret colorize (const V &value, const Image< L > &labeled_image, const typename L::value &nlabels)
template<typename V , typename L >
mln::trait::ch_value< L, V >::ret colorize (const V &value, const Image< L > &labeled_image)
template<typename L >
mln::trait::ch_value< L,
mln::value::rgb8 >::ret 
colorize (const Image< L > &input, const typename L::value &nlabels)
template<typename A , typename I , typename L >
util::array< typename A::result > compute (const Accumulator< A > &a, const Image< I > &input, const Image< L > &label, const typename L::value &nlabels)
template<typename A , typename I , typename L >
util::array< typename
mln::internal::meta_accu_ret_result_helper
< A, typename I::value >
::result > 
compute (const Meta_Accumulator< A > &a, const Image< I > &input, const Image< L > &label, const typename L::value &nlabels)
template<typename A , typename L >
util::array< typename A::result > compute (const Accumulator< A > &a, const Image< L > &label, const typename L::value &nlabels)
template<typename A , typename L >
util::array< typename
mln::internal::meta_accu_ret_result_helper
< A, typename L::psite >
::result > 
compute (const Meta_Accumulator< A > &a, const Image< L > &label, const typename L::value &nlabels)
template<typename A , typename I , typename L >
util::array< typename A::result > compute (util::array< A > &a, const Image< I > &input, const Image< L > &label, const typename L::value &nlabels)
template<typename A , typename I , typename L >
mln::trait::ch_value< L,
typename A::result >::ret 
compute_image (const util::array< typename A::result > &a, const Image< I > &input, const Image< L > &labels, const typename L::value &nlabels)
template<typename A , typename I , typename L >
mln::trait::ch_value< L,
typename A::result >::ret 
compute_image (const Accumulator< A > &accu, const Image< I > &input, const Image< L > &labels, const typename L::value &nlabels)
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 
compute_image (const Meta_Accumulator< A > &accu, const Image< I > &input, const Image< L > &labels, const typename L::value &nlabels)
template<typename I , typename N , typename L >
mln::trait::concrete< I >::ret fill_holes (const Image< I > &input, const Neighborhood< N > &nbh, L &nlabels)
template<typename I , typename N , typename L >
mln::trait::ch_value< I, L >::ret flat_zones (const Image< I > &input, const Neighborhood< N > &nbh, L &nlabels)
template<typename I , typename N , typename L >
mln::trait::ch_value< I, L >::ret foreground (const Image< I > &input, const Neighborhood< N > &nbh, L &nlabels)
template<typename I , typename L >
mln::trait::concrete< I >::ret mean_colors (const Image< I > &input, const Image< L > &lbl, typename L::value nlabels)
template<typename L >
util::array< typename L::value > n_max (const Image< L > &lbl, const typename L::value &nlabels, unsigned n)
template<typename I >
mln::trait::concrete< I >::ret pack (const Image< I > &label, typename I::value &new_nlabels, fun::i2v::array< typename I::value > &repack_fun)
template<typename I >
mln::trait::concrete< I >::ret pack (const Image< I > &label, typename I::value &new_nlabels)
template<typename I >
void pack_inplace (Image< I > &label, typename I::value &new_nlabels, fun::i2v::array< typename I::value > &repack_fun)
template<typename I >
void pack_inplace (Image< I > &label, typename I::value &new_nlabels)
template<typename I , typename N , typename L >
mln::trait::ch_value< I, L >::ret regional_maxima (const Image< I > &input, const Neighborhood< N > &nbh, L &nlabels)
template<typename I , typename N , typename L >
mln::trait::ch_value< I, L >::ret regional_minima (const Image< I > &input, const Neighborhood< N > &nbh, L &nlabels)
template<typename I , typename F >
mln::trait::concrete< I >::ret relabel (const Image< I > &label, const typename I::value &nlabels, typename I::value &new_nlabels, const Function_v2b< F > &fv2b)
template<typename I , typename F >
mln::trait::concrete< I >::ret relabel (const Image< I > &label, const typename I::value &nlabels, const Function_v2v< F > &fv2v)
template<typename I , typename F >
void relabel_inplace (Image< I > &label, const typename I::value &nlabels, const Function_v2b< F > &fv2b)
template<typename I , typename F >
void relabel_inplace (Image< I > &label, const typename I::value &nlabels, const Function_v2v< F > &fv2v)
template<typename I , typename J >
mln::trait::concrete< I >::ret superpose (const Image< I > &lhs, const typename I::value &lhs_nlabels, const Image< J > &rhs, const typename J::value &rhs_nlabels, typename I::value &new_nlabels)
template<typename I , typename N , typename L >
mln::trait::ch_value< I, L >::ret value (const Image< I > &input, const typename I::value &val, const Neighborhood< N > &nbh, L &nlabels)
template<typename I , typename N , typename L , typename A >
util::couple
< mln::trait::ch_value< I, L >
::ret, util::couple
< util::array< typename
A::result >, util::array< A > > > 
value_and_compute (const Image< I > &input, const typename I::value &val, const Neighborhood< N > &nbh, L &nlabels, const Accumulator< A > &accu)
template<typename V , typename I >
mln::trait::ch_value< I, V >::ret wrap (const V &value_type, const Image< I > &input)
template<typename I >
mln::trait::ch_value< I,
mln::value::label_8 >::ret 
wrap (const Image< I > &input)

Detailed Description

Namespace of labeling routines.

Function Documentation

template<typename I , typename N , typename L >
mln::trait::ch_value< I , L >::ret mln::labeling::blobs ( const Image< I > &  input,
const Neighborhood< N > &  nbh,
L &  nlabels 
)

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

Parameters
[in]inputThe input image.
[in]nbhThe connexity of the objects.
[out]nlabelsThe Number of labels. Its value is set in the algorithms.
Returns
The label image.
Precondition
The input image has to be binary (checked at compile-time).

A fast queue is used so that the algorithm is not recursive and can handle large binary objects (blobs).

template<typename I , typename N , typename L , typename A >
util::couple<mln::trait::ch_value< I , L >::ret, util::couple<util::array<typename A ::result>, util::array<A> > > mln::labeling::blobs_and_compute ( const Image< I > &  input,
const Neighborhood< N > &  nbh,
L &  nlabels,
const Accumulator< A > &  accu 
)

Label an image and compute given accumulators.

 \param[in]     input   A binary image.
 \param[in]     nbh     A neighborhood used for labeling.
 \param[in,out] nlabels The number of labels found.
 \param[in]     accu    An accumulator to be computed while labeling.

 \return The labeled image, computed attributes for each regions
         and an array of the accumulators used to compute the
         attributes.
template<typename I , typename N , typename L >
mln::trait::concrete< I >::ret mln::labeling::fill_holes ( const Image< I > &  input,
const Neighborhood< N > &  nbh,
L &  nlabels 
)

Filling holes of a single object in a binary image.

Parameters
[in]inputThe input image.
[in]nbhThe connexity of the background.
[out]nlabelsThe number of labels.
Returns
The binary image with a simple object without holes.
Precondition
The input image has to be binary (checked at compile-time).

This routine actually calls mln::labeling::background

See Also
mln::labeling::background
template<typename I >
void mln::labeling::pack_inplace ( Image< I > &  label,
typename I::value &  new_nlabels,
fun::i2v::array< typename I::value > &  repack_fun 
)

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

Parameters
[in]labelThe labeled image.
[out]new_nlabelsThe number of labels after relabeling.
[out]repack_funThe function used to repack the labels.
template<typename I >
void mln::labeling::pack_inplace ( Image< I > &  label,
typename I::value &  new_nlabels 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.