Samuel Williams Tuesday, 27 April 2010

I have a dream.. that one day a robot can paint.

Painting is surprisingly difficult. It involves a huge number of cognitive processes such as shape recognition and color matching. I've been interested in robots that can paint for some time.

I've decided to focus on one area of painting - contrasting edges. The end reproduction is essentially one color (black ink on white canvas). This simplifies the problem, but not the ability to be creative and expressive.

Processing is essentially divided into several steps:

  1. Reduce texture in the image using a bilateral filter.
  2. Divide the color channels and perform laplacian edge detection on each channel, the recombine.
  3. Build a list of edge circles - a point in the center of a line with diameter equal to the width of the line.
  4. Build a list of lines by connecting these circles.

The analysis step is fairly robust and uses a basic heuristic to create lines, taking into account:

Once that is done, the final result should be generated by a robotic arm. For simulation purposes, I've created a water colour based painting algorithm that uses a subtractive colour model.

A masterpiece is born! Thanks Mr Robot.

Other Examples

I respectfully thank the authors of the source images I used for these examples.