What's Sticking Out Of His Head?
by Mirek Pruchnik ©2007
How many times you encountered a situation where you took some photo which is quite good overall but there is some unwanted element that spoils it and it would be much, much better if it magically disappeared. Example? A friend of mine had a family shot of her relatives which was taken on a street. The photo was just an excellent family portrait (in the old style I would say - like taken a hundred years ago) but it had one flaw - a woman who was passing by was caught in the background. Complete disaster. My friend, knowing that I like to play with photos (OK, let's call it "post-process" - sounds more professional) asked me if there is anything that could be done about this. Sure, no problem - it took me an hour or two to deal with it.
Similar question I received from Emats along with the photo (please see below) - he asked me to describe step-by-step how would I deal with the problem of unwanted legs. "Maybe some other users can benefit from this" I thought and this is how another mini-guide was born. In the end - why to describe something in five minutes if you can spend two hours writing tuorial :D
Cloning To The Rescue
Fortunately for us, graphics programs have one powerful tool that is a great aid in such situations - the "Clone Tool" (marked with arrow on the PSE screenshot). The idea is very simple: we select a brush of some shape and size, then we select the source place on the photo (the place from which we want pixels to be copied; outlined on the screenshot) - this is done by left-clicking the mouse with the "Alt" key pressed on the keyboard (don't know how on Mac)
and finally we start painting with the brush over the place we want pixels to be copied to
Please note that source of pixels is moving when you move the brush around. This allows to easily copy a fragment of the photo to some other place and to do this in a "natural" way, i.e. in a way that cannot be easily spotted. Some more work and nobody would say that the second butterfly was added artificially.
The clone tool is however mostly used for some other purposes - not to add elements but to mask and/or remove some unwanted elements from the photo. Let's take a look at how it works on the cat-on-the-grass example (grass is very pleasant to work with):
Here I started from the right side to also get rid of the cat's shadow
As you can see it was very easy to get rid of the cat, however there is one thing to pay attention to, namely the repetition pattern that appeared. That's because freshly copied fragments become the source and the source place is "tied" with the destination place (it stays at the same distance). This means that we are copying the same thing over and over again:
To avoid this effect one should quite frequently randomly change the source of pixels (well, there are some exceptions e.g. brick wall - in such case you may want repetition pattern to appear!).
BTW, PhotoShop keeps source image in memory while drawing with the clone brush - don't be astonished when things you are painting over will start to be copied despite the fact that they are not visible anymore. Just release the mouse button and start another brush pass.
Image To Be Cured
Now, after an introduction about cloning, let's take a look at what we have to do. As you can see we have a nice interesting photo with one flaw: legs in white socks "sticking" out of boy's head. Maybe if they were dimmer or socks/shoes were of some dark colour the photo would be acceptable, but now they immediately attracts one's eyes driving them away from the child.
Fortunately the image has simple background and we can easily get rid of the legs by cloning them out. Well, at least the part which is far away from boy's head. The part near the head could be a problem as we don't want to scalp the boy. Fortunately there is a very simple yet powerful trick that can help us, namely all operations that modify an image are in fact applied to the fragment that is selected. So let's select the boy's head using polygonal lasso tool (I prefer it over other selection tools, especially that "sharp" vertices can be rounded with a single menu command). There's no need to select the whole head - in fact we are interested in the fragment that is near the area we want to clone-out.
Now inverse the selection so we have selected everything except the head - from now on all paint operations will be applicable to all the photo except boy's head, i.e. we can safely clone-out legs not touching the head at all. It is worth noting that the same effect could be achieved by using layers and layer masks, but unfortunately there are no layer masks for mere mortals like me, who own PSE instead of full blown PS (well, there is a work-around but I decided not to mess with it in here; maybe next time).
It is worth noting that since background has some lines distinguished we should be cloning along these lines (to preserve them), e.g. the upper part along red line, middle along blue line and bottom along the green one.
This way we reconstruct missing parts of the photo. In this particular case it is very simple, but sometimes this process can be really cumbersome. It is always worth to look for similar elements in other parts of the photo, elements that can be "reused", but generally it could be hard precise work. On the other hand we are guaranteed that nobody will notice if there is something wrong with small numerous elements like leaves, pebbles, etc. so cloning them is really easy.
We are almost done with the photo. The only thing that still disturbs me is a light fragment of hair at the edge of the head (in the place where white shoes were very close - was it some reflection or something?). I used color picker and ordinary brush and painted with dark colour over this place. If I had the original photo at hand, most probably I would cover this place with hair cloned from some other place on the head or use the brush in the "darken" mode to get rid of the light area. Anyway, this is the final effect:
Special thanks ...
... to Emats for giving me opportunity to write another mini-guide - it was a real fun
... to EwaK for reviewing and correcting my poor English
... to KrzyK for being my reviewer and THE first referee :)