27 #ifndef MLN_BORDER_EQUALIZE_HH
28 # define MLN_BORDER_EQUALIZE_HH
36 # include <mln/border/resize.hh>
62 template <
typename I,
typename J>
63 void equalize(
const Image<I>& ima1,
const Image<J>& ima2,
64 unsigned min_thickness);
68 # ifndef MLN_INCLUDE_ONLY
73 template <
typename I,
typename J>
75 void equalize_(
const I& ima1,
const J& ima2,
unsigned min_thickness)
77 mln_trace(
"border::impl::equalize_");
81 if (! (b1 == b2 && b2 >= min_thickness))
84 if (b1 < min_thickness && b2 < min_thickness)
93 if (b1 < min_thickness)
95 mln_assertion(b2 >= min_thickness);
101 mln_assertion(b1 >= min_thickness);
113 template <
typename I,
typename J>
115 void equalize(
const Image<I>& ima1_,
const Image<J>& ima2_,
116 unsigned min_thickness)
118 mln_trace(
"border::equalize");
123 const I& ima1 =
exact(ima1_);
124 const J& ima2 =
exact(ima2_);
125 mln_precondition(ima1.is_valid() && ima2.is_valid());
127 impl::equalize_(ima1, ima2, min_thickness);
135 # endif // ! MLN_INCLUDE_ONLY
142 #endif // ! MLN_BORDER_EQUALIZE_HH