fixed multiple warnings from VS2010.

This commit is contained in:
Vadim Pisarevsky
2010-11-25 16:55:46 +00:00
parent 7e5c11a920
commit 1286c1db45
36 changed files with 178 additions and 177 deletions

View File

@@ -45,7 +45,7 @@ int getMatcherFilterType( const string& str )
return NONE_FILTER;
if( str == "CrossCheckFilter" )
return CROSS_CHECK_FILTER;
CV_Assert(0);
CV_Error(CV_StsBadArg, "Invalid filter name");
return -1;
}
@@ -155,7 +155,7 @@ void doIteration( const Mat& img1, Mat& img2, bool isWarpPerspective,
vector<Point2f> curve;
Ptr<GenericDescriptorMatcher> gdm = new VectorDescriptorMatcher( descriptorExtractor, descriptorMatcher );
evaluateGenericDescriptorMatcher( img1, img2, H12, keypoints1, keypoints2, 0, 0, curve, gdm );
for( float l_p = 0; l_p < 1 - FLT_EPSILON; l_p+=0.1 )
for( float l_p = 0; l_p < 1 - FLT_EPSILON; l_p+=0.1f )
cout << "1-precision = " << l_p << "; recall = " << getRecall( curve, l_p ) << endl;
cout << ">" << endl;
}
@@ -185,7 +185,7 @@ void doIteration( const Mat& img1, Mat& img2, bool isWarpPerspective,
Mat points1t; perspectiveTransform(Mat(points1), points1t, H12);
for( size_t i1 = 0; i1 < points1.size(); i1++ )
{
if( norm(points2[i1] - points1t.at<Point2f>(i1,0)) < 4 ) // inlier
if( norm(points2[i1] - points1t.at<Point2f>((int)i1,0)) < 4 ) // inlier
matchesMask[i1] = 1;
}
// draw inliers