# algorithm - Image processing ideas

Recently I've been messing about with algorithms on images, partly for fun and partly to keep my programming skills sharp.

I've just implemented a 'nearest-neighbour' algorithm that picks n random pixels in an image, and then converts the colour of each other pixel in the image to the colour of its nearest neighbour in the set of n chosen pixels. The result is a kind of "frosted glass" effect on the image, for a reasonably large value of n (if n is too small then the image gets blocky).

I'm just wondering if anyone has any other good/fun algorithms on images that might be interesting to implement?

Tom

This book, Digital Image Processing, is one of the most commonly used books in image processing classes, and it will teach you a lot of basic techniques that will help you understand other algorithms better, like the ones Ants Aasma suggested.

Try making an Andy Warhol print. It's pretty easy in Java. For more ideas, just look at the filters available in GIMP or a similar program.

Marching Squares is a computer vision algorithm. Try using that to convert black and white raster images to object based scenes.

• Turns the image into a pizza
• Take N images, relate them via an MC-Escher-style painting
• "Explode" an image from the inside out
• Convert the image into a single-color blocks (piet-style) based on all the colours within.

Fun to toy with and easy to code filters are:

• kaleidoscope
• lens
• twirl

There are a lot of other filters, but especially the kaleidoscope gives much bang for the bucks. I have made my own graphics editor with lots of filters and is also looking for inspiration.

Instead of coding image filters, I personally would love to code Diffusion Curves, but unfortunately have little time for fun.

If you want to try something more challenging look for SIGGRAPH papers on the web. There are some really nifty image algorithms presented at that conference. Seam carving is one cool example that is reasonably straightforward to implement.

If you want something more challenging try to complete the symmetry of broken objects