26 #ifndef MLN_BORDER_EQUALIZE_HH
27 # define MLN_BORDER_EQUALIZE_HH
35 # include <mln/border/resize.hh>
58 template <
typename I,
typename J>
59 void equalize(
const Image<I>& ima1,
const Image<J>& ima2,
60 unsigned min_thickness);
64 # ifndef MLN_INCLUDE_ONLY
69 template <
typename I,
typename J>
71 void equalize_(
const I& ima1,
const J& ima2,
unsigned min_thickness)
73 trace::entering(
"border::impl::equalize_");
77 if (! (b1 == b2 && b2 >= min_thickness))
80 if (b1 < min_thickness && b2 < min_thickness)
89 if (b1 < min_thickness)
91 mln_assertion(b2 >= min_thickness);
97 mln_assertion(b1 >= min_thickness);
102 trace::exiting(
"border::impl::equalize_");
110 template <
typename I,
typename J>
113 unsigned min_thickness)
115 trace::entering(
"border::equalize");
120 const I& ima1 = exact(ima1_);
121 const J& ima2 = exact(ima2_);
122 mln_precondition(ima1.is_valid() && ima2.is_valid());
124 impl::equalize_(ima1, ima2, min_thickness);
130 trace::exiting(
"border::equalize");
133 # endif // ! MLN_INCLUDE_ONLY
140 #endif // ! MLN_BORDER_EQUALIZE_HH