GPU programming for easy & fast image processing

If you ever need to manipulate images really fast, or just want to make some pretty fractals, [Reuben] has just what you need. He developed a neat command line tool to send code to a graphics card and generate images using pixel shaders. Opposed to making these images with a CPU, a GPU processes every pixel in parallel, making image processing much faster.

All the GPU coding is done by writing a bit of code in GLSL. [Reuben]’s command line utility takes that code, sends it to the graphics card, and returns the image calculated by the GPU. It’s very simple for to make pretty Mandebrolt set images and sine wave interference this way, but [Reuben]’s project can do much more than that. By sending an image to the GPU and performing a few operations, [Reuben] can do very fast edge detection and other algorithmic processing on pre-existing images.

So far, [Reuben] has tested his software with a few NVIDIA graphics cards under Windows and Linux, although it should work with any graphics card with pixel shaders.

Although [Reuben] is sending code to his GPU, it’s not quite on the level of the NVIDIA CUDA parallel computing platform; [Reuben] is only working with images. Cleverly written software could get around that, though. Still, even if [Reuben]’s project is only used for image processing, it’s still much faster than any CPU-bound method.

You can grab a copy of [Reuben]’s work over on GitHub.

Bluetooth communications for Android devices via Processing

[Oscar] shows us how to use a Processing sketch for Android to communicate with Bluetooth devices (translated). It turns out this is easier than you might think. Processing and Android are both closely related to Java, and you can just import the Android libraries that deal with Bluetooth within the Processing sketch. That makes it easy to enable the Bluetooth modem when the sketch is launched, and manages connecting with devices as well as sending and receiving data.

For this example [Oscar] is using an Arduino with a Bluetooth module as a test device. His sketch first shows what devices are available, then connects to the one you select from the list. The 11 lines of Arduino code transmit a value via the serial port, and listens back for a command to toggle the LED on pin 13. [Oscar] takes time in his tutorial to show us how each step of the Processing sketch is assembled, instead of only posting the finished code.

[Thanks Sara]

Analyzing TV’s talking heads with Processing


[Michael] from Nootropic Design wrote in to share an interesting and fun project he put together using one of the products his company sells. The gadget in question is their “Video Experimenter” shield which was designed for the Arduino. It is typically used to allow the manipulation of composite video streams via overlays and the like, but it can also serve as a video analyzer as well.

When used for video analysis, the board lets you decode closed captioning data, which is exactly what [Michael] did here. He decided it would be fun to scrape the closed captioning information from various shows and commercials to do a little bit of content analysis.

Using a Processing sketch on his Arduino, he reads the closed captioning feed from his cable box, keeping a count of every word mentioned in the broadcast. As the show progresses, his sketch dynamically constructs a cloud that shows the most commonly used words in the video feed.

The results he gets are quite interesting, especially when he watches the nightly news, or some other broadcast with a specific target audience. We think it would be cool to run this application during a political debate or perhaps during a Hollywood awards ceremony to discover which set of speakers is the most vapid.

if you’re interested in learning more about the decoding process, [Michael] has put together a detailed explanation of how the closed captioning data can be pulled from a video stream. For those of you who just want to see the decoder in action, keep reading to see a quick video demonstration.

Continue reading “Analyzing TV’s talking heads with Processing”

360 degree photography uses very easy post-processing

[Pixel_Outlaw] has been working on a method to capture 360 images with his camera. He’s using a shiny Christmas ball ornament to reflect the entire room into the lens of the camera. In the unwrapped image you can make out the three legs of his tripod. In that snapshot he laid the ornament on the floor and pointed the camera straight down from above.

What catches our attention is the post processing he used to unwrap the image. He loaded up The Gimp, an open source image manipulation program, and used just three steps to unwrap the image. First he cropped the picture so that it was square and the spherical ornament was perfectly centered. Then he ran the polar coordinates filter. Finally he scaled the image, setting the width to be Pi times the height. Works pretty darned well for something that doesn’t take much fiddling.

The ornament wasn’t perfectly smooth (or maybe it was a bit dirty) but you can get a much better starting image if you use a bulb with a silver reflector like we saw in this older hack.

Macetech is looking for a few good Processing programmers


[Garrett Mace] wrote to us in hopes of finding a few good programmers to help him out with a project he’s been working on for Maker Faire Bay Area 2011.

More specifically, he is looking for Processing programmers who are also pretty decent with graphics. Macetech’s big project for this year’s Maker Faire is a large overhead light matrix constructed from Chinese lanterns. They are using their new Satellite LED modules to light the 128-lantern array, which is laid out in a 16×8 matrix.

It seems that the Macetech crew has been so busy getting the array built and tested that they don’t have much time to program any visualizations for it – that’s where you come in. If you are so inclined, simply download his matrix simulation code, put together some cool displays, and send them his way. [Garrett] says that they will be taking video of the visualizations, so even if you can’t attend Maker Faire, we will all be able to enjoy your hard work (though it would be pretty cool if they sent contributors a Satellite LED module “sample” as well!)

Keep reading to see a quick demo video of the simulation software to get an idea of what they are looking for visualization-wise.

Continue reading “Macetech is looking for a few good Processing programmers”

Building a zoetrope using Kinect, processing, and a laser cutter

A zoetrope is a device that contains a disk full with a series of images that make up and animation. A couple of different methods can be used to trick the eye into seeing a single animated image. In the past this was done by placing the images inside of a cylinder with slits at regular distances. When spun quickly, the slits appear to be stationary, with the images creating the animation. But the same effect can be accomplished using a strobe light.

The disk you see above uses the strobe method, but it’s design and construction is what caught our eye. The animated shapes were captured with a Kinect and isolated using Processing. [Greg Borenstein] takes a depth movie recorded while someone danced in front of a Kinect. He ran it through a Processing sketch and was able to isolate a set of slides that where then turned into the objects seen above using a laser cutter.

You can watch a video of this particular zoetrope after the break. But we’ve also embedded the Pixal 3D zoetrope clip which, although unrelated to this hack, is extremely interesting. Don’t have a laser cutter to try this out yourself? You could always build a zoetrope that uses a printed disk.

Continue reading “Building a zoetrope using Kinect, processing, and a laser cutter”

Android apps using Processing

Processsing has come to Android. [Jer] posted a guide to setting up the software and coding your first Processing app for Android. The module which supports Google’s mobile operating system is not yet part of the stable Processing release but it works and is available to download and use. It provides support for Android version 2.1 and newer, playing nicely with the SDK to emulate your sketches during development. The Hello World app seen above uses just a few lines of code to draw a white box on an orange background. After you’ve installed and tested the tools you’ll be developing in no time.

This makes a great addition to your Android development tool bag.

[Thanks Tech B]