Namespaces | Classes | Functions | Variables

mln::morpho Namespace Reference

Namespace of mathematical morphology routines. More...

Namespaces

namespace  approx
 

Namespace of approximate mathematical morphology routines.


namespace  attribute
 

Namespace of attributes used in mathematical morphology.


namespace  closing
namespace  elementary
 

Namespace of image processing routines of elementary mathematical morphology.


namespace  impl
 

Namespace of mathematical morphology routines implementations.


namespace  internal
namespace  opening
namespace  reconstruction
 

Namespace of morphological reconstruction routines.


namespace  tree
 

Namespace of morphological tree-related routines.


namespace  watershed
 

Namespace of morphological watershed routines.


Classes

struct  dilation_op
struct  erosion_op

Functions

template<typename I , typename N , typename A >
mln::trait::concrete< I >::ret algebraic_filter (const Image< I > &input, const Neighborhood< N > &nbh, const Accumulator< A > &a, const typename A::result &lambda, bool increasing)
template<typename I >
mln::trait::concrete< I >::ret complementation (const Image< I > &input)
template<typename I >
void complementation_inplace (Image< I > &input)
template<typename I , typename W >
mln::trait::concrete< I >::ret contrast (const Image< I > &input, const Window< W > &win)
template<typename I , typename W >
mln::trait::concrete< I >::ret dilation (const Image< I > &input, const Window< W > &win)
 Morphological dilation.
template<typename I , typename W >
mln::trait::concrete< I >::ret erosion (const Image< I > &input, const Window< W > &win)
 Morphological erosion.
template<typename I , typename W >
mln::trait::concrete< I >::ret erosion_tolerant (const Image< I > &input, const Window< W > &win, unsigned rank)
 Morphological tolerant erosion.
template<typename Op , typename I , typename W >
mln::trait::concrete< I >::ret general (const Op &op, const Image< I > &input, const Window< W > &win)
 Morphological general routine.
template<typename I , typename W >
mln::trait::concrete< I >::ret gradient (const Image< I > &input, const Window< W > &win)
 Morphological gradient.
template<typename I , typename W >
mln::trait::concrete< I >::ret gradient_external (const Image< I > &input, const Window< W > &win)
 Morphological external gradient.
template<typename I , typename W >
mln::trait::concrete< I >::ret gradient_internal (const Image< I > &input, const Window< W > &win)
 Morphological internal gradient.
template<typename I , typename Wh , typename Wm >
mln::trait::concrete< I >::ret hit_or_miss (const Image< I > &input, const Window< Wh > &win_hit, const Window< Wm > &win_miss)
 Morphological hit-or-miss.
template<typename I , typename Wh , typename Wm >
mln::trait::concrete< I >::ret hit_or_miss_background_closing (const Image< I > &input, const Window< Wh > &win_hit, const Window< Wm > &win_miss)
 Morphological hit-or-miss closing of the background.
template<typename I , typename Wh , typename Wm >
mln::trait::concrete< I >::ret hit_or_miss_background_opening (const Image< I > &input, const Window< Wh > &win_hit, const Window< Wm > &win_miss)
 Morphological hit-or-miss opening of the background.
template<typename I , typename Wh , typename Wm >
mln::trait::concrete< I >::ret hit_or_miss_closing (const Image< I > &input, const Window< Wh > &win_hit, const Window< Wm > &win_miss)
 Morphological hit-or-miss closing.
template<typename I , typename Wh , typename Wm >
mln::trait::concrete< I >::ret hit_or_miss_opening (const Image< I > &input, const Window< Wh > &win_hit, const Window< Wm > &win_miss)
 Morphological hit-or-miss opening.
template<typename I , typename W , typename O >
void laplacian (const Image< I > &input, const Window< W > &win, Image< O > &output)
template<typename I , typename N , typename A >
mln::trait::concrete< I >::ret leveling_filter (const Image< I > &input, const Neighborhood< N > &nbh, const Accumulator< A > &a, const typename A::result &lambda, bool increasing)
template<typename V >
edge_image< util::site_pair
< point2d >, V, util::graph
line_gradient (const mln::image2d< V > &ima)
 Create a line graph image representing the gradient norm of a mln::image2d.
template<typename L , typename I , typename N >
mln::trait::ch_value< I, L >::ret meyer_wst (const Image< I > &input, const Neighborhood< N > &nbh, L &nbasins)
 Meyer's Watershed Transform (WST) algorithm.
template<typename L , typename I , typename N >
mln::trait::ch_value< I, L >::ret meyer_wst (const Image< I > &input, const Neighborhood< N > &nbh)
 Meyer's Watershed Transform (WST) algorithm, with no count of basins.
template<typename I , typename J >
mln::trait::concrete< I >::ret min (const Image< I > &lhs, const Image< J > &rhs)
template<typename I , typename J >
void min_inplace (Image< I > &lhs, const Image< J > &rhs)
template<typename I , typename J >
mln::trait::concrete< I >::ret minus (const Image< I > &lhs, const Image< J > &rhs)
template<typename I , typename W >
 mln_trait_op_minus_twice (typename mln::trait::concrete< I >::ret) laplacian(const Image< I > &input
template<typename I , typename J >
mln::trait::concrete< I >::ret plus (const Image< I > &lhs, const Image< J > &rhs)
template<typename I , typename W >
mln::trait::concrete< I >::ret rank_filter (const Image< I > &input, const Window< W > &win, unsigned k)
 Morphological rank_filter.
template<typename I , typename N >
Rd (const Image< I > &f, const Image< I > &g, const Neighborhood< N > &nbh)
template<typename I , typename N , typename F , typename K , typename R >
mln::trait::ch_value< I, bool >
::ret 
skeleton_constrained (const Image< I > &input, const Neighborhood< N > &nbh, const F &is_simple, const Image< K > &constraint, const Image< R > &priority)
template<typename I , typename Wfg , typename Wbg >
mln::trait::concrete< I >::ret thick_miss (const Image< I > &input, const Window< Wfg > &win_fg, const Window< Wbg > &win_bg)
template<typename I , typename Wfg , typename Wbg >
mln::trait::concrete< I >::ret thickening (const Image< I > &input, const Window< Wfg > &win_fg, const Window< Wbg > &win_bg)
template<typename I , typename Wfg , typename Wbg >
mln::trait::concrete< I >::ret thin_fit (const Image< I > &input, const Window< Wfg > &win_fg, const Window< Wbg > &win_bg)
template<typename I , typename Wfg , typename Wbg >
mln::trait::concrete< I >::ret thinning (const Image< I > &input, const Window< Wfg > &win_fg, const Window< Wbg > &win_bg)
 Morphological thinning.
template<typename I , typename W >
mln::trait::concrete< I >::ret top_hat_black (const Image< I > &input, const Window< W > &win)
 Morphological black top-hat (for background / dark objects).
template<typename I , typename W >
mln::trait::concrete< I >::ret top_hat_self_complementary (const Image< I > &input, const Window< W > &win)
 Morphological self-complementary top-hat.
template<typename I , typename W >
mln::trait::concrete< I >::ret top_hat_white (const Image< I > &input, const Window< W > &win)
 Morphological white top-hat (for object / light objects).

Variables

bool constrained_hit_or_miss = true
const Window< W > & win

Detailed Description

Namespace of mathematical morphology routines.


Function Documentation

template<typename I , typename N , typename A >
mln::trait::concrete< I >::ret mln::morpho::algebraic_filter ( const Image< I > &  input,
const Neighborhood< N > &  nbh,
const Accumulator< A > &  a,
const typename A::result &  lambda,
bool  increasing 
)
template<typename I >
mln::trait::concrete< I >::ret mln::morpho::complementation ( const Image< I > &  input  )  [inline]

Morphological complementation: either a logical "not" (if morpho on sets) or an arithmetical complementation (if morpho on functions).

Definition at line 116 of file complementation.hh.

References mln::morpho::impl::complementation_(), mln::trace::entering(), mln::exact(), and mln::trace::exiting().

Referenced by hit_or_miss_background_closing(), hit_or_miss_background_opening(), hit_or_miss_closing(), mln::morpho::impl::hit_or_miss_logic(), and thinning().

template<typename I >
void mln::morpho::complementation_inplace ( Image< I > &  input  )  [inline]

Morphological complementation, inplace version: either a logical "not" (if morpho on sets) or an arithmetical complementation (if morpho on functions).

Definition at line 130 of file complementation.hh.

References mln::morpho::impl::complementation_inplace_(), mln::trace::entering(), mln::exact(), and mln::trace::exiting().

template<typename I , typename W >
mln::trait::concrete< I >::ret mln::morpho::contrast ( const Image< I > &  input,
const Window< W > &  win 
) [inline]

Morphological contrast operator (based on top-hats).

This operator is Id + wth_B - bth_B.

Definition at line 57 of file contrast.hh.

References mln::trace::entering(), mln::exact(), mln::trace::exiting(), plus(), top_hat_black(), and top_hat_white().

template<typename I , typename W >
mln::trait::concrete< I >::ret mln::morpho::dilation ( const Image< I > &  input,
const Window< W > &  win 
) [inline]
template<typename I , typename W >
mln::trait::concrete< I >::ret mln::morpho::erosion ( const Image< I > &  input,
const Window< W > &  win 
) [inline]
template<typename I , typename W >
mln::trait::concrete< I >::ret mln::morpho::erosion_tolerant ( const Image< I > &  input,
const Window< W > &  win,
unsigned  rank 
) [inline]

Morphological tolerant erosion.

Definition at line 200 of file erosion_tolerant.hh.

References mln::trace::entering(), mln::morpho::internal::erosion_tolerant_dispatch(), mln::exact(), and mln::trace::exiting().

template<typename Op , typename I , typename W >
mln::trait::concrete< I >::ret mln::morpho::general ( const Op &  op,
const Image< I > &  input,
const Window< W > &  win 
) [inline]

Morphological general routine.

Definition at line 168 of file general.hh.

References mln::trace::entering(), mln::exact(), mln::trace::exiting(), and mln::morpho::internal::general_tests().

Referenced by dilation(), and erosion().

template<typename I , typename W >
mln::trait::concrete< I >::ret mln::morpho::gradient ( const Image< I > &  input,
const Window< W > &  win 
) [inline]

Morphological gradient.

This operator is d_B - e_B.

Definition at line 76 of file gradient.hh.

References dilation(), mln::trace::entering(), erosion(), mln::exact(), mln::trace::exiting(), minus(), and mln::test::positive().

template<typename I , typename W >
mln::trait::concrete< I >::ret mln::morpho::gradient_external ( const Image< I > &  input,
const Window< W > &  win 
) [inline]

Morphological external gradient.

This operator is d_B - Id.

Definition at line 110 of file gradient.hh.

References dilation(), mln::trace::entering(), mln::exact(), mln::trace::exiting(), minus(), and mln::test::positive().

template<typename I , typename W >
mln::trait::concrete< I >::ret mln::morpho::gradient_internal ( const Image< I > &  input,
const Window< W > &  win 
) [inline]

Morphological internal gradient.

This operator is Id - e_B.

Definition at line 93 of file gradient.hh.

References mln::trace::entering(), erosion(), mln::exact(), mln::trace::exiting(), minus(), and mln::test::positive().

template<typename I , typename Wh , typename Wm >
mln::trait::concrete< I >::ret mln::morpho::hit_or_miss ( const Image< I > &  input,
const Window< Wh > &  win_hit,
const Window< Wm > &  win_miss 
) [inline]

Morphological hit-or-miss.

This operator is HMT_(Bh,Bm) = e_Bh /\ (e_Bm o C).

Definition at line 276 of file hit_or_miss.hh.

References mln::trace::entering(), mln::trace::exiting(), mln::morpho::internal::hit_or_miss_dispatch(), and mln::morpho::internal::hit_or_miss_tests().

Referenced by mln::morpho::internal::hit_or_miss_dispatch(), thickening(), and thinning().

template<typename I , typename Wh , typename Wm >
mln::trait::concrete< I >::ret mln::morpho::hit_or_miss_background_closing ( const Image< I > &  input,
const Window< Wh > &  win_hit,
const Window< Wm > &  win_miss 
) [inline]

Morphological hit-or-miss closing of the background.

This operator is C o HMTopeBG o C.

Definition at line 357 of file hit_or_miss.hh.

References complementation(), mln::trace::entering(), mln::trace::exiting(), hit_or_miss_background_opening(), hit_or_miss_closing(), and mln::morpho::internal::hit_or_miss_tests().

template<typename I , typename Wh , typename Wm >
mln::trait::concrete< I >::ret mln::morpho::hit_or_miss_background_opening ( const Image< I > &  input,
const Window< Wh > &  win_hit,
const Window< Wm > &  win_miss 
) [inline]

Morphological hit-or-miss opening of the background.

This operator is HMTopeBG = HMTope_(Bm,Bh) o C = d_(-Bm) o HMT_(Bh,Bm).

Definition at line 314 of file hit_or_miss.hh.

References complementation(), dilation(), mln::trace::entering(), mln::trace::exiting(), mln::morpho::internal::hit_or_miss_dispatch(), hit_or_miss_opening(), mln::morpho::internal::hit_or_miss_tests(), and mln::win::sym().

Referenced by hit_or_miss_background_closing(), and thick_miss().

template<typename I , typename Wh , typename Wm >
mln::trait::concrete< I >::ret mln::morpho::hit_or_miss_closing ( const Image< I > &  input,
const Window< Wh > &  win_hit,
const Window< Wm > &  win_miss 
) [inline]

Morphological hit-or-miss closing.

This operator is C o HMTope o C.

Definition at line 337 of file hit_or_miss.hh.

References complementation(), mln::trace::entering(), mln::trace::exiting(), hit_or_miss_opening(), and mln::morpho::internal::hit_or_miss_tests().

Referenced by hit_or_miss_background_closing().

template<typename I , typename Wh , typename Wm >
mln::trait::concrete< I >::ret mln::morpho::hit_or_miss_opening ( const Image< I > &  input,
const Window< Wh > &  win_hit,
const Window< Wm > &  win_miss 
) [inline]

Morphological hit-or-miss opening.

This operator is HMTope_(Bh,Bm) = d_(-Bh) o HMT_(Bh,Bm).

Definition at line 294 of file hit_or_miss.hh.

References dilation(), mln::trace::entering(), mln::trace::exiting(), mln::morpho::internal::hit_or_miss_dispatch(), mln::morpho::internal::hit_or_miss_tests(), and mln::win::sym().

Referenced by hit_or_miss_background_opening(), hit_or_miss_closing(), and thin_fit().

template<typename I , typename W , typename O >
void mln::morpho::laplacian ( const Image< I > &  input,
const Window< W > &  win,
Image< O > &  output 
) [inline]

Morphological laplacian.

This operator is (d_B - Id) - (Id - e_B).

Definition at line 63 of file laplacian.hh.

References dilation(), mln::trace::entering(), erosion(), mln::exact(), mln::trace::exiting(), mln::data::fill(), and minus().

template<typename I , typename N , typename A >
mln::trait::concrete< I >::ret mln::morpho::leveling_filter ( const Image< I > &  input,
const Neighborhood< N > &  nbh,
const Accumulator< A > &  a,
const typename A::result &  lambda,
bool  increasing 
)
template<typename V >
edge_image< util::site_pair< point2d >, V, util::graph > mln::morpho::line_gradient ( const mln::image2d< V > &  ima  ) 
template<typename L , typename I , typename N >
mln::trait::ch_value< I, L >::ret mln::morpho::meyer_wst ( const Image< I > &  input,
const Neighborhood< N > &  nbh,
L &  nbasins 
)

Meyer's Watershed Transform (WST) algorithm.

Parameters:
[in] input The input image.
[in] nbh The connexity of markers.
[out] nbasins The number of basins.
  • L is the type of labels, used to number the watershed itself (with the minimal value), and the basins.
  • I is the exact type of the input image.
  • N is the exact type of the neighborhood used to express input's connexity.

Definition at line 108 of file meyer_wst.hh.

References mln::trace::entering(), mln::exact(), mln::trace::exiting(), mln::data::fill(), mln::p_priority< P, Q >::front(), mln::initialize(), mln::internal::site_set_base_< Q::site, p_priority< P, Q > >::is_empty(), mln::p_priority< P, Q >::pop(), mln::p_priority< P, Q >::push(), mln::labeling::regional_minima(), and mln::literal::zero.

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

Meyer's Watershed Transform (WST) algorithm, with no count of basins.

Parameters:
[in] input The input image.
[in] nbh The connexity of markers.
  • L is the type of labels, used to number the watershed itself (with the minimal value), and the basins.
  • I is the exact type of the input image.
  • N is the exact type of the neighborhood used to express input's connexity.

Note that the first parameter, L, is not automatically valued from the type of the actual argument during implicit instantiation: you have to explicitly pass this parameter at call sites.

Definition at line 202 of file meyer_wst.hh.

template<typename I , typename J >
mln::trait::concrete< I >::ret mln::morpho::min ( const Image< I > &  lhs,
const Image< J > &  rhs 
) [inline]

Morphological min: either a logical "and" (if morpho on sets) or an arithmetical min (if morpho on functions).

Definition at line 112 of file morpho/min.hh.

References mln::trace::entering(), mln::exact(), mln::trace::exiting(), and mln::morpho::impl::min_().

Referenced by mln::morpho::impl::min_(), and mln::morpho::attribute::height< I >::take().

template<typename I , typename J >
void mln::morpho::min_inplace ( Image< I > &  lhs,
const Image< J > &  rhs 
) [inline]

Morphological min, inplace version: either a logical "and" (if morpho on sets) or an arithmetical min (if morpho on functions).

Definition at line 125 of file morpho/min.hh.

References mln::trace::entering(), mln::exact(), mln::trace::exiting(), and mln::morpho::impl::min_inplace_().

Referenced by mln::morpho::impl::min_inplace_().

template<typename I , typename J >
mln::trait::concrete< I >::ret mln::morpho::minus ( const Image< I > &  lhs,
const Image< J > &  rhs 
) [inline]
template<typename I , typename W >
mln::morpho::mln_trait_op_minus_twice ( typename mln::trait::concrete< I >::ret   )  const [inline]
template<typename I , typename J >
mln::trait::concrete< I >::ret mln::morpho::plus ( const Image< I > &  lhs,
const Image< J > &  rhs 
) [inline]

Morphological plus: either a "logical or" (if morpho on sets) or an "arithmetical plus" (if morpho on functions).

Definition at line 86 of file morpho/plus.hh.

References mln::trace::entering(), mln::exact(), mln::trace::exiting(), and mln::morpho::impl::plus_().

Referenced by contrast(), thick_miss(), and thickening().

template<typename I , typename W >
mln::trait::concrete< I >::ret mln::morpho::rank_filter ( const Image< I > &  input,
const Window< W > &  win,
unsigned  k 
) [inline]
template<typename I , typename N >
I mln::morpho::Rd ( const Image< I > &  f,
const Image< I > &  g,
const Neighborhood< N > &  nbh 
) [inline]

Definition at line 208 of file Rd.hh.

References mln::exact(), and mln::morpho::impl::Rd< I, N >::o.

template<typename I , typename N , typename F , typename K , typename R >
mln::trait::ch_value< I, bool >::ret mln::morpho::skeleton_constrained ( const Image< I > &  input,
const Neighborhood< N > &  nbh,
const F &  is_simple,
const Image< K > &  constraint,
const Image< R > &  priority 
) [inline]
template<typename I , typename Wfg , typename Wbg >
mln::trait::concrete< I >::ret mln::morpho::thick_miss ( const Image< I > &  input,
const Window< Wfg > &  win_fg,
const Window< Wbg > &  win_bg 
) [inline]

Morphological thick-miss.

This operator is THICK_B = Id + HMTopeBG_B, where B = (Bfg, Bbg).

Definition at line 59 of file thick_miss.hh.

References mln::trace::entering(), mln::exact(), mln::trace::exiting(), hit_or_miss_background_opening(), and plus().

template<typename I , typename Wfg , typename Wbg >
mln::trait::concrete< I >::ret mln::morpho::thickening ( const Image< I > &  input,
const Window< Wfg > &  win_fg,
const Window< Wbg > &  win_bg 
) [inline]

Morphological thickening.

This operator is THICK_B = Id + HMT_B, where B = (Bfg, Bbg).

Definition at line 88 of file thickening.hh.

References mln::trace::entering(), mln::trace::exiting(), hit_or_miss(), plus(), and mln::morpho::internal::thickening_tests().

Referenced by thinning().

template<typename I , typename Wfg , typename Wbg >
mln::trait::concrete< I >::ret mln::morpho::thin_fit ( const Image< I > &  input,
const Window< Wfg > &  win_fg,
const Window< Wbg > &  win_bg 
) [inline]

Morphological thin-fit.

This operator is THIN_B = Id - HMTope_B where B = (Bfg, Bbg).

Definition at line 87 of file thin_fit.hh.

References mln::trace::entering(), mln::trace::exiting(), hit_or_miss_opening(), minus(), and mln::morpho::internal::thin_fit_tests().

template<typename I , typename Wfg , typename Wbg >
mln::trait::concrete< I >::ret mln::morpho::thinning ( const Image< I > &  input,
const Window< Wfg > &  win_fg,
const Window< Wbg > &  win_bg 
) [inline]

Morphological thinning.

This operator is THIN_B = Id - HMT_B, where B = (Bfg, Bbg).

Definition at line 90 of file thinning.hh.

References complementation(), mln::trace::entering(), mln::trace::exiting(), hit_or_miss(), minus(), thickening(), and mln::morpho::internal::thinning_tests().

template<typename I , typename W >
mln::trait::concrete< I >::ret mln::morpho::top_hat_black ( const Image< I > &  input,
const Window< W > &  win 
) [inline]

Morphological black top-hat (for background / dark objects).

This operator is clo_B - Id.

Definition at line 102 of file top_hat.hh.

References mln::trace::entering(), mln::exact(), mln::trace::exiting(), minus(), mln::test::positive(), and mln::morpho::closing::structural().

Referenced by contrast().

template<typename I , typename W >
mln::trait::concrete< I >::ret mln::morpho::top_hat_self_complementary ( const Image< I > &  input,
const Window< W > &  win 
) [inline]

Morphological self-complementary top-hat.

This operator is
= top_hat_white + top_hat_black
= (input - opening) + (closing - input)
= closing - opening.

Definition at line 121 of file top_hat.hh.

References mln::trace::entering(), mln::exact(), mln::trace::exiting(), minus(), mln::test::positive(), mln::morpho::opening::structural(), and mln::morpho::closing::structural().

template<typename I , typename W >
mln::trait::concrete< I >::ret mln::morpho::top_hat_white ( const Image< I > &  input,
const Window< W > &  win 
) [inline]

Morphological white top-hat (for object / light objects).

This operator is Id - ope_B.

Definition at line 83 of file top_hat.hh.

References mln::trace::entering(), mln::exact(), mln::trace::exiting(), minus(), mln::test::positive(), and mln::morpho::opening::structural().

Referenced by contrast().


Variable Documentation

Definition at line 105 of file hit_or_miss.hh.

Referenced by mln::morpho::impl::generic::hit_or_miss().

Definition at line 56 of file laplacian.hh.