31 template <
typename NeighbourT>
32 typename NeighbourT::PixelType
operator()(NeighbourT &nbr) {
33 auto out = nbr.at(nbr.I_c, nbr.I_r - 1) * 1.0f / 4.0f;
34 out += nbr.at(nbr.I_c, nbr.I_r) * 2.0f / 4.0f;
35 out += nbr.at(nbr.I_c, nbr.I_r + 1) * 1.0f / 4.0f;
45 template <
typename NeighbourT>
46 typename NeighbourT::PixelType
operator()(NeighbourT &nbr) {
47 auto out = nbr.at(nbr.I_c - 1, nbr.I_r) * 1.0f / 3.0f;
48 out += nbr.at(nbr.I_c, nbr.I_r) * 1.0f / 3.0f;
49 out += nbr.at(nbr.I_c + 1, nbr.I_r) * 1.0f / 3.0f;
Separable filter for cols.
NeighbourT::PixelType operator()(NeighbourT &nbr)
Separable filter for rows.
NeighbourT::PixelType operator()(NeighbourT &nbr)