Skip to content

Instantly share code, notes, and snippets.

@sight-machine
Created April 17, 2013 18:31
Show Gist options
  • Select an option

  • Save sight-machine/5406600 to your computer and use it in GitHub Desktop.

Select an option

Save sight-machine/5406600 to your computer and use it in GitHub Desktop.
An example of keypoint detection using SimpleCV.
from SimpleCV import Image, Color, Display
# load an image from imgur
img = Image('http://i.imgur.com/lfAeZ4n.png')
# use a keypoint detector to find areas of interest
feats = img.findKeypoints()
# draw the list of keypoints
feats.draw(color=Color.RED)
# show the resulting image.
img.show()
# apply the stuff we found to the image.
output = img.applyLayers()
# save the results.
output.save('juniperfeats.png')
@cletrix

cletrix commented Nov 7, 2014

Copy link
Copy Markdown

I receive too:

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

If someone has any ideas please post here , thanks.

@sodle

sodle commented Jan 12, 2016

Copy link
Copy Markdown

I receive:

ERROR: 
Traceback (most recent call last):
  File "canny_example.py", line 5, in <module>
    feats = img.findKeypoints()
  File "/usr/lib/python2.7/site-packages/SimpleCV/ImageClass.py", 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/ImageClass.py", line 7343, in _getRawKeypoints
    surfer = cv2.SURF(hessianThreshold=thresh,extended=highQuality,upright=1)
AttributeError: 'module' object has no attribute 'SURF'

@wilkic

wilkic commented Jul 10, 2016

Copy link
Copy Markdown

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/ImageClass.py(1942)getGrayNumpy() 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