Commit 23a81c0f authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

Merge pull request #3407 from wangyan42164:canny_bug_fix

parents 77be6d64 184b6e31
......@@ -453,7 +453,7 @@ void cv::Canny( InputArray _src, OutputArray _dst,
if ((stack_top - stack_bottom) + src.cols > maxsize)
{
int sz = (int)(stack_top - stack_bottom);
maxsize = maxsize * 3/2;
maxsize = std::max(maxsize * 3/2, sz + src.cols);
stack.resize(maxsize);
stack_bottom = &stack[0];
stack_top = stack_bottom + sz;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment