Approve the Cookies
This website uses cookies to improve your user experience. By using this site, you agree to our use of cookies and our Privacy Policy.
OK
Index  •   • New posts  •   • RTAT  •   • 'Best of'  •   • Gallery  •   • Gear  •   • Reviews
Guest
New posts  •   • RTAT  •   • 'Best of'  •   • Gallery  •   • Gear  •   • Reviews
Register to forums    Log in

 
FORUMS Post Processing, Marketing & Presenting Photos RAW, Post Processing & Printing 
Thread started 23 Nov 2004 (Tuesday) 20:36
Search threadPrev/next
sponsored links
(this ad will go away when you log in as a registered member)

Tutorial: Masking for Noise Reduction and Sharpening

 
Scottes
Trigger Man - POTN Retired
Avatar
12,842 posts
Likes: 9
Joined Nov 2003
Location: A Little North Of Boston, MA, USA
     
Nov 23, 2004 20:36 |  #1

This is a little tutorial on building a mask to protect edges from noise reduction software.

NOTE: This tutorial seems to require noise reduction software that can be run as a Photoshop Plugin. But at the end I list steps to put this tutorial to use when you use a stand-alone noise reducer. You can still get back your detail!

And this whole masking process has a lot of uses, so you might wish to read on anyway.

Noise is most apparent in open areas that don't show much detail. Details in an image will generally hide noise, or at least noise isn't so apparent. So it's a good idea to protect the detail because NR software will remove detail along with the the little noise speckles. This loss of detail can soften the edges, so we're going to protect them with a mask. The NR software will run on the rest of the image, leaving the detail - the edges - untouched or barely touched.

First we'll start with a noisy image. This is a 100% crop of a finch who stumbled near my bird feeder that I have conveniently placed within range of a window. Alas, this day was overcast, so I had to bump the ISO to 1600 to get a decent shot.

IMAGE: http://www.itsanadventure.com/postimages/nrtut-org.jpg

Kinda ugly. But you'll notice that the noise is most apparent in the open section, the background, as well as the plain colored beak. The edges of the feathers don't show much noise because the details of the feathers help hide the noise. But yet the open areas of individual feathers show noise.


To build our mask we first want to flip to the Channels tab and click on each of the channels, Red, Green and Blue. We're looking for the most contrasty channel - the one with more apparent details. In my case it was the green channel. So I'll right click on the Green channel and duplicate it.

IMAGE: http://www.itsanadventure.com/postimages/nrtut-channels.gif

A pop-up box will, amazingly enough, pop up and ask you for a name. I stretched a bit and chose "Mask" which I thought was a good choice. The Mask channel will be selected now, and you'll see a grayscale version of the bird.

In order to make the mask to protect the edges we first will find the edges. Choose Filter... Stylize... Find Edges.

I now have this:

IMAGE: http://www.itsanadventure.com/postimages/nrtut-findedges.jpg

Yep, it found all the edges, and also found all the edges of the noise, too. Not to worry, as we'll fix that later.

Also, all the edges are kinda dark grey, which isn't ideal. In Photoshop a mask is a grayscale image, with Black designating the areas to be completely masked (protected) and White designating areas not to be masked at all. Shades of gray in between designate the amount of masking to be done.

This is a very important concept here. Black areas will be completely masked and any noise reduction you do to the image will not be done AT ALL to these areas. White areas will get noise reduction at full power.

So of course we want the edges to be very black while everything else is very white. So we want to increase contrast in this mask to drive everything to black and white. We'll do that with Curves.

Bring up Curves (Image... Adjustments... Curves, or Ctrl-M). Click on the little dot in the lower left corner, the Black Point, and drag it towards the middle but keep it at the bottom. Now click on the upper right corner and drag the White Point to the middle at the top. Your "curve" should now be a straight light going up and down.

If you check out the image you'll see that it's now pure black and pure white, but the lines are very thin. They're not wide enough to cover the detail completely - they'll only cover the center of the detail. We want the lines to be wide enough to completely protect the edges. So grab that white point and drag it back towards the right. The lines will get a little wider...

I chose this:

IMAGE: http://www.itsanadventure.com/postimages/nrtut-curve1.gif

Which got me this:

IMAGE: http://www.itsanadventure.com/postimages/nrtut-curve1result.gif

Note that most of the speckles in the background are gone. We're still going to fix this later.


Each image will be different though. An image of a bird has a lot of small details so I want a lot of thin lines - the mask is just as detailed as the image. If you had a picture of a car, with less but larger details, you'd want less but wider details in the mask. So play with the Curve depending on your image.


Right now my bird looks good.

Except for two things: the speckles in the background, and the fact that this mask would make for very hard edges. We don't want hard edges, - it looks better if you smooth the change from complete NR (white) to no NR (black). We're going to make the transitions smoother by blending from white to black - yep, were' going to add some shades of gray.

Then we're going to get rid of those ugly speckles. No worries.

To add the shades of gray we're going to blur this mask using Gaussian Blur. Choose Filter... Blur... Gaussian Blur. I chose a Radius of 1, which is about the limit for this image because more would start to blur the lines together. We don't want this, so 1 works for this image. (Again, with a car you might want 2 or 3 or...)

I got this:

IMAGE: http://www.itsanadventure.com/postimages/nrtut-blur.gif


Now to get rid of the speckles. Click on Filter... Noise... Despeckle. No options, and it got rid of some of the noise, but not much really. I could have run this early - before the blur - but I feel that it can destroy too much detail in the mask. It's up to you and your image.

But the noise is unacceptable here, so I'm just going to grab the Pencil tool and "erase" the speckles with white. I use the pencil here because it uses a hard edge, rather than the soft anti-aliased edge of the Brush. Just my preference.

Erasing the speckles this way is easy because I have such a large, clean background. Your image may be different, and erasing may be a pain. So try undoing a couple steps and try running Despeckle before the Blur. It all depends on the image.


So far, I now have a blurred despeckled mask, but it's too gray. I want Black to completely protect the edges. So back to Curves to increase contrast. But this time I'm just going to drag the black point over towards the middle and leave the white point alone. If you drag it too much you'll drive all the grays to black and detroy the smooth transitions, so don't go overboard.

I choose this Curve:

IMAGE: http://www.itsanadventure.com/postimages/nrtut-curve2.gif

Which gave me this:

IMAGE: http://www.itsanadventure.com/postimages/nrtut-curve2result.gif


Looks good. Even better, we're almost done.

Click back on the Layer tab, and click on the Background layer, and you'll be back to the original image.

? ? ?

No worries. The channel is saved, we never deleted it. Now we just want to load the Mask channel as a selection. Simply click on Select.. Load Selection.. and chose the Mask channel. Suddenly the image is covered with those annoying marching ants.


IMAGE: http://www.itsanadvent​ure.com/postimages/nrt​ut-selected.jpg

Since they're annoying - and hide too much because they're in the way - hide the ants by pressing Ctrl-H. You're back to the original image, but the selection is hidden, so now you're ready to run the noise reduction software.

I use Neat Image, and I run it a little stronger than normal because I know that the important parts are protected by the mask. By the time the NR is done, I get a nice looking image.

Here's a before and after:


IMAGE: http://www.itsanadvent​ure.com/postimages/nrt​ut-ba.jpg

(Note that it hasn't been sharpened yet.)

As a comparison, here's the original next to a copy where I ran NR without a mask. The image on the right is what I used to get, and the NR is about 20% less than used above!


IMAGE: http://www.itsanadvent​ure.com/postimages/nrt​ut-ba-nomask.jpg


So this was an mask used to protect the edges during noise reduction. Think about sharpening for a second... You generally want to sharpen only the edges and not the open areas, right? This same process can do it, but after you run Find Edges simply Invert the image using Image... Adjust... Invert. You'll end up with a mask that will protect the open areas from sharpening, and the sharpening will just run on the edges! Cool!


Now what if you run a noise reduction program that's standalone, one that can't run as a PS plugin? Well, this tutorial can *still* work for you with a couple extra steps.

You'll need 2 copies of the image - the original, and one where you ran noise reduction outside of Photoshop.

1 ) Open them both in Photoshop.
2 ) Run this tutorial on the NR'd version to get the edge mask.
3 ) On the original, click on the Background, hold the mouse button down and drag the background to the NR version.
4 ) The NR version will now have 2 layers with the original on top.
5 ) Click on Select... Load Selection... Mask.
6 ) Ctrl-H to hide the selection.
7 ) Hit the Delete key.
8 ) On the top layer (the Original image) click on the Eye icon in the Layer palette. This will turn the layer off. Click again, and turn the layer on. You'll see the nice noise reduced image, but with the top layer on some of the detail will come back. If it's difficult to see the difference re-run the tutorial and make the mask stronger (blacker).


Now all that seems like a lot of work. It's not so bad once you run it a few times. But Since you read through this whole tutorial I'll give you a bonus - my Action for this.

http://www.itsanadvent​ure.com/postimages/NRM​ask.atn (external link)

Right click and save this to your Actions directory, which for me is C:\Program Files\Adobe\Photoshop CS\Presets\Photoshop Actions. Go back into PS, click on the Action tab, then the little triangle to the right of the Actions tab. Click on Load Actions, and choose NRMask.atn. That's it, you now have my action for the above tutorial. Use it freely, modify it freely, give it to your friends.

Some of the steps in the action, like despeckle, are automatic and just run. Others, like all the Curves, wait for your input which is explained above. If you don't like my choice for Gaussian Blur, expand the action and click on the empty square next to the checkmark. Now theaction will pause and wait for you to change the radius.

But please, if you cheated and just came to get the action you'll be cheating yourself. Read the tutorial to understand what is going on. Then you can run the action with an idea of what you need to change.

Have Fun!


NOTE: As always, Photoshop gives you many ways to do things. There *are* easier ways than this, but this is what I developed as I was stumbling through it. Hopefully other, more experienced Photoshop users will add more tips to make this a better, easier process.

You can take my 100-400 L away when you pry it from my cold, dead fingers.
Scottes' Rum Pages - Rum Reviews And Info (external link)
Follower of Fidget - Joined the cult of HAMSTTR©

  
  LOG IN TO REPLY
sponsored links
(this ad will go away when you log in as a registered member)
dsze
Goldmember
Avatar
2,241 posts
Joined May 2004
Location: On The Lake!
     
Nov 23, 2004 21:37 |  #2

Awesome Tutorial..... Thanks for the hard work it took to share this with us all!


-daniel
"Life is not measured by the number of breaths we take, but by the moments that take our breath away."
-Gear List-

  
  LOG IN TO REPLY
Moppie
Moderator
Avatar
15,051 posts
Gallery: 19 photos
Best ofs: 1
Likes: 350
Joined Sep 2004
Location: Akarana, Aotearoa. (Kiwiland)
     
Nov 23, 2004 21:39 |  #3

Absolutly Awsome Tute Scottes, very well written, and very very easy to follow.


flickr (external link)

Have you Calibrated your Monkey lately?

Now more than ever we need to be a community, working together and for each other, as photographers, as lovers of photography and as members of POTN.

  
  LOG IN TO REPLY
dtrayers
Goldmember
Avatar
1,063 posts
Joined Mar 2003
Location: Denmark Township, MN, USA
     
Nov 23, 2004 21:47 |  #4

Thanks, Scott!

This technique works with the Noise Ninja plugin as well. However, I just did some testing and to me NN works pretty well without the mask. I couldn't see much of a difference between with and without a mask.

I think that it might keep away from edges all by itself.

Might I suggest another way to get rid of the 'speckles'? After finding the edges and adjusting the darkness of the mask (I use Levels instead of Curves) try the Threshold adjustment. You adjust the slider to get rid of the speckles. Just don't do it too much or your nice edge lines run together.


-Dave

http://www.trayersphot​ography.com (external link)

Gear List

  
  LOG IN TO REPLY
tommykjensen
Cream of the Crop
21,001 posts
Gallery: 6 photos
Likes: 201
Joined Mar 2004
Location: Copenhagen, Denmark.
     
Nov 23, 2004 22:46 |  #5

Excellent work, I'll have to read this later though.


EDITING OF MY PHOTOS IS NOT ALLOWED

  
  LOG IN TO REPLY
CyberDyneSystems
Admin (type T-2000)
Avatar
52,171 posts
Gallery: 192 photos
Likes: 9044
Joined Apr 2003
Location: Rhode Island USA
     
Nov 24, 2004 00:18 |  #6

Thank you!

I just went through it step by step.. and it's not Cabalist Mysticism after all! It really works! :)


GEAR LIST
CDS' HOT LINKS
Jake Hegnauer Photography (external link)

  
  LOG IN TO REPLY
Jesper
Goldmember
Avatar
2,742 posts
Joined Oct 2003
Location: The Netherlands
     
Nov 24, 2004 01:59 |  #7

I haven't read it all or tried it out yet but... thanks! :)


Canon EOS 5D Mark III

  
  LOG IN TO REPLY
Scottes
THREAD ­ STARTER
Trigger Man - POTN Retired
Avatar
12,842 posts
Likes: 9
Joined Nov 2003
Location: A Little North Of Boston, MA, USA
     
Nov 24, 2004 06:39 |  #8

dtrayers wrote:
However, I just did some testing and to me NN works pretty well without the mask. I couldn't see much of a difference between with and without a mask.

It may very well be that it doesn't show much difference. But with the mask you should find that you can increase the noise removal. The more noise removed the more sharpening you can do because sharpening magnifies the noise. And the more detail you keep will result in a better look when sharpened, too.

As you can see from the final examples there's not a huge difference. But the non-masked case had 20% less noise removal, and you can still see that the masked version kept a little more detail, and definitely removed more noise.

This is a way to tweak another 10% out of the photo. It may not be for everyone, and it may not be worthwhile for every image.

dtrayers wrote:
Might I suggest another way to get rid of the 'speckles'? After finding the edges and adjusting the darkness of the mask (I use Levels instead of Curves) try the Threshold adjustment. You adjust the slider to get rid of the speckles. Just don't do it too much or your nice edge lines run together.

Excellent suggestion, no doubt.


You can take my 100-400 L away when you pry it from my cold, dead fingers.
Scottes' Rum Pages - Rum Reviews And Info (external link)
Follower of Fidget - Joined the cult of HAMSTTR©

  
  LOG IN TO REPLY
TonyKInTexas
Senior Member
Avatar
308 posts
Likes: 27
Joined Oct 2002
Location: East Tennessee, USA
     
Nov 24, 2004 06:59 |  #9

I am not able to download the action because of permissions.

The tutorial is good though and I looked forward to using the action.

Thanks,


Tony
Canon 7D, Canon 24-105 F4L IS and other goodies.

  
  LOG IN TO REPLY
Scottes
THREAD ­ STARTER
Trigger Man - POTN Retired
Avatar
12,842 posts
Likes: 9
Joined Nov 2003
Location: A Little North Of Boston, MA, USA
     
Nov 24, 2004 07:07 |  #10

TonyKInTexas wrote:
I am not able to download the action because of permissions.

Fixed. Thanks for pointing that out.


You can take my 100-400 L away when you pry it from my cold, dead fingers.
Scottes' Rum Pages - Rum Reviews And Info (external link)
Follower of Fidget - Joined the cult of HAMSTTR©

  
  LOG IN TO REPLY
TonyKInTexas
Senior Member
Avatar
308 posts
Likes: 27
Joined Oct 2002
Location: East Tennessee, USA
     
Nov 24, 2004 07:27 |  #11

Got it. Thanks.

Scottes wrote:

TonyKInTexas wrote:
I am not able to download the action because of permissions.

Fixed. Thanks for pointing that out.


Tony
Canon 7D, Canon 24-105 F4L IS and other goodies.

  
  LOG IN TO REPLY
PacAce
Cream of the Crop
Avatar
26,899 posts
Likes: 39
Joined Feb 2003
Location: Keystone State, USA
     
Nov 24, 2004 09:40 |  #12

Cool, Scott. I've used edge masks to sharpen parts [within the mask but I've never thought of using an inverted edge mask to "blur" out details or noises.

Thanks for the useful tip. :)


...Leo

  
  LOG IN TO REPLY
Tiger1
Senior Member
Avatar
273 posts
Joined Jun 2004
Location: Tierra Verde, Fl. USA
     
Nov 24, 2004 18:59 |  #13

:D Scott,

As usual, thanks again for the help :!:
BTW, how do you know to create another tutorial on exactly the problem I can't solve ? HeHeHe

Gene


Gene
Artist/Photographer/Ar​chitect
1DsMkII, 7D, 10d, SD950IS and - "Oh Yeah" "L" Glass 100-400L, 17-40L www.generizzo.com (external link)

  
  LOG IN TO REPLY
kennyclark
Mostly Lurking
10 posts
Joined Nov 2004
Location: Wellington, New Zealand
     
Nov 25, 2004 02:26 |  #14

Great tutorial, thanks for all your hard work.


Canon 300D | 18-55mm | 85mm 1.8 | 90-300mm | Lowepro Backpack | Manfrotto 3221 WN tripod & 322 RC2 head | Manfrotto 681B monopod

  
  LOG IN TO REPLY
Aylwin
Senior Member
Avatar
564 posts
Joined Aug 2003
Location: Tampere, Finland
     
Nov 25, 2004 20:13 |  #15

Once again, an amazing tutorial, Scott! Thanks! :D


Aylwin
5D MkII, a few lenses, and some other bits and bobs

  
  LOG IN TO REPLY
sponsored links
(this ad will go away when you log in as a registered member)

38,319 views & 1 like for this thread
Tutorial: Masking for Noise Reduction and Sharpening
FORUMS Post Processing, Marketing & Presenting Photos RAW, Post Processing & Printing 
AAA
x 1600
y 1600

Jump to forum...   •  Rules   •  Index   •  New posts   •  RTAT   •  'Best of'   •  Gallery   •  Gear   •  Reviews   •  Member list   •  Polls   •  Image rules   •  Search   •  Password reset

Not a member yet?
Register to forums
Registered members may log in to forums and access all the features: full search, image upload, follow forums, own gear list and ratings, likes, more forums, private messaging, thread follow, notifications, own gallery, all settings, view hosted photos, own reviews, see more and do more... and all is free. Don't be a stranger - register now and start posting!


COOKIES DISCLAIMER: This website uses cookies to improve your user experience. By using this site, you agree to our use of cookies and to our privacy policy.
Privacy policy and cookie usage info.


POWERED BY AMASS forum software 2.1forum software
version 2.1 /
code and design
by Pekka Saarinen ©
for photography-on-the.net

Latest registered member is Dirtstar
876 guests, 226 members online
Simultaneous users record so far is 15144, that happened on Nov 22, 2018

Photography-on-the.net Digital Photography Forums is the website for photographers and all who love great photos, camera and post processing techniques, gear talk, discussion and sharing. Professionals, hobbyists, newbies and those who don't even own a camera -- all are welcome regardless of skill, favourite brand, gear, gender or age. Registering and usage is free.