From c8cad0857e04d457686e16960b0e2f84e0eac4de Mon Sep 17 00:00:00 2001 From: Andy Maloney Date: Sat, 2 Feb 2013 16:09:10 -0500 Subject: [PATCH] Remove unused constructor Add checks for valid values Fix wording on some errors --- modules/features2d/src/evaluation.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/modules/features2d/src/evaluation.cpp b/modules/features2d/src/evaluation.cpp index ca5fe26..1724b01 100644 --- a/modules/features2d/src/evaluation.cpp +++ b/modules/features2d/src/evaluation.cpp @@ -241,7 +241,6 @@ static void filterEllipticKeyPointsByImageSize( vector& keypoi struct IntersectAreaCounter { - IntersectAreaCounter() : bua(0), bna(0) {} IntersectAreaCounter( float _dr, int _minx, int _miny, int _maxy, const Point2f& _diff, @@ -257,6 +256,9 @@ struct IntersectAreaCounter void operator()( const BlockedRange& range ) { + CV_Assert( miny < maxy ); + CV_Assert( dr > FLT_EPSILON ); + int temp_bua = bua, temp_bna = bna; for( int i = range.begin(); i != range.end(); i++ ) { @@ -461,7 +463,7 @@ void cv::evaluateFeatureDetector( const Mat& img1, const Mat& img2, const Mat& H keypoints2 = _keypoints2 != 0 ? _keypoints2 : &buf2; if( (keypoints1->empty() || keypoints2->empty()) && fdetector.empty() ) - CV_Error( CV_StsBadArg, "fdetector must be no empty when keypoints1 or keypoints2 is empty" ); + CV_Error( CV_StsBadArg, "fdetector must not be empty when keypoints1 or keypoints2 is empty" ); if( keypoints1->empty() ) fdetector->detect( img1, *keypoints1 ); @@ -572,10 +574,10 @@ void cv::evaluateGenericDescriptorMatcher( const Mat& img1, const Mat& img2, con correctMatches1to2Mask = _correctMatches1to2Mask != 0 ? _correctMatches1to2Mask : &buf2; if( keypoints1.empty() ) - CV_Error( CV_StsBadArg, "keypoints1 must be no empty" ); + CV_Error( CV_StsBadArg, "keypoints1 must not be empty" ); if( matches1to2->empty() && dmatcher.empty() ) - CV_Error( CV_StsBadArg, "dmatch must be no empty when matches1to2 is empty" ); + CV_Error( CV_StsBadArg, "dmatch must not be empty when matches1to2 is empty" ); bool computeKeypoints2ByPrj = keypoints2.empty(); if( computeKeypoints2ByPrj ) -- 2.7.4