mirror of
https://github.com/opencv/opencv.git
synced 2025-06-07 17:44:04 +08:00
fixes #5066: laplacian: "y" may contain negative values
This commit is contained in:
parent
5cdf0e3e89
commit
1305962af7
@ -858,7 +858,7 @@ void cv::Laplacian( InputArray _src, OutputArray _dst, int ddepth, int ksize,
|
|||||||
Mat src = _src.getMat(), dst = _dst.getMat();
|
Mat src = _src.getMat(), dst = _dst.getMat();
|
||||||
int y = fx->start(src), dsty = 0, dy = 0;
|
int y = fx->start(src), dsty = 0, dy = 0;
|
||||||
fy->start(src);
|
fy->start(src);
|
||||||
const uchar* sptr = src.ptr(y);
|
const uchar* sptr = src.ptr() + src.step[0] * y;
|
||||||
|
|
||||||
int dy0 = std::min(std::max((int)(STRIPE_SIZE/(CV_ELEM_SIZE(stype)*src.cols)), 1), src.rows);
|
int dy0 = std::min(std::max((int)(STRIPE_SIZE/(CV_ELEM_SIZE(stype)*src.cols)), 1), src.rows);
|
||||||
Mat d2x( dy0 + kd.rows - 1, src.cols, wtype );
|
Mat d2x( dy0 + kd.rows - 1, src.cols, wtype );
|
||||||
|
Loading…
Reference in New Issue
Block a user