Commit e658cd92 authored by Edwin Carlinet's avatar Edwin Carlinet
Browse files

Add area opening entry.

    * mln/morpho/algebraic_filter.hpp: Area opening alg.
parent d46e2e70
...@@ -11,6 +11,11 @@ namespace mln ...@@ -11,6 +11,11 @@ namespace mln
namespace morpho namespace morpho
{ {
/// \brief Compute the area algebraic closing of an image.
/// \param ima The input image
/// \param nbh The neighborhood
/// \param area The grain size
/// \param cmp A strict total ordering on values
template <class I, class N, class Compare = std::less<mln_value(I)> > template <class I, class N, class Compare = std::less<mln_value(I)> >
mln_concrete(I) mln_concrete(I)
area_closing(const Image<I>& ima, area_closing(const Image<I>& ima,
...@@ -18,6 +23,16 @@ namespace mln ...@@ -18,6 +23,16 @@ namespace mln
unsigned area, unsigned area,
Compare cmp = Compare()); Compare cmp = Compare());
/// \brief Compute the area algebraic opening of an image.
/// \param ima The input image
/// \param nbh The neighborhood
/// \param area The grain size
template <class I, class N>
mln_concrete(I)
area_opening(const Image<I>& ima,
const Neighborhood<N>& nbh,
unsigned area);
/******************************/ /******************************/
...@@ -75,6 +90,19 @@ namespace mln ...@@ -75,6 +90,19 @@ namespace mln
return out; return out;
} }
template <class I, class N>
mln_concrete(I)
area_opening(const Image<I>& ima_,
const Neighborhood<N>& nbh,
unsigned area)
{
mln_entering("mln::morpho::area_opening");
mln_concrete(I) out = area_closing(exact(ima_), exact(nbh), area,
std::greater<mln_value(I)> ());
mln_exiting();
return out;
}
} }
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment