mathematica_20081202.jpg

A clown fish, diced into 40 pixel squares.

Theodore Gray demonstrated some impressive image processing features of Mathematica 7 on the Wolfram blog. You can drag and drop an image right into a line of code and perform a number of image processing functions on it directly.

I’m not sure how many of you are Mathematica users—I haven’t used it myself since college—but from a UI design perspective, it’s very cool to see multimedia assets integrated so seamlessly into a programming language.

This function identifies patches that are similar in color, then connects them into a network. The parameter says how many neighbors to look at before building the network.

mathematica_20081202-2.jpg

The same tools can be used to process through frames of video. In one example Theodore shows off about 15 lines of functional code that can separate flying ducks from a stream of video by examining the morphology of the image frame and identifying the unique objects. Pretty impressive stuff.

Mathematica Image Processing