Webcam images processed and played back on LED display

[Mathieu] has bee working to refine the code running on an LED matrix, and added some neat display tricks along the way. He wanted to make the display directly addressable from a computer. The 96×64 bi-color LED display is powered by an Atmel FPSLIC and already used double-buffering. Enabling a PC to write directly to one of the buffers was not too hard, requiring just a bit of optimization to get the timing right. From the look of the video after the break, he nailed it.

The video feed is generated from a webcam stream using Matlab to process each image. Just 50 lines of code captures a frame, sizes it appropriately, converts the result to black and white for edge detection, then finishes the job by compressing image data for transmission to the embedded processor. We’d like to say it’s easier that it sounds but we’re pretty impressed with this work. The display manages about 42 Hz with the current setup.

13 thoughts on “Webcam images processed and played back on LED display

  1. Would be cool to have the camera pointed at the DJ in a club with the big image behind him.

    Not sure it would be practical to build a massive LED wall though..

  2. A quick look at the function calls within Mathieu’s code suggests there’ll be no quick port to Octave or other free alternative. So, anyone without access to MATLAB will have to use the m-code as a guide for a C or Java implementation.

  3. @Trent & alan: I exactly thought of the same thing ^^
    @cmholm: well, better than nothing right? My article was just about how easy it is to do such nice stuff without spending too much time, with matlab. As Mathworks usually provides licenses to schools, I thought it could be interesting for other people. I welcome people having more time than me to do the same thing on free tools, and I would be very happy to edit my post with their work! :)

  4. @limpkin, absolutely. Given that MATLAB function documentation is readily available on-line, I think someone could code up alternatives without too much hassle.

    Lemme see if I’m smart enough to prove it.

  5. This is very easy to do using OpenCv, that is really just a CvCvtColor(CV_RGB2GRAY), CvCanny(…) and a for loop that will look for the desired threshold, thats a weekend project.

  6. This is neat; but the MATLAB image processing is done using the Image Processing Tool Box, which is not cheap. However as suggested above, OpenCV will do a credible job of this.

    Personally, I love MATLAB but do find it to be a pain to interface m-code with the real world. This person does a nice job of using the serial port for that task.

    – Robot

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s