Suppress OpenCV error messages (Bug #2005)
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
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