Commit fc1694c9 authored by Alexander Alekhin's avatar Alexander Alekhin

Merge pull request #5655 from janstarzy:2.4-canny-fix

parents 0f288d10 2799829b
......@@ -230,7 +230,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(sz + src.cols, maxsize * 3/2);
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