Skip to content

Instantly share code, notes, and snippets.

Created April 17, 2013 18:31
What would you like to do?
An example of keypoint detection using SimpleCV.
from SimpleCV import Image, Color, Display
# load an image from imgur
img = Image('')
# use a keypoint detector to find areas of interest
feats = img.findKeypoints()
# draw the list of keypoints
# show the resulting image.
# apply the stuff we found to the image.
output = img.applyLayers()
# save the results.'juniperfeats.png')
Copy link

muroshi commented May 25, 2014

I receive:
Fatal Python error: (pygame parachute) Segmentation Fault [Finished in 1.2s with exit code -6]

Copy link

tyoc213 commented Jun 30, 2014

TypeError                                 Traceback (most recent call last)
C:\Python27\lib\site-packages\SimpleCV\Shell\Shell.pyc in <module>()
      3 img = Image('')
      4 # use a keypoint detector to find areas of interest
----> 5 feats = img.findKeypoints()
      6 # draw the list of keypoints
      7 feats.draw(color=Color.RED)

C:\Python27\lib\site-packages\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)
   7752         if( flavor in ["ORB", "SIFT", "SURF"]  and kp!=None and d !=None ):

C:\Python27\lib\site-packages\SimpleCV\ImageClass.pyc in _getRawKeypoints(self, thresh, flavor, highQuality, forceReset)
   7344                     #mask = self.getGrayNumpy()
   7345                     #mask.fill(255)
-> 7346                     self._mKeyPoints,self._mKPDescriptors = surfer.detect(self.getGrayNumpy(),None,useProvidedKeypoints = False)
   7347                     if( len(self._mKPDescriptors) == 0 ):
   7348                         return None, None

TypeError: FeatureDetector.detect() takes at most 2 arguments (3 given)

Copy link

cletrix commented Nov 7, 2014

I receive too:

TypeError: FeatureDetector.detect() takes at most 2 arguments (3 given)

If someone has any ideas please post here , thanks.

Copy link

sodle commented Jan 12, 2016

I receive:

Traceback (most recent call last):
  File "", line 5, in <module>
    feats = img.findKeypoints()
  File "/usr/lib/python2.7/site-packages/SimpleCV/", line 7750, in findKeypoints
    kp,d = self._getRawKeypoints(thresh=min_quality,forceReset=True,flavor=flavor,highQuality=0)
  File "/usr/lib/python2.7/site-packages/SimpleCV/", line 7343, in _getRawKeypoints
    surfer = cv2.SURF(hessianThreshold=thresh,extended=highQuality,upright=1)
AttributeError: 'module' object has no attribute 'SURF'

Copy link

wilkic commented Jul 10, 2016

On line5: feats = img.findKeypoints() I get a seg fault:

Using ipdb, I've traced it down to
/usr/local/lib/python2.7/dist-packages/SimpleCV/ 1941 -> 1942 return self._grayNumpy

which then yields:
Fatal Python error: (pygame parachute) Segmentation Fault Aborted (core dumped)

The numpy array looked fine prior to returning it, so not sure why it faulted. Has anyone else encountered this before?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment