This week’s exercise is to see what we can do when we need to clone out something in an image but can’t get good results with just the Clone Tool alone.
When I saw this building I liked the architecture but wasn’t thrilled by the distractions in the scene. The folks I was traveling with were moving on so I didn’t have much time to plan but one thing was obvious, the distractions had to go if the final result was to be what I was looking for.
I noticed that most of the distractions were long and thin – the signs, streetlights, traffic signals, people and shadows. Others were more boxy, like the trash can and the automobile parked behind the building.
The problem was that if I wanted to preserve the detail in the building that was behind these distractions I would need a clear shot of those parts of the building that was behind these objects as well.
I’ll use Image One as the image I want to clean up.
Image One SOOC
After taking the initial image and noting where the immoveable objects were in the scene, I positioned myself just far enough to one side to see what was behind the objects and took a second shot before running off to catch up with my traveling companions.
I’ll use Image Two as my ‘filler’ image.
Image Two SOOC
Normal cloning works well on small objects that have a consistent pattern and colour, particularly if the adjacent area is high contrast and the object to be cloned is thin, like a telephone wire. The larger the object and the more diverse it is, the more difficult it is to avoid producing a repeating ‘clone pattern’ that is a dead giveaway and can look rather unsightly. That would be the issue with this image and the reason I took a second picture to work with.
Back in Photoshop with my two images, how can I proceed?
Well, what if I paint a hole in a layer mask and reveal a small part of the second image where I can see what is behind the distraction? There I go, asking those ‘what if’ questions again! OK, I’ll open both images in Photoshop as separate layers and blend the layers into one final image.
Uh-oh! The images don’t line up! Not only are they not aligned, but worse, they’re not the same size and because the of the different camera shooting angle for the second shot, the perspective doesn’t match either. Bummer!
Well, I could try to get CS5 to do an Edit/Auto-Align Layers but it really doesn’t help because of the perspective differences.
To overcome the perspective differences, let’s take just one object at a time, say the second floor window behind the street light and street signs, for starters.
We'll create a mask for the first image and using a soft black brush with the mask selected, paint out just the streetlight globe and top of the signs that are in front of the window.
Punch-Out Hole Image
Here we can see the layer mask to the right of the layer and the black spot is where I used a soft brush tool to create a ‘hole’ in the mask by painting on the full size image in the main display window.
Anything painted black on the mask will show what is behind it in the layer below. Because I have turned off the little ‘eyeball’ on the left of the layer below, there is nothing to see where I painted but the pattern used by Photoshop to indicate transparency in the image.
Now we can turn ON the visibility ‘eyeball’ of the lower layer and use the Move Tool to position the second image so that the wall and window, what is visible in the filler image, is positioned in the hole.
Fill the Hole Image
We’ll move the lower layer around until the window lines up in the hole. If the building's window is not vertically or horizontally aligned with the hole, we can skew, rotate, compress or stretch the lower image until it matches the original building window. We can change the second image as many times as we like and if we really go too far we can always make another copy of the original second image. Err-ahh, you did make a copy of the images you loaded into Photoshop before you started, didn’t you? Of course you did! I didn’t doubt it for a minute!
Align Building Window Image
We can now we see a complete window image where the hole was.
You might be wondering why the second image layer has a Brightness/Contrast Adjustment Layer just above it? I've found that we sometimes need to change the brightness and/or contrast of the second image ever so slightly to match the first image and this is an easy way to make that change! The third image layer is just the original copy of Image One for reference to see how I'm doing with the changes.
The last step is to preserve this change before we move on. To do that we make copy layer using ‘Stamp Visible’ (CTL+ALT+Shift+E) that merges the two layers we are using into one new layer. This new layer becomes our new Image One.
We can repeat the process with the rest of the lamp and sign poles and other objects in the scene until we have the final result.
What can we do about the objects like the car behind the building where the background is blocked in both images?
We can use the same technique except we may need to position another part of the image that is more appropriate in the hole. We can even position a part of a copy of the first image in the hole if it provides the background we are looking for.
What if neither approach will work, such as the right side of the steps which are blocked in both images?
Well, we can always fall back on using the normal Clone Tool if needed. In fact, there may be a number of situations where the Clone Tool can touch-up small spots that just don’t quite look right for some reason.
So here is the original Image One with just the keystone distortion corrected and cropped to match the final result.
Original Image One – Aligned to Match the Cloned Image
And this is Image One after the Punch-Out Clone process is complete.
Image One - Cloned
Have some fun! You can open these images in the LyteBox and use the arrows to switch back and forth between them for comparison. See how many changes you can find!
One last thing to do; crop a bit tighter to eliminate extraneous objects such as cars and power poles.
Image One – Cropped
Now that I think about it, maybe I should have left the antique streetlight in the image after all?
I’ll just use the Punch-Out Clone technique to merge the streetlight back in!
Image One – Final with Streetlight
Now that's more like what I had in mind when I first saw this building!