2012-09-26

Detecting colored shapes!


As you all know, we (the projector group) are trying to work out a way to share a physical workspace over the web using a projector and a camera. In short, we will project a rectangle on a desk, film the desk and then analyze the video to find the rectangle. Whatever the camera sees within the rectangle is streamed to the other users.

Me and Nicklas (PB!) have been working on detecting colored shapes in a live video stream. This is done in a few simple steps:

  1. Convert the image from RGB to HSV-space.
  2. Use thresholding to filter out everything but the (in this example) red parts of the image. 
  3. Detect polygons in the filtered image with the help of JS-ArUco (http://code.google.com/p/js-aruco/)
  4. (upcoming) Decide which, if any, of the detected polygons is the rectangle we are looking for.
  5. (upcoming) Calibrate the outgoing video stream using the corners of the rectangle.
It works pretty well, check out the video demonstrating steps 1-3 in action below! The white frame on the right shows the filtered image, and the detected rectangles are marked in blue.



PS. Sorry for the lack of sound in the video, we'll make a new one if you really want to hear our voices! :)

PPS. We are also working on some artwork for the project (logo coming soon!), and some storyboards in collaboration with the other groups.

No comments:

Post a Comment