Commit 9956c428 authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

fixed iterations>1 case in morphological operations (bug #2348; thanks to Andrei…

fixed iterations>1 case in morphological operations (bug #2348; thanks to Andrei Zaharescu for the fix)
parent f53d94c6
...@@ -1166,8 +1166,8 @@ static void morphOp( int op, InputArray _src, OutputArray _dst, ...@@ -1166,8 +1166,8 @@ static void morphOp( int op, InputArray _src, OutputArray _dst,
{ {
anchor = Point(anchor.x*iterations, anchor.y*iterations); anchor = Point(anchor.x*iterations, anchor.y*iterations);
kernel = getStructuringElement(MORPH_RECT, kernel = getStructuringElement(MORPH_RECT,
Size(ksize.width + iterations*(ksize.width-1), Size(ksize.width + (iterations-1)*(ksize.width-1),
ksize.height + iterations*(ksize.height-1)), ksize.height + (iterations-1)*(ksize.height-1)),
anchor); anchor);
iterations = 1; iterations = 1;
} }
......
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