Opencv approval (general)

some opencv errors are detected at runtime - using CV_64 instead of CV_32, out of range, etc. This makes debugging a daunting task, at least when you cannot use debug mode for various reasons.
When an error occurs, opencv stops at assert (the CV: ASSERT macro) and indicates exactly where it happened in the opencv source.
is there anyway to say where this error occurred in the calling code (my code)?
Assuming, of course, that we are in release mode (without breakpoints - only console output)
Thanks

+6
source share
1 answer

Yes , it is usually easy to tell when OpenCV crashes: all you have to do is check the return of each function call and print an error message when a failure occurs.

-3
source

Source: https://habr.com/ru/post/912496/


All Articles