diff --git a/samples/c/find_obj_calonder.cpp b/samples/c/find_obj_calonder.cpp index 4db6b6d2c4..eb168deeb5 100644 --- a/samples/c/find_obj_calonder.cpp +++ b/samples/c/find_obj_calonder.cpp @@ -1,7 +1,8 @@ -#include -#include -#include -#include +#include "opencv2/highgui/highgui.hpp" +#include "opencv2/core/core.hpp" +#include "opencv2/imgproc/imgproc.hpp" +#include "opencv2/features2d/features2d.hpp" + #include #include diff --git a/samples/c/grabcut.cpp b/samples/c/grabcut.cpp index c081f154d5..092f5dfd9e 100644 --- a/samples/c/grabcut.cpp +++ b/samples/c/grabcut.cpp @@ -1,5 +1,6 @@ -#include -#include +#include "opencv2/highgui/highgui.hpp" +#include "opencv2/imgproc/imgproc.hpp" + #include using namespace std; diff --git a/samples/cpp/bagofwords_classification.cpp b/samples/cpp/bagofwords_classification.cpp index da5a45a4a4..614d7794a0 100644 --- a/samples/cpp/bagofwords_classification.cpp +++ b/samples/cpp/bagofwords_classification.cpp @@ -1,7 +1,8 @@ -#include +#include "opencv2/highgui/highgui.hpp" #include "opencv2/imgproc/imgproc.hpp" #include "opencv2/features2d/features2d.hpp" #include "opencv2/ml/ml.hpp" + #include #include #include diff --git a/samples/cpp/generic_descriptor_match.cpp b/samples/cpp/generic_descriptor_match.cpp index 3d113d0124..4685f86bda 100644 --- a/samples/cpp/generic_descriptor_match.cpp +++ b/samples/cpp/generic_descriptor_match.cpp @@ -1,8 +1,7 @@ -#include "opencv2/core/core.hpp" #include "opencv2/calib3d/calib3d.hpp" -#include "opencv2/imgproc/imgproc.hpp" #include "opencv2/features2d/features2d.hpp" -#include +#include "opencv2/highgui/highgui.hpp" + #include using namespace cv; diff --git a/samples/cpp/matching_to_many_images.cpp b/samples/cpp/matching_to_many_images.cpp index 192946a858..f235fdd1dd 100644 --- a/samples/cpp/matching_to_many_images.cpp +++ b/samples/cpp/matching_to_many_images.cpp @@ -1,13 +1,12 @@ -#include +#include "opencv2/highgui/highgui.hpp" #include "opencv2/features2d/features2d.hpp" + #include #include using namespace cv; using namespace std; -const char dlmtr = '/'; - void maskMatchesByTrainImgIdx( const vector& matches, int trainImgIdx, vector& mask ); void readTrainFilenames( const string& filename, string& dirName, vector& trainFilenames ); @@ -89,6 +88,7 @@ int main(int argc, char** argv) CV_Assert( queryPoints.size() == matches.size() ); cout << ">" << endl; + cout << "< 6.) Save results..." << endl; Mat drawImg; vector mask; for( size_t i = 0; i < trainImgCollection.size(); i++ ) @@ -99,6 +99,8 @@ int main(int argc, char** argv) imwrite( string(argv[6]) + "/res_" + trainFilenames[usedTrainImgIdxs[i]] + ".png", drawImg ); } + cout << ">" << endl; + return 0; } @@ -116,6 +118,8 @@ void maskMatchesByTrainImgIdx( const vector& matches, int trainImgIdx, v void readTrainFilenames( const string& filename, string& dirName, vector& trainFilenames ) { + const char dlmtr = '/'; + trainFilenames.clear(); ifstream file( filename.c_str() ); diff --git a/samples/cpp/meanshift_segmentation.cpp b/samples/cpp/meanshift_segmentation.cpp index 7998459a3f..c9e44cb167 100644 --- a/samples/cpp/meanshift_segmentation.cpp +++ b/samples/cpp/meanshift_segmentation.cpp @@ -1,6 +1,7 @@ -#include +#include "opencv2/highgui/highgui.hpp" #include "opencv2/core/core.hpp" #include "opencv2/imgproc/imgproc.hpp" + #include using namespace cv;