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. 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.

  2. @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! :)

  3. @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.

  4. 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

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.