Improve exception message in cvFindCornersSubPix (Bug #1717)
Description
Hi,
today, I solved my problem with the following exception being thrown:
OpenCV Error: Bad type of mask argument () in cvFindCornerSubPix, file /build/src/OpenCV-2.3.1/modules/imgproc/src/cornersubpix.cpp, line 71
terminate called after throwing an instance of 'cv::Exception'
what(): /build/src/OpenCV-2.3.1/modules/imgproc/src/cornersubpix.cpp:71: error: (-208) in function cvFindCornerSubPix
This error message does not even hint at the fact that the wrong type of image (rgb instead of grayscale) was being passed to the function.
Please improve this error message to hint at the possible error, for instance: "Bad type of mask argument(), possibly wrong image type. Please pass a monochrome image (Mat_<char>) as first argument."
Thanks!
Gašper
Associated revisions
Merge pull request #1717 from alalek:ocl_adjust_worksize
History
Updated by Andrey Kamaev almost 13 years ago
The problem was fixed in r6786. The fix is already released with OpenCV 2.4.0.
- Status changed from Open to Done
- Target version set to 2.4.0
- Assignee set to Vadim Pisarevsky