Suppress OpenCV error messages (Bug #2005)


Added by Kirt Lillywhite almost 13 years ago. Updated almost 13 years ago.


Status:Cancelled Start date:2012-05-31
Priority:Normal Due date:
Assignee:Andrey Kamaev % Done:

0%

Category:core
Target version:2.4.1
Affected version: Operating System:
Difficulty: HW Platform:
Pull request:

Description

I have a program where I expect some exceptions thrown from openCV because not all the inputs are valid. I catch those with the following code where I'm am using the cv namespace:

try {
        filter2D(input, dest, -1, gabor_kernel, Point(-1,-1), 0,
               BORDER_REPLICATE);
    }
    catch (Exception& e) {
        worked = false;
    }

Although I catch the exception opencv still writes to stderr the opencv error message. I've also tried cvSetErrMode(CV_ErrModeSilent); with no luck. Shouldn't the error messages be suppressed?


Associated revisions

Revision 8c91a1af
Added by Andrey Pavlenko about 11 years ago

Merge pull request #2005 from krodyush:pullreq/2.4-opt-131114-extractCovData

History

Updated by Andrey Kamaev almost 13 years ago

Please use OpenCV user group for your questions.

cvSetErrMode is just a compatibility stub in latest OpenCV versions. You should use something like cv::redirectError(cvNulDevReport) instead.

  • Status changed from Open to Cancelled
  • Target version set to 2.4.1
  • Category set to core
  • Assignee set to Andrey Kamaev

Also available in: Atom PDF