Skip to content

Instantly share code, notes, and snippets.

@sight-machine
Created April 17, 2013 18:31
Show Gist options
  • Save sight-machine/5406600 to your computer and use it in GitHub Desktop.
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')
@wilkic
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/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