fix bug 3733 for imgproc/filter.cpp