fix bug 3733 for imgproc/filter.cpp

this is updated #2862