removed trailing backspaces, reduced number of warnings (under MSVC2010 x64) for size_t to int conversion, added handling of samples launch without parameters (should not have abnormal termination if there was no paramaters supplied)
This commit is contained in:
@@ -12,14 +12,17 @@ using namespace cv;
|
||||
void help()
|
||||
{
|
||||
cout << "This program shows the use of the Calonder point descriptor classifier"
|
||||
"SURF is used to detect interest points, Calonder is used to describe/match these points\n"
|
||||
"Format:" << endl <<
|
||||
"SURF is used to detect interest points, Calonder is used to describe/match these points\n"
|
||||
"Format:" << endl <<
|
||||
" classifier_file(to write) test_image file_with_train_images_filenames(txt)" <<
|
||||
" or" << endl <<
|
||||
" classifier_file(to read) test_image"
|
||||
"Using OpenCV version %s\n" << CV_VERSION << "\n"
|
||||
<< endl;
|
||||
" classifier_file(to read) test_image" << "\n" << endl <<
|
||||
"Using OpenCV version " << CV_VERSION << "\n" << endl;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Generates random perspective transform of image
|
||||
*/
|
||||
@@ -131,7 +134,7 @@ void testCalonderClassifier( const string& classifierFilename, const string& img
|
||||
Mat points1t; perspectiveTransform(Mat(points1), points1t, H12);
|
||||
for( size_t mi = 0; mi < matches.size(); mi++ )
|
||||
{
|
||||
if( norm(points2[matches[mi].trainIdx] - points1t.at<Point2f>(mi,0)) < 4 ) // inlier
|
||||
if( norm(points2[matches[mi].trainIdx] - points1t.at<Point2f>((int)mi,0)) < 4 ) // inlier
|
||||
matchesMask[mi] = 1;
|
||||
}
|
||||
|
||||
@@ -148,7 +151,7 @@ int main( int argc, char **argv )
|
||||
{
|
||||
if( argc != 4 && argc != 3 )
|
||||
{
|
||||
help();
|
||||
help();
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user