Slide 50
Slide 50 text
Quick Start! What is SimpleCV? SimpleCV Basics Image Basics Really Basic Operations Basic Manipulations Rendering Inform
Go crazy with drawing.
Example (Basic Manipulations)
img = Image(’tricky.jpg’)
poly = [(0,0),(30,50),(123,213),(234,234),(333,434)]
img.dl().polygon(poly,color=Color.GREEN,filled=True)
for i in xrange(30,90,9):
poly2 = [(p[0]+i,p[1]+i) for p in poly]
img.dl().polygon(poly2,color=Color.getRandom(),filled=True,alpha=128)
img.drawRectangle(130,190,200,50,color=Color.BLACK,width=-1,alpha=128)
img.drawCircle((170,220),20,color=Color.WHITE)
img.drawCircle((230,220),20,color=Color.WHITE)
img.drawLine((0,0),(100,100),color=Color.PUCE,thickness=3)
img.drawLine((300,200),(300,200),color=Color.PUCE,thickness=3)
img.drawLine((45,300),(300,45),color=Color.PUCE,thickness=3)
img.drawText(’HELLO WORLD!’,30,30,fontsize=60)
img.show()
img.applyLayers().save(’crazynixon.png’)
img.clearLayers()
img.show()
Katherine Scott Introduction to SimpleCV