26 #ifndef MLN_MORPHO_ELEMENTARY_OPENING_HH
27 # define MLN_MORPHO_ELEMENTARY_OPENING_HH
33 # include <mln/morpho/elementary/erosion.hh>
34 # include <mln/morpho/elementary/dilation.hh>
50 template <
typename I,
typename N>
51 mln_concrete(I)
opening(const Image<I>& input, const Neighborhood<N>& nbh);
54 # ifndef MLN_INCLUDE_ONLY
56 template <
typename I,
typename N>
60 trace::entering(
"morpho::elementary::opening");
62 mln_precondition(exact(input).is_valid());
63 mln_precondition(exact(nbh).is_valid());
65 mln_concrete(I) output = dilation(erosion(input, nbh), nbh);
67 mln_postcondition(output <= input);
69 trace::exiting(
"morpho::elementary::opening");
73 # endif // ! MLN_INCLUDE_ONLY
82 #endif // ! MLN_MORPHO_ELEMENTARY_OPENING_HH