Davide Barranca | Notes on sharpening

Article Index
Davide Barranca | Notes on sharpening
2. Gaussian sharpening
3. Difference of Gaussians
4. Other blurring kernels
5. Combined use of different blurring kernels
6. Image decomposition
7. A sharpening equalizer
8. Bilateral and WLS Pyramids
9. Mixed Pyramids
10. (temporary) Conclusions
11. Links
12. Acronym list
13. Acknowledgements
14. Notes on the notes’ author
Comments
All Pages

2. Gaussian sharpening

There’s plenty of resources on the web about the subject so I skip much of the basics of Photoshop USM (UnSharpMasking) and its use, why we need it, how to build masks, etc. Let me only stress again that it’s called UnSharp because it assumes the subtraction from the original picture of a blurred (unsharp) version. I’ll use a lot the “subtraction”, so here it goes a quick reminder on it, and why sharpening and blurring are close relatives inside Filter → Sharpen → Unsharp Mask...

A quick note for the reader: Grayscale images will be used throughout the article, to help us keeping the focus on tonal transitions. To mimic the effects with color pictures, use L of Lab or apply a solid white layer Color mode to have what Photoshop would consider a grayscale Luminosity version of your original. First picture (courtesy of my friend the photographer Roberto Bigano) is the starting point; then goes the blurred version and the subtraction:

(Fig. 2.1) Original picture: BW version of the painting by Paolo de Matteis “Le sante Maria, Maddalena e Dorotea” (particular) National Gallery of Cosenza, Italy (Photography © Roberto Bigano).

(Fig. 2.1) Original picture: BW version of the painting by Paolo de Matteis “Le sante Maria, Maddalena e Dorotea” (detail) National Gallery of Cosenza, Italy (Photography © Roberto Bigano).

 

(Fig. 2.2) Original pictures, Blurred version and their subtraction.

 

(Fig. 2.2) Original pictures, Blurred version and their subtraction.

Adding the subtraction to the original makes the sharpened version:

(Fig. 2.3) Original pictures plus the difference on Fig. 2.2 gives the sharpened picture.

(Fig. 2.3) Original pictures plus the difference on Fig. 2.2 gives the sharpened picture.

To do this in Photoshop, I may use offset and scaling, which makes the difference channel look more familiar:

(Fig 2.4) Using a scaled version of the difference in Photoshop.

(Fig 2.4) Using a scaled version of the difference in Photoshop.

(Fig 2.5) Detail of the sharpened version using a Gaussian Blur with Radius 4.0.

(Fig 2.5) Detail of the sharpened version using a Gaussian Blur with Radius 4.0.

A more abstract way to visualize the effect of Gaussian Sharpening, that I personally find useful for comparison purposes, is to plot the signal intensity transition (black) and its blurred version (red), their difference (green), and the original plus the difference (thicker black):

(Fig 2.6) Intensity transition and Gaussian Sharpening.

The key concept of Gaussian Sharpening is that the difference between original and blurred version is exactly what will be enhanced. If it’s used a blurring kernel (Gaussian Blur, GB, for instance) which softens edges and texture, then edges and texture will be more prominent when the difference layer will be applied to the original. Depending on the algorithm used and the processing of the blurred picture, we may end with a sharpening that affects separately different image features.
Before going any further, let me review Photoshop’s Calculations and how to use it to sharpen. Open a picture, convert to the grayscale flavor you like the most and:

  • duplicate the Gray channel twice;
  • call the first ORIG and the second BLUR;
  • apply a GB to BLUR
  • go to the menu Image, Calculation; if you want to perform a simple subtraction:
ORIG - BLUR; (Eq. 2.1)

You should setup the Calculations window as follows:

(Fig 2.7) Image - Calculations window

(Fig 2.7) Image - Calculations window

Pay attention that the first term of the subtraction is Source #2, and the second is Source #1 (little confusing, I know). The result you have is not scaled, and for it to be applied with the appropriate blending mode (Linear Light, LL from now on) there are two slightly different ways. Let’s baptize SS1 the Subtraction with Scale = 1 which implies a later LL blend 50% opacity, and SS2 the Subtraction with Scale = 2 which implies a later LL blend 100% opacity. Both ways are useful as we’ll see soon.

(Fig 2.8) Scaling or not the subtraction (when you perform subtraction, the result is divided by the Scale factor and added to the Offset value)

Having tested a bit more the subject, I can now affirm that SS1 (LL 50%) and SS2 (LL 100%) are not exactly the same thing, so for the sake of precision, I'm suggesting you to use SS2 only. The issues in SS1 reveals in pyramid decomposition, i.e. blacks not really black (something you can easily test); nevertheless, if you're not in the middle of a decomposition (an image one, of course ;-) you can pick either SS1 or SS2.



Comments
Add New Search
"Shadow/Highlights" clarification please
George Machen 2009-01-07 01:58:49

> 8. Bilateral and WLS Pyramids
>
> ...Shadow/Highlights with SB (instead of GB)
in its
> “engine” gives the same halo-free look by the way...

I don't have
CS4. Are you saying that its Shadow/Highlights dialog now features an option to
choose whether it uses Gaussian or Surface Blur? If not, what did you mean
exactly in this statement?
Thanks! (G-R-E-A-T write-up, Davide!)
Davide 2009-01-07 22:53:37

Hi George,
I'm glad you liked it!
No, unfortunately there's no GB/SB option in
CS4. But you can always custom build your Shadows/Highlights: for instance,
create a curve adjustment layer to lighten the picture, then add a luminosity
mask to it (or choose the channel that better suits the image needs and use it
as a mask). Now you can experiment using GB and SB for blurring the mask: the
first one gives you a standard Photoshop S/H feeling, while SB (as long as the
algorithm doesn't reverse) shows less or no halos.
Ciao,
Davide
Alexey Rybakov 2009-01-07 19:58:18

Thanks for nice article with informative illustrations and examples. I'll glad
to read more if you'll develop this farther.
Re: "Shadow/Highlights" clarification please
Stephen Marsh 2009-01-08 12:48:48

Thank you Davide, this is a great exploration, I am eagerly awaiting some
actions!

George, I presume that Davide is referring to manually simulating what
the Shadows/Highlights command does. Dan Margulis described a method for this
and one of the Applied Color Theory list members created an action. This action
is available to list members from the files section.

Margulis PSU
ON2004.atn
http://tech.groups.yahoo.com/group/colo rtheory/files/
How to
re-create the Shadow/Highlight effect of Photoshop CS as described by Dan
Margulis in the Oct/Nov issue of Photoshop User titled "Making Two Ends
Meet", pg. 44-47.


Regards,

Stephen
Marsh
http://members.ozemail.com.au/~binaryfx/
Bravissimo !!!
Andrea Baldini 2009-01-08 23:02:13

Devo dire che é una roba incredibile !

Davvero superba la genialità del
progetto, non avevo mai visto nulla di simile!
Complimenti anche per le
illustrazioni realizzate molto bene.
Spero che l' articolo venga tradotto anche
in italiano.

Complimenti ancora,

Saluti

Andrea Baldini
good work
Jack 2009-02-10 23:13:44

I'd love to test the actions when you create those. Also it would be nice to
see samples on photographs as apposed to the painting your using here. It's
difficult to see the sharpening.
thank you!
Timo Kirves 2009-03-14 17:51:02

Dear Davide,

The whole series of your techniques open dramatically better
chances to
succesful fine art photographic prints with todays inkjet
printers.

I work as a photographer and instructor in Helsinki, Finland, working
on both own and colleagues´photographic prints.

Thank you for shearing this
work of yours with the rest of community.

Best

Timo

Kirves
Davide 2009-03-14 22:48:29

Dear Timo, thank you very much for your comment, knowing that some of my
thoughts may help someone out there getting better results and enjoying his
pictures is a great reward for me.
I wish I had more time to explore other
interesting topics - I've something about local contrast in mind but I'd like to
dig a bit deeper before publishing.
Kind regards,

Davide
Thanks Davide
Miriam Calzada 2010-05-18 00:39:32

Hola, mi nombre es Miriam soy fotografo. Vivo y trabajo en Republica Dominicana.
He disfrutado mucho toda esta informacion que ofreces.
Trabajo por años con
Hasselblad y pongo mucho interes en cualquier forma de perfeccionar mi
trabajo.
Especialmente viniendo de un profesional como
tu.
Atentamente.
Miriam


miriamcalzada.com
Thank you Miriam!
Davide Barranca 2010-06-01 09:23:46

It's a great gift to read feedbacks like yours!
I've seen the images in your
website, and I'm sure the actual prints must be really gorgeous.
Thanks again ad
all the best,
Davide
Write comment
Name:
Email:
 
Title:
Please input the anti-spam code that you can read in the image.

3.26 Copyright (C) 2008 Compojoom.com / Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved."