From: Ethan Rublee Date: Wed, 1 Jun 2011 21:49:08 +0000 (+0000) Subject: Quiet the errors from the circlesgrid pattern detector. These were really verbose. X-Git-Tag: accepted/2.0/20130307.220821~2944 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5964234681e06efe30c0b0f94f6700f2ee38d175;p=profile%2Fivi%2Fopencv.git Quiet the errors from the circlesgrid pattern detector. These were really verbose. --- diff --git a/modules/calib3d/src/calibinit.cpp b/modules/calib3d/src/calibinit.cpp index 3093f53..2462edf 100644 --- a/modules/calib3d/src/calibinit.cpp +++ b/modules/calib3d/src/calibinit.cpp @@ -1912,6 +1912,16 @@ bool cv::findChessboardCorners( const InputArray& _image, Size patternSize, return ok; } +namespace +{ +int quiet_error(int status, const char* func_name, + const char* err_msg, const char* file_name, + int line, void* userdata ) +{ + return 0; +} +} + void cv::drawChessboardCorners( InputOutputArray _image, Size patternSize, const InputArray& _corners, bool patternWasFound ) @@ -1972,14 +1982,21 @@ bool cv::findCirclesGrid( const InputArray& _image, Size patternSize, centers.clear(); CirclesGridFinder boxFinder(patternSize, points, parameters); bool isFound = false; +#define BE_QUIET 1 +#if BE_QUIET + redirectError(quiet_error); +#endif try { isFound = boxFinder.findHoles(); } catch (cv::Exception) { - } + } +#if BE_QUIET + redirectError(0); +#endif if (isFound) { switch(parameters.gridType)