Skip to content

Instantly share code, notes, and snippets.

@vighneshbirodkar
Created July 25, 2013 10:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vighneshbirodkar/6078640 to your computer and use it in GitHub Desktop.
Save vighneshbirodkar/6078640 to your computer and use it in GitHub Desktop.
from SimpleCV import Image
from SimpleCV import Display,Camera
from socket import setdefaulttimeout
import SimpleCV as scv
setdefaulttimeout(None)
cam = Camera()
d1 = Display(title = "Resize to fit", fit = scv.RESIZE)
d2 = Display(title = "Crop to fit", fit = scv.SCROLL)
img = Image('lenna')
dl = img.getDrawingLayer()
dl.text("Zoom In/Out",(100,100),size = 20,color = (255,255,255))
fs = img.findLines()
fs.draw()
d2.showImage(img)
while(True):
img = cam.getImage()
dl = img.getDrawingLayer()
dl.text("Resize Me",(200,200),size = 20,color = (255,255,255))
d1.showImage(img)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment