-#include <highgui.h>
-#include <opencv2/core/core.hpp>
-#include <opencv2/imgproc/imgproc.hpp>
-#include <opencv2/features2d/features2d.hpp>
+#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/core/core.hpp"
+#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/features2d/features2d.hpp"
+
#include <iostream>
#include <fstream>
-#include <highgui.h>\r
-#include <opencv2/imgproc/imgproc.hpp>\r
+#include "opencv2/highgui/highgui.hpp"\r
+#include "opencv2/imgproc/imgproc.hpp"\r
+\r
#include <iostream>\r
\r
using namespace std;\r
-#include <highgui.h>
+#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/features2d/features2d.hpp"
#include "opencv2/ml/ml.hpp"
+
#include <fstream>
#include <iostream>
#include <memory>
-#include "opencv2/core/core.hpp"
#include "opencv2/calib3d/calib3d.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/features2d/features2d.hpp"
-#include <highgui.h>
+#include "opencv2/highgui/highgui.hpp"
+
#include <cstdio>
using namespace cv;
-#include <highgui.h>
+#include "opencv2/highgui/highgui.hpp"
#include "opencv2/features2d/features2d.hpp"
+
#include <iostream>
#include <fstream>
using namespace cv;
using namespace std;
-const char dlmtr = '/';
-
void maskMatchesByTrainImgIdx( const vector<DMatch>& matches, int trainImgIdx, vector<char>& mask );
void readTrainFilenames( const string& filename, string& dirName, vector<string>& trainFilenames );
CV_Assert( queryPoints.size() == matches.size() );
cout << ">" << endl;
+ cout << "< 6.) Save results..." << endl;
Mat drawImg;
vector<char> mask;
for( size_t i = 0; i < trainImgCollection.size(); i++ )
imwrite( string(argv[6]) + "/res_" + trainFilenames[usedTrainImgIdxs[i]] + ".png", drawImg );
}
+ cout << ">" << endl;
+
return 0;
}
void readTrainFilenames( const string& filename, string& dirName, vector<string>& trainFilenames )
{
+ const char dlmtr = '/';
+
trainFilenames.clear();
ifstream file( filename.c_str() );
-#include <highgui.h>
+#include "opencv2/highgui/highgui.hpp"
#include "opencv2/core/core.hpp"
#include "opencv2/imgproc/imgproc.hpp"
+
#include <iostream>
using namespace cv;