Ask Your Question
1

findKeypoints causes seg fault / core dump

asked 2013-05-09 02:06:36 -0500

benmccann gravatar image

updated 2013-05-09 10:47:59 -0500

Any ideas what I might be doing wrong? This is on Ubuntu 13.04. I'm using OpenCV 2.4.2. Here's the image I was trying to find keypoints for.

Python 2.7.4 (default, Apr 19 2013, 18:28:01) 
[GCC 4.7.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from SimpleCV import Shell
>>> Shell.main()

+-----------------------------------------------------------+
 SimpleCV 1.3.0 [interactive shell] - <a href="http://simplecv.org">http://simplecv.org</a>
+-----------------------------------------------------------+

Commands: 
    "exit()" or press "Ctrl+ D" to exit the shell
    "clear" to clear the shell screen
    "tutorial" to begin the SimpleCV interactive tutorial
    "example" gives a list of examples you can run
    "forums" will launch a web browser for the help forums
    "walkthrough" will launch a web browser with a walkthrough

Usage:
    dot complete works to show library
    for example: Image().save("/tmp/test.jpg") will dot complete
    just by touching TAB after typing Image().

Documentation:
    help(Image), ?Image, Image?, or Image()? all do the same
    "docs" will launch webbrowser showing documentation

SimpleCV:1> i1 = Image("images/1a.jpg")

SimpleCV:2> kp = i1.findKeypoints(flavor="SIFT")
Fatal Python error: (pygame parachute) Segmentation Fault
Aborted (core dumped)

If I try with SURF I instead get the error:

AttributeError                            Traceback (most recent call last)
/usr/lib/pymodules/python2.7/SimpleCV/Shell/Shell.pyc in <module>()
----> 1 i1.findKeypoints(flavor="SURF")

/usr/lib/pymodules/python2.7/SimpleCV/ImageClass.pyc in findKeypoints(self, min_quality, flavor, highQuality)
   7748             kp,d = self._getRawKeypoints(thresh=min_quality,forceReset=True,flavor=flavor,highQuality=1)
   7749         else:
-> 7750             kp,d = self._getRawKeypoints(thresh=min_quality,forceReset=True,flavor=flavor,highQuality=0)
   7751 
   7752         if( flavor in ["ORB", "SIFT", "SURF"]  and kp!=None and d !=None ):

/usr/lib/pymodules/python2.7/SimpleCV/ImageClass.pyc in _getRawKeypoints(self, thresh,     flavor, highQuality, forceReset)
   7341             elif( new_version == 2 and flavor in ["SURF", "FAST"] ):
   7342                 if( flavor == "SURF" ):
-> 7343                     surfer = cv2.SURF(hessianThreshold=thresh,extended=highQuality,upright=1)
   7344                     #mask = self.getGrayNumpy()
   7345                     #mask.fill(255)

AttributeError: 'module' object has no attribute 'SURF'
edit retag flag offensive close merge delete

Comments

What OpenCV version are you using? Also, could you try to use this method on image of Lenna?

jayrambhia gravatar imagejayrambhia ( 2013-05-09 07:40:18 -0500 )edit

I'm updated with more details including the version of OpenCV I am using. I get the same error on the image of Lenna.

benmccann gravatar imagebenmccann ( 2013-05-09 10:54:33 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2013-05-09 08:50:43 -0500

kscottz gravatar image

Could you perhaps post the offending image? It is also helpful to know the version of OpenCV you are using. You can find this out by calling the following in the shell:

import cv2
cv2.__version__

Is your heart set on using SIFT? Do you get the same behavior for some of the other keypoint flavors?

edit flag offensive delete link more

Comments

I've posted the image (though I get the same error on the lenna image), the version of OpenCV I am using, and the error I get with SURF as well.

benmccann gravatar imagebenmccann ( 2013-05-09 10:53:57 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2013-05-09 02:06:36 -0500

Seen: 2,210 times

Last updated: May 09 '13