Commit e383d395 authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

fixed bug #2679

parent 47df8f4c
...@@ -346,7 +346,10 @@ void cv::matchTemplate( InputArray _img, InputArray _templ, OutputArray _result, ...@@ -346,7 +346,10 @@ void cv::matchTemplate( InputArray _img, InputArray _templ, OutputArray _result,
} }
if( numType == 2 ) if( numType == 2 )
{
num = wndSum2 - 2*num + templSum2; num = wndSum2 - 2*num + templSum2;
num = MAX(num, 0.);
}
} }
if( isNormed ) if( isNormed )
......
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