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.

Comments

  1. BitMage says:

    Trippy, I want one.
    (Also, first post!)

  2. Roon says:

    I’d like to see this done with kinect… I imagine you could get some great results that way.

  3. Trent says:

    Count down to this being used in a band’s music video – 3…2…1…

  4. alan says:

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

  5. I love it, I have been wanting to do this for a long time. Sadly, I just dont know how to code edge detection in C for an embeded app.

  6. cmholm says:

    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.

  7. limpkin says:

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

  8. Hirudinea says:

    I don’t know what to say except I am impressed.

  9. w00tb0t says:

    Old droid sparkfuns ioio “yoyo” led array and I think I have a new project.

  10. cmholm says:

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

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

  12. Gunpowder says:

    You don’t need a LED wall for a club DJ display, just route it to a projector using vectors or dots..

  13. Robot says:

    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:

WordPress.com Logo

You are commenting using your WordPress.com 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

Follow

Get every new post delivered to your Inbox.

Join 92,435 other followers