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

This commit is contained in:
Alexander Alekhin 2015-11-12 03:10:11 +00:00
commit fc1694c97c

View File

@ -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;