Simulating paintings on computer

February 27, 2012

Recently I’ve been playing around in our CS department and discovered there are actually people working in this field called computer graphics. Given that I’ve been playing with photoshop even before knowing what complex numbers are, this is quite exciting!

I guess I got a little too carried away in this homework item about coding your own non-photorealistic filter.

Anyways, I was never quite satisfied with any of those ‘artistic filters’ that came with commercial software. For example, here’s the photoshop ‘colored pencil’:



and dry brush:

Well, just believe I have tried to adjust the parameters to produce reasonable results…

I head down to MoMa and Metropolitan museum on the weekend and looked at some classical paintings with the intension of figuring out how might one go about programing it. (Since color mixes quite differently on canvas and on screen, there are actually some quite interesting problems to solve in order to make the computer “paint”.)

Anyways, here’s what I ended up with: (I would really like to make a Van Gogh filter…although haven’t gotten anywhere convincing yet…)

Pointillism: (I found this being the obvious one to start with):

real painting (Georges Seurat):

my pointillism filter:

(applied to a fairly ordinary photo:)


classical oil painting portrait:


Just for fun, I also did one for cubism:
(obviously inspired by Picasso’s violin)


my cubism filter:

Anyways, that was quite fun to program (especially for someone who haven’t touched code since high school).

In fact, I even found it rewarding in improving one’s painting skills. For example one thing I figured out was the distribution of luminance in painting is normally quite off from that of the real world, each artistic has their own ‘luminance curve’ and shifts the hue/saturation in a particular way. Umm…maybe coding filters should be added to all fine art curriculum :-P


4 Responses to “Simulating paintings on computer”

  1. tushar Says:

    hi conan,

    the photo is really very famous – it’s by the Magnum photographer Steve McCurrry.



    liked your filters :-)

    • 777 Says:

      Hi Tushar,

      Of course…I think it’s the most famous photo of all times! (well that’s thy I thought I don’t need to cite (like using Mona Lisa)…perhaps I shouldn’t have done that…

  2. Scott Says:

    These are nice filters. It seems like a truly cubist filter would require some 3-dimensional data, for the purpose of blending multiple views.

    • 777 Says:


      Indeed, also his painting style is pretty hard to generate, i.e. need to add board lines, etc. I think what one can do though, is to add dark shadows on some the sides of the rectangles (I think it would actually be quite effective), I didn’t have enough time on this homework :-P

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: