Bug in cvExtractSURF() (Bug #373)


Added by Subhabrata Bhattacharya almost 15 years ago. Updated almost 13 years ago.


Status:Cancelled Start date:
Priority:High Due date:
Assignee:Maria Dimashova % Done:

0%

Category:features2d
Target version:-
Affected version: Operating System:
Difficulty: HW Platform:
Pull request:

Description

Whenever I increase the hessian threshold to somewhere around 3000(for images that have low illumination), I get an error like this:

OpenCV Error: Incorrect size of input array (Non-positive width or
height) in cvCreateMatHeader, file
/home/subh/Downloads/OpenCV-2.1.0/src/cxcore/cxarray.cpp, line 113
terminate called after throwing an instance of 'cv::Exception'
what(): /home/subh/Downloads/OpenCV-2.1.0/src/cxcore/cxarray.cpp:113:
error: (-201) Non-positive width or height in function
cvCreateMatHeader

The images are a little dark but features(corners) are clearly
visible. I was wondering if we can handle this exception from inside the function (may be by returning 0 for successful calls and -1 for such failed cases).

Please also find attached the GDB backtrace of the call stack.

(gdb) bt
#0 0x0012d422 in kernel_vsyscall ()
#1 0x00a574d1 in *+GI_raise (sig=6) at
../nptl/sysdeps/unix/sysv/linux/raise.c:64
#2 0x00a5a932 in *+GI_abort () at abort.c:92
#3 0x009b34df in +gnu_cxx::+verbose_terminate_handler() () from
/usr/lib/libstdc
+.so.6
#4 0x009b1415 in ?? () from /usr/lib/libstdc++.so.6
#5 0x009b1452 in std::terminate() () from /usr/lib/libstdc++.so.6
#6 0x009b1591 in cxa_throw () from /usr/lib/libstdc+.so.6
#7 0x006f1ca3 in cv::error(cv::Exception const&) () from
/usr/local/lib/libcxcore.so.2.1
#8 0x007c6fd4 in cvCreateMatHeader () from /usr/local/lib/libcxcore.so.2.1
#9 0x007d3392 in cvCreateMat () from /usr/local/lib/libcxcore.so.2.1
#10 0x003e37f1 in cv::SURFInvoker::operator()(cv::BlockedRange const&)
const () from /usr/local/lib/libcv.so.2.1
#11 0x003e549f in cvExtractSURF () from /usr/local/lib/libcv.so.2.1


00000008.jpg (1.7 kB) Subhabrata Bhattacharya, 2010-06-08 04:32 pm


Related issues

duplicates Bug #68: C++ SURF crash by flat image Done

Associated revisions

Revision 9b4f2d1b
Added by Andrey Kamaev about 12 years ago

Merge pull request #373 from ilysenkov:bugfix_2440

History

Updated by Jerry Fetcher almost 15 years ago

You can also check Ticket #68

The reason is when there is a frame with no keypoints (blank scene with all white pixels, or in your case low illimunation, and no features), the program crashes with error message

OpenCV Error: Incorrect size of input array (Non-positive width or height) in unknown function, file ..\..\..\ocv\opencv\src\cxcore\cxarray.cpp, line 113

You can edit cvsurf.cpp (https://code.ros.org/trac/opencv/attachment/ticket/68/surf-crash.diff) and then rebuild dll files. That will solve your problem.

Updated by Victor Eruhimov over 14 years ago

  • Status deleted (Open)

Updated by Maria Dimashova over 14 years ago

Closed by the same reason as #68.

  • Status set to Done
  • (deleted custom field) set to fixed

Updated by Andrey Kamaev almost 13 years ago

  • Status changed from Done to Cancelled

Updated by Andrey Kamaev almost 13 years ago

  • Category set to features2d

Also available in: Atom PDF