Tag Archives: artificial intelligence

Polygon Image Compression

This is a pale imitation of an awesome algorithm i saw somewhere that i can’t find any more.
What it does is fill a number of images with 200 randomly sized and coloured 3 sided polygons. It then compares them all with the output image and selects the best matching 10. These are then mutated slightly and randomly combined together. This repeats a number of times. The final image is then an approximate of the input image, but made up from 3 sided polygons.

Well, that was the idea, but i’ve ran out of steam on this one. So far i’ve implemented most of the evolutionary algorithm, apart from mutating/crossing the colours each generation.

The plan was to extended this for encoding video and speed it up a bit (took a bout an hour to encode a single image), and also getting it to approximate the input image better.

Image Comparison

Original image and processed image side by side

Advertisements