[Gridflow-dev] cv.Div, cv.Mul + errors
Mathieu Bouchard
matju at artengine.ca
Thu Oct 25 21:00:24 EDT 2007
On Thu, 25 Oct 2007, Alexandre Castonguay wrote:
> Thank you for the explanations, your fixes to the variable grid sizes
> solved it but it's true a more permanent fix for future error handling
> is preferable.
It's also possible that all CV errors are better handled by predicting
them and raising GF errors instead. In that case we don't need a permanent
fix.
It's also possible that not all CV errors are easy to predict or possible
to predict. In that case I will have to make a permanent fix.
Anyway, OpenCV has a mechanism for error-checking most any CV call. This
is one of the ways to implement exception-like mechanisms, but the problem
with that is that every CV call has to be checked with an extra statement.
From within C++, without rewriting the CV headers, every call has to be
accompanied. With a helper function it can be made to look like:
cvFoo(blah,blah,blah); check();
and with a macro it can be made to look like:
CHECK cvFoo(blah,blah,blah);
which is probably not a big deal if we have a very good search-and-replace
tool or that I do it incrementally (with some discipline and
attentiveness).
_ _ __ ___ _____ ________ _____________ _____________________ ...
| Mathieu Bouchard - tél:+1.514.383.3801, Montréal QC Canada
More information about the Gridflow-dev
mailing list