Sunday, February 28, 2010

A thousand monkeys...

I'm currently working on a new algorithm which reminds me of the infinite monkey theorem (cf. http://en.wikipedia.org/wiki/Infinite_monkey_theorem).

The idea is to position different size brush strokes on an image to try and produce a kind of painting. The main idea is that the brush strokes are randomly (hence the monkeys...) positioned on the resulting image but are only kept if they produce a result closer to the original. Therefore if you run the filter long enough, with smaller and more precise brush strokes you should hopefully get a pleasing image. Well that's the theory anyway...

Here is an early example (just click on the picture to view full size), based on a photo of the city of Porto Venere (credits Stock.xchng):


The algorithm still needs a lot of tweaking, but I hope you'll like it.

Cheers,

David

6 comments:

Unknown said...

I´ll be waiting...
By the way excellent effects.
Thank you.

David said...

Thanks David. Here's a link to another example: http://www.flickr.com/photos/17924797@N06/4403748072/sizes/l/

Barry said...

WOW!
That looks most interesting.
As it is, it'd be a nice 'underpainting' start to another leyr on top of your normal oil painting, at about 50% opacity.

Double WOW! - that seecond example is great! Is the line thickness or strength goinf to be adjustable?

David said...

Hi Barry,
Thank you for your comment. I am indeed working on the different parameters and it will be possible to adjust the strength of the outlines (I use the pencil 2 filter as a base layer). You will also have control over the min and max brush sizes and over the precision of the algorithm.

Tuzz said...

I like that it makes it more "real" by randomizing the effects.
Excellent work!

David said...

Thanks! The beta version should be available within days (hopefully!).