Merge pull request #280 from vpisarev:bug_fixes_jan9

This commit is contained in:
Andrey Kamaev 2013-01-10 13:31:04 +04:00 committed by OpenCV Buildbot
commit b81d1b25c7

View File

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