I'm a portraits painter, I know the technics to paint a portrait with an acceptable level. But I'm a Maker too, and for many many years I dream with a robot capable to paint in an autonomous way, portraits.
I choose OIL as medium because it's de medium I use for my portraits, and because give as the possibility to correct and adjust all the times that we need.
Many times I have thought It's a crazy project, but I can see many people doing similar things. In fact the university of Konstanz the project eDavid, work developing a portraits' painter robot from more than eight years ago, expending a lot of money, and almost infinite resources.
In the opposite corner, Patrick Tresset develope PAUL, an inexpensive robotic arm, with the enough ability to draw an sketch of the human face.
This works are in a undoubted way, a good inspiration for my project. And I will be happy if I can develop a solution in the middle off this extremes.
I think that a good beginning would be to identify all the aspects involved in the project.
We can consider three general aspects: mechanics, electronics and software.
Mechanics: The most suitable mechanical device, it would be undoubtedly, a robotic arm, but it is very expensive and complicated to construct, if we claim a certain accuracy. For this motive I think that it would be more suitable to use a Cartesian machine that is simpler, cheap and easy to control.
Electronics: I think that a Raspberry Pi would be sufficient to control the whole device. Probably an Arduino, to control the mechanical parts.
Software: Undoubtedly one of the most complicated aspects. Reading several works on NPR (Non-Photorealistic Rendering), which adapts better to my idea is the writing for Aaron Hertzmann, who proposes an algorithm to turn an image into a series of curved brushstrokes. His algorithm realizes this task very efficiently transforming a photography into a painting of impressionistic, very convincing style.
The language, initially it might be "processing", since it can be loaded in the Raspberry Pi and use all the available library, for example OpenCV for the image processing.
We will need to control also the mechanisms. If we use an arduino for this task we will have to write the sketches of arduino and also routines of communication with the Raspberry Pi, to manage the bidirectional flow of information.
From general to particular
These three aspects are the first approximation to the problem. Certainly very general. To approach a practical solution we would have to do a detailed list of all the tasks that our device will have to realize.
Some of the tasks:
- Brushstrokes' generation - Translate brushstrokes coordinate to gcode to send to the CNC machine . - send gcode to the CNC machine - move the paintbrush to reproduce the brushstrokes - take an specific oil colour with the paintbrush - clean the paintbrush - change the paintbrush- and many others.
All these tasks are relatively easy to do. Solutions exist to similar problems or can be solved with a bit of programming or designing some specific actuador. But there is a task that is not in this list, which is....
The great challenge
Which is the great challenge?.......
The great challenge it's MIXING COLOURS.
In one of the task mentioned above we said: "take an specific oil colour with the paintbrush". We need mix diferent colours to obtein this especific colour, and it's a very difficult task.
It's necessary define many sub-task and solve one at a time.
For instance: Each brushstroke have a color and we must make this color with oils. For this, we need a device who take some amount of paint of one colour with the brush,(one of the components of the final colour), put in a surface, clean the brush, take some amount of paint of other colour (other of the components), and so on. When we have all the components, mix all of them, and obtein the final colour. Now we need verify that this colour it's the colour we want (with a camera or color sensor with an especific software). and if not, we should add others colours to correct it , mix it and verify again. And all this proccess we must do it again and again until to obtein the correct colour.
You can see that my approach it's do it in the same way that a human painter, because I think it's the best and more easy way.
I will try to explain all the proccess with a diagram and I will put it in the "files" section, for your consideration. I will put too others paper with some theory and others scientifics works about differents approach of the non-photorealistic-rendering. And some concepts about colour theory. And many others things.
I wish that all of you can feel the same I feel, when I visualize a device painting a real portrait, and this feeling encourage all of you to participate in it. Thanks You so much.