Lesson 4 -  SHARPENING, SOFTENING, UNSHARPENING

   On occasion, we've all found ourselves wanting more from our photos.  Perhaps we'd like to get just an additional amount of "crispness", or maybe instead finding a way to tame down a harsh image.  While PSP offers a myriad of commands, each specific to their own special circumstances, there are basically three that demonstrate the fundamentals and are used the most often.  In  this lesson, we will explore the use of the sharpen, soften, and unsharpen mask commands, as well as taking a look at a special case command called edge preserving smooth.

SHARPENING

   The name of the command pretty much says it all.  Executing the command sharpen command performs an operation that essentially sharpens the appearance of the image.  It's easy to use because it's a one click command, no dialog box with controls to set.  But what is this command actually doing?

  What the sharpen command is doing is simply increasing the contrast, but in a slightly different way than we discussed in the past.  Instead of just looking at the image as a whole and making the dark colors darker and the light colors lighter, the sharpen command examines each individual pixel and its surrounding neighbors.  If the pixel is darker than the average of it's neighbors, then the sharpen command makes that particular pixel even darker.  The opposite process is performed on the lighter pixels.  The end result is that edges of color and brightness changes become more defined, or sharpened.

  The sharpen command can be applied as many times as desired.  The Sharpen more command essentially applies two applications in one click.  Be careful, as while the sharpen command can help define edges, it will also enhance the inherent noise in the image as well.


Figure 1.  Various iterations of the sharpen command.




Unsharpened image

1x sharpening
2 x sharpening



5x sharpening
10x sharpening




SOFTENING

  The soften command is basically the counterpart to the sharpen command.  Again, it's a one click command with no arguments to adjust.  Instead of increasing the contrast of a pixel based on surrounding pixels, it decreases the contrast.  It is a command that can be repeated as many times as desired, perhaps more so than the sharpen without ill effects since it is suppressing detail rather than attempting to enhance it.  There is a soften more that also does two iterations in one click.  

There are several uses for this command.  It is great for taming harsh images where masking super fine detail may actually be desired, such as in a portrait.  It also generally works well for covering up brush strokes in edited images.


Figure 2.  Various iterations of the soften command.




Unsoftened image

1x softening
2 x softening



5x softening
10x softening



Now while the sharpen and soften commands are opposites of each other, they do not perfectly counteract each other.  This is due to the mathematical algorithms behind each command.  Rather than going into the detail, let's make a comparison.  Let's say you have a piece of sheet metal.  If you hammer on one side, you can put a dent in it.  Now, if you flip the sheet over and hammer the dent out, what happens?  You might be able to get the center back in line with the rest of the sheet, but because of the initial hammering and resulting extruding bend, you've work hardened the surrounding sheet metal and it refuses to bend back the way it was.  If you repeat this process, you'll end up with a bunch of ripples in your piece of sheet metal  surrounding the point you continue to hammer.   A similar effect happens with a sharpening and softening of the image.  In essence, you "metal fatigue" the image.  So, the main point to keep in mind is that you cannot necessarily recover all the detail back from a softened image, and you cannot do so without introducing more error into the image.


Figure 3.   An example of the "image fatigue" that develops from softening, then sharpening.




a. The original test shape
b.  The test shape softened 10 times.
c.  The softened test shape sharpened 10 times.



UNSHARP MASK

   The name of this particular command is somewhat misleading.  This is actually a sharpening command in disguise.  The unsharp mask command is basically the sharpening tool with some additional controls made available.  It is handy when you are attempting to enhance particular attributes of an image.   One particular application that it can be useful for is recovering some of the detail lost in a slightly out of focus or blurred image.  

There are three controls to the unsharp mask.   The radius determines which pixels are used in determining the changes for the pixel under adjustment.  The larger the radius, the higher the number of surrounding pixels are taken into consideration.  There is also some sub-pixel interpolation taking place based on the radius.  Generally, a radius value of 0.5 to 2.50 is most effective.  The strength controls how strongly the pixel under adjustment is adjusted.   Typically you will want to use a value under 100.   The clipping sets a minimum threshold of contrast difference needed for a surrounding pixel in relation to the pixel under adjustment that needs to be met in for it to be taken into consideration for the adjustment calculation.  This control can be set higher so that only areas of higher contrast are sharpened, for instance.  In doing so, you can have features sharpened, yet not amplify noise in the image.



Figure 4.  The controls for the unsharp mask.





Figure 5.  SOO 1003 approaching, shot with maximum zoom resulted in camera blur due to the photographer's increased adrenaline levels.




Figure 6.  After the unsharp mask, some of the details become more pronounced, having a somewhat negating effect on the blurriness.



EDGE PRESERVING SMOOTH

   To finish this lesson, I felt it would be worthwhile to examine one of the more specialized commands that relates to our topic.  The edge preserving smooth command can be useful for lessening or removing color noise from an image.  It works much like the soften command, however it respects areas of sharp contrast and edges.  In doing so, the noise can be smoothed out but the majority of the detail and image crispness can be maintained.  The command has only one control, and that is the amount of smoothing desired.  In more severe cases, you can try more smoothing and then attempt to recover some of the crispness using the sharpen command or unsharp mask, keeping in mind "image fatigue"


 

Figure 7.  WC 590 shot at night exhibits a fair amount of noise present in areas that would normally be more homogenous, such as the maroon.





Figure 8.  After applying the edge preserving smooth, the speckling noise has been mitigated, yet details such as the lettering on the herald remain intact.


   So, now you have the the basic tools to "crisp" up an image, or tone down a a piqued one.  While these tools can be used to change the atmosphere of an image, they can be used in some instances to compensate for some of the shortcomings in the photography itself.  Details can be made to stand out, while unwanted noise can be smoothed away.

Until next time, happy experimentation.

 

-"Evil"  Ray



©2003 Ray Meyer
http://www.n9pby.com