Skip to content

Instantly share code, notes, and snippets.

sight-machine

View GitHub Profile
@sight-machine
sight-machine / keypoint.py
Created Apr 17, 2013
An example of keypoint detection using SimpleCV.
View keypoint.py
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.
@sight-machine
sight-machine / edges.py
Created Apr 17, 2013
A simple Canny edge detector demo using SimpleCV.
View edges.py
# Make a function that does a half and half image.
def halfsies(left,right):
result = left
# crop the right image to be just the right side.
crop = right.crop(right.width/2.0,0,right.width/2.0,right.height)
# now paste the crop on the left image.
result = result.blit(crop,(left.width/2,0))
# return the results.
return result
# Load an image from imgur.
@sight-machine
sight-machine / binarize.py
Created Apr 17, 2013
Image threshold with a side-by-side view using SimpleCV.
View binarize.py
from SimpleCV import Image, Color, Display
# Make a function that does a half and half image.
def halfsies(left,right):
result = left
# crop the right image to be just the right side.
crop = right.crop(right.width/2.0,0,right.width/2.0,right.height)
# now paste the crop on the left image.
result = result.blit(crop,(left.width/2,0))
# return the results.
You can’t perform that action at this time.