So it's been a long time since I've updated my blog, but it's in order.  First let me start by saying I've been pretty busy over the past year or two, mainly involved in vision system type work but also some web application development as well. Upon working in these industries I have found there are many powerful web development frameworks, and there are a lot of various powerful machine vision libraries available as it stands today. There aren't a whole lot of open source based computer vision libraries, although the ones that exist like OpenCV, are quite powerful and are used in things like the Robot Operating System, and to power googles automous vehicle.  One of the main issues with OpenCV is that the code is fairly complex, and installation isn't so straight forward either.  There is also nothing from a user interface perspective that is cross platform, simple, and easy to use.

 

To help change that, a few months ago I came on board as Cheif Technology Officer at a ann arbor,mi based startup called Ingenuitas with one of the founders of slashdot, Nate Oostendorp (CEO).  Also working with Ingenuitas is Computer Science Ph.D candidate Katherine Scott.  Together over the past few months we've been working to make a open source based machine vision library.  Python was the language of choice as the syntax is very clean and easy to read, it is also cross platform. We are focusing on trying to make the user interfaced driven from within the web browser as to keep everything uniform across systems, so your code should work the same on windows, mac, linux, etc. The library has now been released into the wild and can be downloaded over at SimpleCV.org.  The library is meant to be easily installed on any platform, be it windows, mac, or linux, with just 1-click.  It was also meant to make it easy to add other various devices like multiple web cams, or even an xbox kinect.

Here is a video demo of what simplecv is already capable of with literally 25 lines of code:

 

Here is the code to do all that:

import time, webbrowser
from operator import add
from SimpleCV import VideoStream, JpegStreamer, Kinect, Image
import numpy as np
 
vs = VideoStream("foo.avi")
js = JpegStreamer()
cam = Kinect()
 
cam.getDepth().save(js)
webbrowser.open(js.url())
compositeframe = Image(cam.getImage().getEmpty())
offtime = 3.0
paintstate = False
laststroke = time.time()
 
while (1):
  depth = cam.getDepth().invert().binarize(100)
  
  if np.average(depth.getMatrix()) > 1:
    paintstate = True
    laststroke = time.time()
    compositeframe = compositeframe + depth
  else:
    paintstate = False 
    if (time.time() - laststroke > offtime):
      compositeframe = Image(cam.getImage().getEmpty())
 frame = ((cam.getImage() - compositeframe) + compositeframe.splitChannels(False)[0]).flipHorizontal()
 frame.save(js)
 frame.save(vs)
 time.sleep(0.01)
 

 

 

I'm proud to say I've helped acheive this.  Last week 1.0 was released.  Very shortly 1.1 will be released.  SimpleCV is expected to have quick release cycles as well, so you can expect some of the newer vision techniques and algorithms to be implemented quickly. The development is also using git, which makes it extremely easy to stay up to date or to fork off and implement your own code.  There are many video tutorials explaining how to setup your environment and example code to get learning.  Head over to http://www.simplecv.org and check it out today.