Improve exception message in cvFindCornersSubPix (Bug #1717)


Added by Gašper Ažman almost 13 years ago. Updated almost 13 years ago.


Status:Done Start date:2012-03-26
Priority:Low Due date:
Assignee:Vadim Pisarevsky % Done:

0%

Category:imgproc, video
Target version:2.4.0
Affected version: Operating System:
Difficulty: HW Platform:
Pull request:

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

Revision 089cf423
Added by Andrey Pavlenko over 11 years ago

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

Also available in: Atom PDF