Reproducing Image Noise On Touched-up Parts of Noisy Images Using Photoshop

Adding proper noise over newly added elements on a noisy image

Removing facial hair on a photo for morph optimization

created on 10.02.2004, updated-05.07.2005 - Removed tables

Introduction

Hi, this is my first tutorial. I hope you enjoy it and find it useful. Sorry for lack of design, but hesido.com will be your place for one pager tutorials, and I keep readibility over a funky design when it comes to tutorials :).

Ok, here we have a person with a beard, and the reason I want to remove the beard is to ensure that the morph to a second person (lacking the same amount of facial hair :) ) will look nicer. For the morph (which is not part of the tutorial), I use the excellent and free morph tool by Satish Kumar, the tool is WinMorph. I also use a Wacom Graphire Tablet which helps me to no end. I'd also like to point out that the x2 versions are for you to see the noise better, if you would like to go by my tutorial using the same image, please use the original image and not x2 version, because we can't effectively "catch" the noise if the noise is doubled in size.

Original imageOriginal image X 2

Here you see a highly noisy image. What we will do is we will paint over the beard, and afterwards re-apply the lost noise back onto the image. Here is the end-result:

touched up image X 2

You may like or dislike the shading, but we have to agree I have them noises back on the photo's touched-up parts :) This tutorial does not concentrate on the artistic part of the process.

The tutorial

A practical workspace

Let me start by showing you my workspace. My desktop is 1280x960. As you see I leave the tools on the left hand side so the tool windows stay open for easy access all the time. You can setup and save your workspace through menu -> windows -> workspace. Click on the picture for larger version.

Workspace

Duplicate, don't destroy

We will start by duplicating the layer that we want to modify, we'll need it later. You have to backup anything you change just in case of a screw-up anyway :)!

Duplicate layer

Painting in the new element

We'll paint over the beard using a mixture of clone, smudge, and brush tools. Here is a rough in-between:

Rough

After fully painting over the beard, we may use burn and dodge tools to add some shading and brush -> color mode to fix hue errors, and then some sponge to fix oversaturated areas with soft brushes. Here is the final shading:

Near final

The inverting trick

We see that the shading sort of matches the rest of the picture, at least, I hope so :) Now the missing thing thing is noise. If we put some noise on it, our mistakes will also be covered :) Here is the fun part, and what this tutorial is all about. We'll duplicate the untouched layer twice, invert the top most duplicated one, and then reduce its opacity to %50. You will see that out image is grayed out as the two layers are exactly the same, only one of them is the negative of the other.

Duplicate and invert

Medium/High frequency noise capture

On the same inverted layer, we will apply menu -> filter -> noise -> median, this way we are removing the noise from the inverted layer, and as it is inverted and at a 50% opacity, it reveals the noise beneath. This is the key element in the technique. I used a median with a radius of 2 in this example. You may also use a very small amount of gaussian blur instead of median. Here is a two frame animation revealing the effect of median.

Median

Now, we will merge the two layers and produce a single layer out of the duplicated two layers. We now have in hand a gray layer with some noise on it. We did it, we got the noise :) We will make this layer an overlay layer and put it on top of the touched up layer. We'll leave the opacity at 100% as we need every bit of noise we can, and the noise in its current form is not strong at all.

Overlay noise
Tip: If you want to try a really odd and custom way for noise reduction, you can invert our noise extract and overlay it to the image. You should control the contrast of the invert noise layer so that it balances the noise underneath. Just an idea.

Now we have some noise on the touched-up parts!! But as the overlay is applied to the whole layer beneath it, the places which have already noise now have bigger noise. We will simply mask out the parts that we didn't touch from the overlay layer. Just add a layer mask to our overlay layer by pressing add layer mask at the bottom of the layers window, and select the mask layer, and paint white over places we want to reveal and leave places to be hidden in black. Here I used a soft brush for the mask layer so the edges blend smoothly, you may also tweak with smudge here and there. We don't have to be precise.

Masking our noise

Mask overlay

Now we have the overlay layer affect only those parts we touched up so it doesn't bother the rest of the picture. But you'll see that the noise is far from effective, we need to make it stronger. We will use a levels layer for precise control. I try to use layers instead of fixing the layer, so I can change parameters later for fine-tuning. We'll get up our levels adjustment layer running by selecting levels from the create new fill or adjustment layer button at the bottom of the layers window. Do not play with it just yet, we'll put it on top of our noise extract layer and then group it to the that layer by pressing control+g. This way, the levels will only effect out noise extract layer. Now, we can adjust the levels so the noise on touched up regions is as strong as the rest of the photo.

Levels layer settings

Make sure you have preview set to on so you can adjust the noise contrast on the with on the fly preview. Set the lower and higher input levels a little bit closer to the middle, where all the grayish colours are gathered. This way, we are precisely adjusting the contrast of the noise extract layer, and we are able to modify the contrast of brighter and darker noise separately. You must leave the middle input level at 1,00 (which is at the center), or otherwise the brightness will shift. You can also set it to 1,00 using the numerical input box. Make your adjustment until you feel content with the noise levels which should conform to rest of the picture once correctly set. Voila, we have the photo ready for further torture now :) Please hover your pointer on the image below to see how we kept the noise.

Compare original to final
Tip: You can simply put a brightness and contrast control layer instead of levels layer if you do not want to bother with brightness shifting.

The result

Here are the middle frames of a morph animation with (a) and without (b) facial hair on the target image. You see in (a) that there's a faded beard, but in (b), we have made it look a bit better :)

Morph middle frame with beardMorph middle frame without beard

For the record, the person in the picture is not me, as it is a morph frame. I can safely say that person does not exist. The bearded person we have worked during the entire tutorial is me, tho.

Final Words

I hope that you found this tutorial useful. Feel free to email me comments and critiques and even some fresh ideas :) This technique could be applied to even videos if your video editing tool lets you do similar layering. You apparently do not have to remove beards only, it should work for anything :).

And an update

I received an email from Cuneyt Ozdas of Splutterfish, reminding me about the usage of highpass filter to grab the noise. I did a few tests which revealed that the highpass filter works perfectly for noise with high frequencies, but didn't produce results as good as in this example, due to the fact that when you do a highpass filter with a higher radius to grab noise with lower frequencies which is present in the example image here, the darker and brighter areas show their silhouettes, which hinders the process to some extent. Still, with a low radius, highpass filter gives instantly good results and it is pretty much straightforward, and should work for most of the photos. Thanks to Cuneyt Ozdas for the nice feedback.

I also added a brand new tutorial on how to make a nice 3d looking flag easily with photoshop, check it out.

Back To Home For More Tutorials