From: laurentBerger Date: Sat, 16 May 2015 20:54:53 +0000 (+0200) Subject: suppress android and mac warnings X-Git-Tag: accepted/tizen/6.0/unified/20201030.111113~2442^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=268283ff16c928c9bbd64cc25274ca33389b5042;p=platform%2Fupstream%2Fopencv.git suppress android and mac warnings --- diff --git a/samples/cpp/detect_mser.cpp b/samples/cpp/detect_mser.cpp index 36f543d..2538c81 100644 --- a/samples/cpp/detect_mser.cpp +++ b/samples/cpp/detect_mser.cpp @@ -1,6 +1,6 @@ #include #include "opencv2/core/opengl.hpp" -#include +#include "cvconfig.h" #include #include @@ -212,9 +212,9 @@ static void onMouse(int event, int x, int y, int flags, void*) } #endif +#ifdef HAVE_OPENGL static void DrawOpenGLMSER(Mat img, Mat result) { -#ifdef HAVE_OPENGL Mat imgGray; if (img.type() != CV_8UC1) cvtColor(img, imgGray, COLOR_BGR2GRAY); @@ -327,8 +327,8 @@ static void DrawOpenGLMSER(Mat img, Mat result) } setOpenGlDrawCallback("OpenGL", 0, 0); destroyAllWindows(); -#endif } +#endif static Mat MakeSyntheticImage() { @@ -526,7 +526,9 @@ int main(int argc, char *argv[]) cout << "Feature : " << *itDesc << "\n"; cout << e.msg << endl; } - DrawOpenGLMSER(img,result); +#ifdef HAVE_OPENGL + DrawOpenGLMSER(img, result); +#endif waitKey(); } return 0;