SimpleCV

From FRC Illawarra Wiki
Jump to: navigation, search

Code Snippets

import SimpleCV

camera = SimpleCV.Camera()

image = camera.getImage()

image.show()

c = SimpleCV.Camera()

c.getImage().save("picture.jpg")


yellow = image.colorDistance(Color.YELLOW)

yellow.show()


raspistill -t 5000

This will display a preview window for 5 seconds.


Installation

https://github.com/OpenLabTools/OpenLabTools/wiki/Using-the-Raspberry-Pi-camera-module-with-SimpleCV

Object Types (http://simplecv.sourceforge.net/doc/SimpleCV.Features.html)

Blob Type (cluster of pixels)

area() pixels

aspectRatio() Width/Height

bottomLeftCorner() (x,y) of bottom left corner

center() (x,y) of centre of box surrounding blob

centroid() Return the centroid (mass-determined center) of the blob

http://simplecv.readthedocs.org/en/1.0/cookbook/

http://simplecv.readthedocs.org/en/1.0/cookbook/#loading-and-saving-images


Optional Extras:

http://openkinect.org/wiki/Main_Page


Raspberry Pi

http://www.linux-projects.org/modules/sections/index.php?op=viewarticle&artid=14

Examples

http://tutorial.simplecv.org/en/latest/examples/parking.html

http://tutorial.simplecv.org/en/latest/examples/display.html

http://simplecv.org/

https://gist.github.com/sight-machine/5406587