From 9690ed8232b04c3bcaac55b88bb8e05c1062a868 Mon Sep 17 00:00:00 2001 From: Andrey Kamaev Date: Wed, 30 Jan 2013 12:48:01 +0400 Subject: [PATCH 1/4] Fix build of OpenCV samples (Linux) --- samples/cpp/descriptor_extractor_matcher.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/cpp/descriptor_extractor_matcher.cpp b/samples/cpp/descriptor_extractor_matcher.cpp index f09e9ea462..7aa5299103 100644 --- a/samples/cpp/descriptor_extractor_matcher.cpp +++ b/samples/cpp/descriptor_extractor_matcher.cpp @@ -222,7 +222,7 @@ static void doIteration( const Mat& img1, Mat& img2, bool isWarpPerspective, DrawMatchesFlags::DRAW_OVER_OUTIMG | DrawMatchesFlags::NOT_DRAW_SINGLE_POINTS ); #endif - printf("Number of inliers: %d\n", countNonZero(matchesMask)); + cout << "Number of inliers: " << countNonZero(matchesMask) << endl; } else drawMatches( img1, keypoints1, img2, keypoints2, filteredMatches, drawImg ); From eeb865ee8a18deabe20af0c2b23f6ec4b1084b7d Mon Sep 17 00:00:00 2001 From: Andrey Kamaev Date: Wed, 30 Jan 2013 13:11:33 +0400 Subject: [PATCH 2/4] Fix Android build warnings --- modules/calib3d/src/_modelest.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/calib3d/src/_modelest.h b/modules/calib3d/src/_modelest.h index d30e4f4957..2488a934b1 100644 --- a/modules/calib3d/src/_modelest.h +++ b/modules/calib3d/src/_modelest.h @@ -43,7 +43,7 @@ #ifndef _CV_MODEL_EST_H_ #define _CV_MODEL_EST_H_ -#include "precomp.hpp" +#include "opencv2/calib3d/calib3d.hpp" class CV_EXPORTS CvModelEstimator2 { From e79e81c6cd77865266f710561af403462840b26a Mon Sep 17 00:00:00 2001 From: Andrey Kamaev Date: Wed, 30 Jan 2013 13:24:49 +0400 Subject: [PATCH 3/4] Fix Windows build warnings --- modules/calib3d/test/test_modelest.cpp | 2 +- modules/ts/src/ts.cpp | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/calib3d/test/test_modelest.cpp b/modules/calib3d/test/test_modelest.cpp index 91bf4b092f..e27c12d49c 100644 --- a/modules/calib3d/test/test_modelest.cpp +++ b/modules/calib3d/test/test_modelest.cpp @@ -159,7 +159,7 @@ void CV_ModelEstimator2_Test::fill_array( int test_case_idx, int i, int j, Mat& Point2d tangentVector_1 = arr.at(endPointIndex) - arr.at(startPointIndex); Point2d tangentVector_2 = arr.at(testPointIndex) - arr.at(startPointIndex); - const float eps = 1e-4; + const float eps = 1e-4f; //TODO: perhaps it is better to normalize the cross product by norms of the tangent vectors if (fabs(tangentVector_1.cross(tangentVector_2)) < eps) { diff --git a/modules/ts/src/ts.cpp b/modules/ts/src/ts.cpp index 4ae9e7ea4d..7ce37752db 100644 --- a/modules/ts/src/ts.cpp +++ b/modules/ts/src/ts.cpp @@ -47,8 +47,12 @@ #include #if defined WIN32 || defined _WIN32 || defined WIN64 || defined _WIN64 #include -#define NOMINMAX + #include +#undef small +#undef min +#undef max +#undef abs #ifdef _MSC_VER #include From 68be50bbabfb0bd624b67fd16fc773f1e7a8b41d Mon Sep 17 00:00:00 2001 From: Andrey Kamaev Date: Wed, 30 Jan 2013 13:31:00 +0400 Subject: [PATCH 4/4] Fix clang build warning --- samples/cpp/videostab.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/samples/cpp/videostab.cpp b/samples/cpp/videostab.cpp index bd4e8533f4..8b8504a1e6 100644 --- a/samples/cpp/videostab.cpp +++ b/samples/cpp/videostab.cpp @@ -1,3 +1,7 @@ +#if defined __clang__ +# pragma GCC diagnostic ignored "-Wdelete-non-virtual-dtor" +#endif + #include #include #include