Bugfix #3668 in FilterEngine::apply(), use the ROI properly

pull/2701/head
Thierry Hoinville 11 years ago
parent 59cf62ad9e
commit 5efd2056f0
  1. 8
      modules/imgproc/src/filter.cpp

@ -453,8 +453,12 @@ void FilterEngine::apply(const Mat& src, Mat& dst,
dstOfs.y + srcRoi.height <= dst.rows ); dstOfs.y + srcRoi.height <= dst.rows );
int y = start(src, srcRoi, isolated); int y = start(src, srcRoi, isolated);
proceed( src.data + y*src.step, (int)src.step, endY - startY, proceed( src.data + y*src.step
dst.data + dstOfs.y*dst.step + dstOfs.x*dst.elemSize(), (int)dst.step ); + srcRoi.x*src.elemSize(),/* Bugfix #3668 use the x-shift of ROI
*/
(int)src.step, endY - startY,
dst.data + dstOfs.y*dst.step +
dstOfs.x*dst.elemSize(), (int)dst.step );
} }
} }

Loading…
Cancel
Save