32 template <
typename NeighbourT,
typename FilterT>
33 typename NeighbourT::PixelType
operator()(NeighbourT& nbr, FilterT& fltr) {
35 int hs_r = (fltr.rows / 2);
36 auto out = nbr.at(nbr.I_c, nbr.I_r - 1) * fltr.at(0, 0);
37 for (i2 = -hs_r + 1, i = 1; i2 <= hs_r; i2++, i++) {
38 out += nbr.at(nbr.I_c, nbr.I_r + i2) * fltr.at(0, i);
50 template <
typename NeighbourT,
typename FilterT>
51 typename NeighbourT::PixelType
operator()(NeighbourT& nbr, FilterT& fltr) {
53 int hs_c = (fltr.cols / 2);
54 auto out = nbr.at(nbr.I_c - 1, nbr.I_r) * fltr.at(0, 0);
55 for (i2 = -hs_c + 1, i = 1; i2 <= hs_c; i2++, i++) {
56 out += nbr.at(nbr.I_c + i2, nbr.I_r) * fltr.at(i, 0);
Separable filter for cols.
NeighbourT::PixelType operator()(NeighbourT &nbr, FilterT &fltr)
Separable filter for rows.
NeighbourT::PixelType operator()(NeighbourT &nbr, FilterT &fltr)