Photography Software & Post Processing Forum

Photography Software Forum Discuss Adobe Photoshop, RAW conversion, photography software, and anything related to digital photo processing. Forum moderator is GB1.
Digital Photography Software Reviews >>
Write A Review >>
Adobe Photography Software User Reviews >>
Photography Software News & Articles >>
Results 1 to 10 of 10

Thread: Unsharp Mask

  1. #1
    GB1
    GB1 is offline
    Moderator GB1's Avatar
    Join Date
    Feb 2004
    Location
    San Diego CA
    Posts
    9,960

    Lightbulb Unsharp Mask

    Info on the Unsharp Mask. I posted this in another thread in the Critique forum in response to a question - good stuff for post processing.


    From Total Digital Photography, 2006, by Chris George. I'd highly recommend this as a reference - excellent handbook, very readable.

    One of the ironies of digital imaging is that every digital camera and scanner deliberately blurs the image as it is captured. (See * below.) They do this to avoid interference patterns which might be created by the grid-like way in which pixels are arranged: then, to correct for the degradation in image sharpness, these devices offer settings that electronically resharpen the image.

    Whenever possible, though, it is best to shoot and manipulate digital images in the softened, unsharpened state. There are two reasons for this. First, different images require different amounts of sharpening, party due to subject matter, and partly depending on how they are going to be used. Second, the sharpening process produces side-effects, such as glowing edges, that can be made much more visible by manipulation. For these reasons, sharpening is something that is done as the last step in the manipulation process before the file is saved.

    Photoshop and similar programs provide a number of one-step sharpening filters but these are generally crude, and are less than ideal solutions for many images. The sharpening tool of choice is the curiously named Unsharp Mask (or USM), which is also found in the Filter menu.

    The Unsharp Mask gets its name from an old trick used in the printing industry in which an image plate was made to look sharper when printed by sandwiching it with a defocused negative plate of the same image. The software version of this trick offers three variables that control the degree that the image is sharpened. Unfortunately, as one can counteract the effect of the other, it is less than intuitive to work out where each should be set.

    The key is to look carefully at the important parts of the image by dragging the magnified preview to telltale areas in turn, to check the effect. You want the main focal points of the image to appear sharp, without degrading image quality; however, you must also check other areas of the image; out-of-focus areas can look strange when over-sharpened (the effect can be applied selectively if there is no compromise solution. See ** below). Also bear in mind that more sharpening is needed if images are to be printed, than if they are simply to be displayed on screen. (I found this out the hard way - GB).


    USM Controls

    Amount

    This is the easiest of the controls to understand, offering values from 1-500%: the higher the amount, or strength, the more the image is sharpened. A typical starting point for this is 100%, with average final values being 50-200%.

    Radius

    Sharpening is applied to edges of elements in the image, and this control defines how far either side of a found edge the effect is applied. The higher the value, the greater the sharpening effect; but this also increases overall contrast. A typical starting value is around two pixels, with typical final values being 1-10 pixels (the actual amounts will also depend on the size of the image; the more pixels the higher this setting will need to be).

    Threshold

    This defines what counts as an edge within the image - the higher the value, the greater the difference is needed between two areas before an edge is sharpened. Confusingly, therefore, the lower the figure set for the threshold (or clipping amount), the greater the sharpening effect. Increasing the threshold can be a good way of avoiding film grain and digital noise being sharpened. A typical starting value is around five levels, with end values usually being in the range 1-15.


    Other hints

    Shots with only minor detail need only a small amount of sharpening.

    Images with bright highlights look especially bad if over-sharpened.


    * In addition to individual red, green and blue filters, there is a set of filters that covers the whole sensor area. The most significant of these is the low-pass or anti-aliasing filter. One of its jobs is to help minimize the interference pattern created when using the sensor to photograph fine, grid-like detail, such as in the weave of a silk skirt. Perversely, this filter actually softens the image slightly, which is the main reason why digital images usually need to be sharpened electronically, either by the camera or in post-production. (I think the Nikon D200 has a setting in its menus to automatically sharpen your images, which I never understood why this would be needed until reading this. But like he says, different shots need different amounts of sharpening, so best to sharpen them individually in post-processing. - GB)

    ** Basically says that you can make one area of an image look sharper by blurring its surroundings. This can be done in PS by making a copy of the area, say a background, blur it, then erase the areas on the new layer you want to remain sharp.
    Photography Software and Post Processing Forum Moderator. Visit here!

    -----------------------------------------------------------------------------------------
    Feel free to edit and repost my photos as part of your critique.
    -----------------------------------------------------------------------------------------

    My Site

  2. #2
    News & Rum-or-ator opus's Avatar
    Join Date
    Jul 2004
    Location
    Southeast Wisconsin
    Posts
    2,505

    Re: Unsharp Mask

    Is there a software program dedicated to sharpening that is better than the tool in PS?
    Drink Coffee. Do stupid things faster with more energy.


  3. #3
    project forum co-moderator Frog's Avatar
    Join Date
    Sep 2006
    Location
    wa state
    Posts
    11,195

    Re: Unsharp Mask

    Thanks, GB! I've seen this before but never sure what I remember so this time I'm saving it.
    Keep Shooting!

    CHECK OUT THE PHOTO PROJECT FORUM
    http://forums.photographyreview.com/...splay.php?f=34

    Please refrain from editing my photos without asking.

  4. #4
    drg
    drg is offline
    la recherche de trolls drg's Avatar
    Join Date
    Nov 2004
    Location
    Route 66
    Posts
    3,404

    Re: Unsharp Mask

    Greg,

    You might want to move the following thread in to this forum:

    The Sharpening Thread

    There are some additional links in the thread Post Processing your DSLR for more "Pop" and further discussions of this topic.

    This is an example of what I was referring to about covering old territory in a new forum.

    USM (Unsharp Mask) is not necessarily, not for a long time, the 'tool of choice', certainly not alone. Even though it primarily is thought of as an edge sharpener, it is still a global sharpening tool and used too heavily will not only sharpen noise but create noise in an image.

    The halos created by USM to provide the contrast that appears to sharpen the image do indeed create additional side effects (see The Sharpening Thread) which will often require additional work or techniques to alleviate.

    The newer Smart Sharpen type of filters are 'better' but they are not intuitive for most users and much of the training material on them has only recently (late 2007 -2008) started to really effectively describe the most effective applications.

    A couple of item:

    Scanners and cameras DO NOT intentionally blur an image.

    Digital Cameras using the traditional Kodak Bayer three color filter sensor arrangement have extra filters in front of the sensor that 'degrade' the image slightly and the interpolation of color from other wise a monochromatic value introduce an effect which can be partially remedied via sharpening. There was a lot of bad information put out at the beginning of the digital photography era that just continues.

    Fuji and Foveon take slightly different approaches (and Nikon has a patent series on some newer sensor tech).

    Fuji uses different sizes of sensors with different spectral sensitivity to generate their image by a different algorithm. They have a different approach to how the image is generated from Bayer and thus a different type of 'noise' or artifact.

    Foveon uses a sensor that actually is sensitive to three separate colors at each detector site without filters. Foveon can be noisy partially due to the technology of getting the data off the chip, but the artifacts normally associated with sensor issue like we are discussing is not present.

    Scanners (certainly those set up for any level of professional/production work) attempt to remove the various effects from the mechanism of scanning. Much of the need for any image alteration to get rid of ( an example is moire) bad effects has been mostly eliminated with 'glassless' scanning.

    Moire is the 'grid' interference pattern problem you mention but the filters don't always acheive the desired results as they are built for a nominal mid sensor response range and bright or overly contrast lines/edges in scene can play havoc with a RAW sensor image.

    Anti-aliasing will make a photograph look jaggy not blurry. It will generate stair-step like aberration in the data. Sharpening will compensate for this as it (with the standard Adobe Photoshop USM Filter) first creates a blur and then generates halos.

    In one of the threads above 'blurring' is a part of many sharpening processes that aids in finding the 'edge'. So blurring occurs but that is not where and when you might first think.

    Most modern cameras build in some additional 'tricks' either in the lens or preRAW processing by analyzing and doing some image processing.

    RADIUS settings for High Resolution images should be lower not higher. For very detailed photos sub 1 Radius settings probably are the norm as they introduce less degradation to the image.

    THRESHOLD - An important thing to remember in ADOBE Photoshop products is that at a setting of 0 (zero) everything is sharpened. Threshold works as a noise control adjustment to prevent the Amount control from totally ruining you photograph/image regardless of its original source (digicam/scanner/film).

    Truly one needs to work with each image when using straight USM to get an idea of what happens. There's a exception to this I'll try to address simply later (I have to get up in few hours !)
    Last edited by drg; 01-19-2009 at 12:14 AM.
    CDPrice 'drg'
    Biography and Contributor's Page


    Please do not edit and repost any of my photographs.






  5. #5
    drg
    drg is offline
    la recherche de trolls drg's Avatar
    Join Date
    Nov 2004
    Location
    Route 66
    Posts
    3,404

    Re: Unsharp Mask

    Quote Originally Posted by opus
    Is there a software program dedicated to sharpening that is better than the tool in PS?
    There are plug-ins from Nik who make Sharpener Pro! and PixelGenius produces PhotoKit Sharpener. Both of these have tools and masking techniques that go way beyond what is built in to PS.

    Once you learn how all the pieces fit together, all the parts are in PS to do it without plug-ins, but it can be time consuming to get your actions working as desired.

    See the Sharpening Thread above and also consider working in only one channel at a time. Pick a channel that displays the most contrast of the portion of the image you wish to sharpen and work there (via a layer of course) . It can produce astounding effects and generate almost no additional noise/artifacts. The luminosity channel is frequently the best choice.

    The Find Edges filter can also be very effectively used in conjunction with layers to sharpen selectively via a brush selection or other techniques.

    Contrast or saturation or brightness can be pumped in a color channel to sharpen via color! That's a real specialized topic.
    CDPrice 'drg'
    Biography and Contributor's Page


    Please do not edit and repost any of my photographs.






  6. #6
    Senior Member jetrim's Avatar
    Join Date
    Jul 2008
    Location
    Ft. Lauderdale
    Posts
    3,229

    Re: Unsharp Mask

    Quote Originally Posted by drg
    Anti-aliasing will make a photograph look jaggy not blurry. It will generate stair-step like aberration in the data.
    This is fascinating, as anti-aliasing by definition is a technique used on a grey-scale or color bitmap display to make diagonal edges appear smoother by setting pixels near the edge to intermediate colors according to where the edge crosses them. So why in the world would that make an image more jaggy than blurry? The technique was designed to do exactly the opposite...

    Just trying to understand.

  7. #7
    GB1
    GB1 is offline
    Moderator GB1's Avatar
    Join Date
    Feb 2004
    Location
    San Diego CA
    Posts
    9,960

    Re: Unsharp Mask

    Quote Originally Posted by drg
    Greg,

    You might want to move the following thread in to this forum:

    The Sharpening Thread

    There are some additional links in the thread Post Processing your DSLR for more "Pop" and further discussions of this topic.

    This is an example of what I was referring to about covering old territory in a new forum.
    Hey CD -

    Thanks for contributing to the thread. I realize that there will be some duplication of material in various forums when addressing problems, as the various forum subjects don't have strict delimitations (sounds a bit like "fuzzy logic"), resulting in some repetition ... I originally added the USM info into a thread on the Photo Critique forum, for example, to address a question on sharpening and how to do it/how far to go w/ it. Here, the intention of the post is to discuss the Unsharp Mask and not the entire subject of Sharpening .. that seems like a deep subject if one really wanted to dig - for instance, the history, the algorithms used, and the different implementations by different software packages. Whether we should even try to put that all in one thread might be as much a philosophical question as an organizational one (!?) Anyway, ..

    Regarding the intentional blurring of the image, Mr. George seems to disagree. It may be a semantics error on his part more than anything - he may have meant to say that blurring happens as a side effect of preventing interference patterns, rather than the scanners and cameras intentionally blur the images.. I will read up on this some more. The subject is of interest to me, so I am searching for answers (I am looking for an alibi for why my shots are not sharp - lol). I will read the Sharpening thread very closely.

    Either way, it appears that sharpening is indeed required for digital images and that some cameras (like my Nikon D200) have built in sharpening if you choose to use it. But given what I've read, you're better off not doing that because every shot requires different amts of sharpening, may have effects added afterward, and so on. I'm hoping that this forum's as much about process as hardware and technology.

    I agree with Jetrim btw. Anti-aliasing is an optical trick that graduates colors between a 'staircased' object and and adjacent area, so that it is not as harsh/jagged. It does look softer/blurrier/fuzzier, and I would think that sharpening afterward would counteract that to some degree. But I've also noticed that it doesn't just reverse it - an image with anti-aliasing that is sharpened looks better than a shot w/o anti-aliasing. It could be a simple matter of degree, which seems to be true for all artistic endeavors.

    G
    Photography Software and Post Processing Forum Moderator. Visit here!

    -----------------------------------------------------------------------------------------
    Feel free to edit and repost my photos as part of your critique.
    -----------------------------------------------------------------------------------------

    My Site

  8. #8
    drg
    drg is offline
    la recherche de trolls drg's Avatar
    Join Date
    Nov 2004
    Location
    Route 66
    Posts
    3,404

    Re: Unsharp Mask

    Quote Originally Posted by jetrim
    This is fascinating, as anti-aliasing by definition is a technique used on a grey-scale or color bitmap display to make diagonal edges appear smoother by setting pixels near the edge to intermediate colors according to where the edge crosses them. So why in the world would that make an image more jaggy than blurry? The technique was designed to do exactly the opposite...


    Just trying to understand.
    jetrim and Greg (I noticed a post from Greg while typing this)

    It was late, but let me try and clarify what I was getting at originally.

    I was going to say and left out that USM can fix some of the jaggy problems by itself but usually makes it worse by undoing the effects of prior processing mechanical or in software.

    This desired result with USM is achieved by using the USM filter to blur first (see the big Radius methods in previous threads) and then sequentially, applying another sharpening step to restore the perceived sharpness. This method for fixing 'blur' still has to be carefully applied as it can really bring out undesired edge effects, though the intent is to enhance the image by doing the same thing.

    Then -

    Generally anti-aliasing as an image processing technique or algorithm is indeed designed to fix those stair-steps at the edges such as in fonts. What can result is a situation where the jaggies return if the A-A is applied again (a second time) as can happen with noise reduction formulas and various sharpening algorithms that don't have any method built in to 'evaluate' the data to see if any reduction has already been applied.

    Early methods meant to correct video interlace induced aliasing don't always successfully work on still images. This is because they also take in to account edge effects caused by motion between scans. Those problems can be thought of as the curtain-in-the-wind problem (there's a better term that won't come to mind). For still images application of the generic A-A methods for video are not as successful.

    There are newer A-A techniques including those originally from Aldus developed for fonts (now Adobe) and entirely mechanical polarization filter systems accomplished by a physical filter in front of the sensor(s). In Canon products these polarizing and IR reflector/filtering systems prevent the light (supposed to anyway) from spilling across sensor sites and are supposed to increase the ability of the sensor to function. These filters are of the 'low-pass' category and are presumed by many to provide an A-A effect. They don't anti-alias, but they prevent certain type of Aliasing from occurring or being as noticeable in the color realm. I believe technically you can shift color related interlace problems completely out of the visible spectrum.

    Smart Sharpening as included now in recent versions of Photoshop (among others including the software from PixelGenius) aims to prevent the second of third application of the technique. If you shift the black to white that was originally white or vice versa (and all the fun shades of gray in between) you get you stairsteps right back again. And if you sharpen with halos on the edges to boost contrast, it just looks really bad.

    I didn't mean to confuse the issue, but my reason for this is that we've learned a lot about this topic and effective methods for fixing problems. Strictly using USM on output from many modern cameras may cause more harm than good without having some understanding of what to look for and then understanding how it can go bad!

    I will be blunt, USM can both improve and degrade an image. It may re-introduce visible problems, such as aliasing, in 'normal' usage depending upon what has been done previously.
    CDPrice 'drg'
    Biography and Contributor's Page


    Please do not edit and repost any of my photographs.






  9. #9
    drg
    drg is offline
    la recherche de trolls drg's Avatar
    Join Date
    Nov 2004
    Location
    Route 66
    Posts
    3,404

    Re: Unsharp Mask

    Greg,

    I tried to address the anti-aliasing issue in an entry that I inadvertently started.

    I'll say this about the blurring issue.

    RAW files straight from a digital camera do require sharpening. That doesn't mean the camera or certainly scanners blur them. You could think of that as their 'natural' state to create the image as a result of the technology process. It has a much to do with adjusting the balance of all the image quality factors such as contrast, brightness, dynamic and tonal range, from a 'flat' representation to a color space as anything. That's what we use RAW converters for now. It gets everything into a workable range. A true RAW image bit mapped to the screen without any adjustment is pretty ugly in most cases.

    I'll see if I can locate the book you refer to and see what it says. There are different type of scanner implementations as well as DSLR sensors but to 'blur' an image after creating in the device doesn't make sense unless it is to produce a JPEG output file. But that's a big can of worms!!

    I'll get a post up later today more about process
    CDPrice 'drg'
    Biography and Contributor's Page


    Please do not edit and repost any of my photographs.






  10. #10
    Senior Member jetrim's Avatar
    Join Date
    Jul 2008
    Location
    Ft. Lauderdale
    Posts
    3,229

    Re: Unsharp Mask

    Thanks for the clarification DrG, that makes a lot more sense now

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •