fix bug 3733 for imgproc/filter.cpp
Merge pull request #3076 from vpisarev:fix_small_filters