26 #ifndef MLN_LINEAR_CONVOLVE_2X1D_HH
27 # define MLN_LINEAR_CONVOLVE_2X1D_HH
33 # include <mln/linear/convolve_directional.hh>
34 # include <mln/extension/adjust.hh>
35 # include <mln/util/max.hh>
54 typename W,
unsigned Sh,
unsigned Sv>
56 convolve_2x1d(const Image<I>& input,
57 W (&horizontal_weights)[Sh],
58 W (& vertical_weights)[Sv]);
61 # ifndef MLN_INCLUDE_ONLY
64 typename W,
unsigned Sh,
unsigned Sv>
66 convolve_2x1d(const Image<I>& input,
67 W (&horizontal_weights)[Sh],
68 W (& vertical_weights)[Sv])
70 trace::entering(
"linear::convolve_2x1d");
72 mlc_bool(Sh % 2 == 1)::check();
73 mlc_bool(Sv % 2 == 1)::check();
75 mln_precondition(exact(input).is_valid());
81 tmp = linear::convolve_directional(input, 1, horizontal_weights);
82 output = linear::convolve_directional( tmp, 0, vertical_weights);
84 trace::exiting("linear::convolve_2x1d");
88 # endif // ! MLN_INCLUDE_ONLY
95 #endif // ! MLN_LINEAR_CONVOLVE_2X1D_HH