26 #ifndef MLN_MORPHO_CLOSING_LEVELING_HH
27 # define MLN_MORPHO_CLOSING_LEVELING_HH
33 # include <mln/morpho/includes.hh>
34 # include <mln/morpho/leveling_filter.hh>
47 template <
typename I,
typename N,
typename A>
49 leveling(const Image<I>& input, const Neighborhood<N>& nbh,
50 const Accumulator<A>& accu, const mln_result(A)& lambda);
55 # ifndef MLN_INCLUDE_ONLY
58 template <
typename I,
typename N,
typename A>
61 leveling(const Image<I>& input, const Neighborhood<N>& nbh,
62 const Accumulator<A>& accu, const mln_result(A)& lambda)
64 trace::entering(
"morpho::closing::leveling");
66 mln_precondition(exact(input).is_valid());
67 mln_precondition(mlc_not_equal(mln_trait_accumulator_when_pix(A),
68 trait::accumulator::when_pix::not_ok)::value);
70 mln_concrete(I) output;
71 output = leveling_filter(input, nbh, accu, lambda,
74 mln_postcondition(output >= input);
76 trace::exiting("morpho::closing::leveling");
81 # endif // ! MLN_INCLUDE_ONLY
90 #endif // ! MLN_MORPHO_CLOSING_LEVELING_HH