Split large assertions into pieces (Patch #829)
Description
I'm doing feature matching in OpenCV and I get the following exception:
OpenCV Error: Assertion failed (masks[i].rows == queryDescriptorsCount && masks[i].cols == trainDescCollection[i].rows && masks[i].type() == CV_8UC1) in checkMasks, file /u/sglaser/megaslam/opencv2/build/opencv-svn/modules/features2d/src/matchers.cpp, line 267 terminate called after throwing an instance of 'cv::Exception' what(): /u/sglaser/megaslam/opencv2/build/opencv-svn/modules/features2d/src/matchers.cpp:267: error: (-215) masks[i].rows == queryDescriptorsCount && masks[i].cols == trainDescCollection[i].rows && masks[i].type() == CV_8UC1 in function checkMasks
Though the exception does tell me that one of these conditions is failing, it doesn't tell me which one. Please split large assertions like this into separate assertions so the user can easily tell which condition is the problem.
Associated revisions
split big assertion in cv::split by parts; patch #829 by Shlomi Fish
Merge pull request #829 from SpecLad:sphinx-ver-1
History
Updated by shlomifrsip - about 13 years ago
Hi, regarding the last patch:
1. In the svn commit, please credit it as written by Shlomi Fish ( http://www.shlomifish.org/ ) as part of his work for Ron Soferman Image Processing ( http://www.rsip.co.il/ ).
2. This particular assert tripped me in person, so I decided to remedy it for the benefit of future generations.
3. Personally, I'd prefer that, in case of error, the values of some of the expressions in the comparisons would be noted (so the programmers will be able to tell what they are) , but I don't know how to do that easily.
Regards,
-- Shlomi Fish
Updated by Alexander Shishkov about 13 years ago
- Description changed from I'm doing feature matching in [[OpenCV]] and I get the following exceptio... to I'm doing feature matching in [[OpenCV]] and I get the following exceptio... More
Updated by Alexander Shishkov almost 13 years ago
- Tracker changed from Feature to Patch
- Priority changed from High to Normal
- Target version deleted ()
Updated by Alexander Shishkov almost 13 years ago
- Priority changed from Normal to Low
Updated by Alexander Shishkov almost 13 years ago
- Assignee deleted (
Vadim Pisarevsky)
Updated by Vadim Pisarevsky almost 13 years ago
thanks! finally, applied in r7643
- Status changed from Open to Done
- Assignee set to Vadim Pisarevsky
Updated by Alexander Shishkov almost 13 years ago
- Target version set to 2.4.0