Ask Your Question
0

ORB crashes on specific image.... how do I handle this correctly?

asked 2013-11-15 08:48:45 -0600

jk89 gravatar image

updated 2013-11-15 12:33:14 -0600

berak gravatar image

My code:

#0rb test
img=cv2.imread("training_data/positives/img3348.jpg",0)
print img,type(img),img.shape,type(img[0][0])

OrbParams={"nfeatures":500,"scaleFactor":1.5,"nlevels":8,"edgeThreshold":31,"firstLevel":0,"WTA_K":2,
"scoreType":0,"patchSize":31}
ShinyMysteriousOrb=cv2.ORB(**OrbParams)

print ShinyMysteriousOrb.detectAndCompute(img,None)

Now this works fine for most images, but there is a specific one which triggers inconsistent behaviour.... Infrequently it works, mostly it crashes with either of the following errors:

  • python: malloc.c:3637: _int_malloc: Assertion `(unsigned long)(size) >= (unsigned long)(nb)' failed. Aborted (core dumped)
  • Segmentation fault (core dumped)
  • * Error in `/usr/bin/python': corrupted double-linked list: 0x0000000004814ed0 *

On that last one there are three *'s on either side... but opencv answers interprets two of these as bold. Also note that with the third error the console hangs and won't release control back to me i have to control z it.

Console vomit:

jonathan@jonathan-laptop:
[[0 0 0 ..., 0 0 0]
 [0 0 0 ..., 0 0 0]
 [0 0 0 ..., 0 0 0]
 ..., 
 [0 0 0 ..., 0 0 0]
 [0 0 0 ..., 0 0 0]
 [0 0 0 ..., 0 0 0]] <type 'numpy.ndarray'> (240, 320) <type 'numpy.uint8'>
*** Error in `/usr/bin/python': corrupted double-linked list: 0x0000000004814ed0 ***
jonathan@jonathan-laptop:
[[0 0 0 ..., 0 0 0]
 [0 0 0 ..., 0 0 0]
 [0 0 0 ..., 0 0 0]
 ..., 
 [0 0 0 ..., 0 0 0]
 [0 0 0 ..., 0 0 0]
 [0 0 0 ..., 0 0 0]] <type 'numpy.ndarray'> (240, 320) <type 'numpy.uint8'>
jonathan@jonathan-laptop:
[[0 0 0 ..., 0 0 0]
 [0 0 0 ..., 0 0 0]
 [0 0 0 ..., 0 0 0]
 ..., 
 [0 0 0 ..., 0 0 0]
 [0 0 0 ..., 0 0 0]
 [0 0 0 ..., 0 0 0]] <type 'numpy.ndarray'> (240, 320) <type 'numpy.uint8'>
([<KeyPoint 0x3ecde40>, <KeyPoint 0x3ece030>, <KeyPoint 0x3ece120>, <KeyPoint 0x3ece060>, <KeyPoint 0x3ece180>, <KeyPoint 0x3ece150>, <KeyPoint 0x3ece1b0>, <KeyPoint 0x3ece1e0>, <KeyPoint 0x3ece240>, <KeyPoint 0x3ece270>, <KeyPoint 0x3ece2d0>, <KeyPoint 0x3ece7b0>, <KeyPoint 0x3ece840>, <KeyPoint 0x3eceb70>, <KeyPoint 0x3ed57e0>, <KeyPoint 0x3c1b450>, <KeyPoint 0x3976b70>, <KeyPoint 0x39768a0>, <KeyPoint 0x3976840>, <KeyPoint 0x3976a20>, <KeyPoint 0x3976870>, <KeyPoint 0x39769f0>, <KeyPoint 0x3976960>, <KeyPoint 0x3ed69f0>, <KeyPoint 0x3ed6a20>, <KeyPoint 0x3ed6a50>, <KeyPoint 0x3ed6a80>, <KeyPoint 0x3ed6ae0>, <KeyPoint 0x3ed6b10>, <KeyPoint 0x3ed6b40>, <KeyPoint 0x3ed6b70>, <KeyPoint 0x3ed6bd0>, <KeyPoint 0x3ed6c00>, <KeyPoint 0x3ed6c30>, <KeyPoint 0x3ed6c60>, <KeyPoint 0x3ed6c90>, <KeyPoint 0x3ed6cc0>, <KeyPoint 0x3ed6cf0>, <KeyPoint 0x3ed6d20>, <KeyPoint 0x3ed6d50>, <KeyPoint 0x3ed6d80>, <KeyPoint 0x3ed6db0>, <KeyPoint 0x3ed6de0>, <KeyPoint 0x3ed6e10>, <KeyPoint 0x3ed6e40>, <KeyPoint 0x3ed6e70>, <KeyPoint 0x3ed6ea0>, <KeyPoint 0x3ed6f00>, <KeyPoint 0x3ed6f60>, <KeyPoint 0x3ed6f90>, <KeyPoint 0x3ed6fc0>, <KeyPoint 0x3eda060>, <KeyPoint 0x3eda0c0>, <KeyPoint 0x3eda120>, <KeyPoint 0x3eda180>, <KeyPoint 0x3eda1b0>, <KeyPoint 0x3eda240>, <KeyPoint 0x3eda270>, <KeyPoint 0x3eda2d0>, <KeyPoint 0x3eda300>, <KeyPoint 0x3eda330>, <KeyPoint 0x3eda360>, <KeyPoint 0x3eda390>, <KeyPoint 0x3eda3c0>, <KeyPoint 0x3eda3f0>, <KeyPoint 0x3eda4b0>, <KeyPoint 0x3eda510>, <KeyPoint 0x3eda540>, <KeyPoint 0x3eda570>, <KeyPoint 0x3eda5a0>, <KeyPoint 0x3eda5d0>, <KeyPoint 0x3eda600>, <KeyPoint 0x3eda630>, <KeyPoint 0x3eda660>, <KeyPoint 0x3eda6c0>, <KeyPoint 0x3eda6f0>, <KeyPoint 0x3eda750>, <KeyPoint 0x3eda780>, <KeyPoint 0x3eda7b0>, <KeyPoint 0x3eda7e0>, <KeyPoint 0x3eda810>, <KeyPoint 0x3eda840>, <KeyPoint 0x3eda8a0>, <KeyPoint 0x3eda8d0>, <KeyPoint 0x3eda930>, <KeyPoint 0x3eda9c0>, <KeyPoint 0x3edaa50>, <KeyPoint 0x3edaa80>, <KeyPoint 0x3edaab0>, <KeyPoint 0x3edaae0>, <KeyPoint 0x3edab10>, <KeyPoint 0x3edab40>, <KeyPoint 0x3edab70>, <KeyPoint 0x3edaba0>, <KeyPoint 0x3edac00>, <KeyPoint 0x3edac60>, <KeyPoint 0x3edac90>, <KeyPoint 0x3edacc0>, <KeyPoint 0x3edad80>, <KeyPoint 0x3edadb0 ...
(more)
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-11-18 04:07:35 -0600

I recommend you to add a ticket on OpenCV project bug tracker. I recommend you to add some minimal peace of code to reproduce the issue and all needed images.

edit flag offensive delete link more

Comments

jk89 gravatar imagejk89 ( 2013-11-18 05:04:17 -0600 )edit

Question Tools

Stats

Asked: 2013-11-15 08:48:45 -0600

Seen: 418 times

Last updated: Nov 18 '13