My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
Introduction  
Introduction, very basic guide and examples
Updated Jan 25, 2012 by tibor...@gmail.com


Advanced Unsharp Mask


Unsharp mask is commonly used tool to increase perceived sharpness of image. Or in other words - increase local contrast of image. The Gimp by default contains unsharp mask tool, but that one is very basic. So this plugin exists to improve capabilities of the unsharp mask. See below for more info.

First, here is the screenshot of latest version of plugin:



Briew overview of capabilities


Two types of blurring

  • Normal (simple blur, this is standard for unsharp mask)
  • Selective (this is my addition, the purpose is to prevent occurence of halo effect between areas with too diferent brightness)

Four types of output

  • Sharpened image (this is expected output of this plugin)
  • Mask (might be important to see when tweaking settings)
  • Splitted mode (to compare the effect)
  • Mask-to-img difference (for "creative" purposes)

Brightness via mask manipulation

This tool is intended to manipulate overall brightness and/or contrast of image. Note that this tool works via unsharp mask not an actual value of individual pixels. One of effects is that this way local contrast is preserved.

Out-of-range protection

It is natural and expected, that during sharpening some pixels cat get out of 0-1 range. This tool is to keep them within deserved range. Allowed values are 0.9 - 1.05, if you set the value to let us say 0.98, the effect will be that no pixels with brightness below 0.98 and above 0.02 are pushed out of the range - above 0.98 and below 0.02. Note that brightness via mask is applied afterwards.

Alternative colospaces

Primarily the plugin calculates brightness with own formula, but you can switch to HSV and HSL mode to use value/lightness as a "brightness".



Introductory step-by-step guide


General notes

I presume you have plugin installed, because it is better to try it then only read about it. So open any image and start the plugin (Filters - Enhance - Aumask Sharpening). First note - preview is auto-expandable so you might want to enlarge plugin to have the preview enlarged. There is the Output combo box under the preview, please try out some of options provided there and check results in preview.

1. Simple sharpening

This is very elementary function of the plugin. It is based on sharpness equalizer. Sliders changes current distance between original and mask and each one controls own distance. Keep mouse over any slider to see actual ammount. Here with this functionality, I'm not sure if sharpness equalizer is that usefull or better then a 'single amount' sharpening. So play with sliders and play with "radius" in the right side. You should have selected "standard blur" mode. Change the view (Output mode) in previews to see an effect. My advice is to keep all sliders in the similar level. And here is an example:

2. Brightness modification

One of controls on the right side is Brightness adjustment. This modifies brightness via mask. So the effect is that it preserves local contrast. Usually with this option you will want to compress brightness range of image. So play with those two spinboxes and blur radius as well to see the effect.

Obligatory example:

3. Selective mask - Hallo efect elimination

I believe that you noticed "hallo" efect in areas where two areas with very different brightness met. To avoid this I'm introducting here selective mask ( see combo box in Mask Options). For now you can try Selective mask without postblur. First set Output to Mask and play with various settings - radius and treshold. Afterwards change the output to Image and try to find out if this seems usefull for you.

Here is example (sorry no image of mask) and comparison of sharpening with normal and selective mask. The image is split to four strips - original, sharpened with normal mask (note halo above the trees), sharpened with selective mask and last one is sharpened with selective mask after saturation:

Below is another example. (I know the photo itself is of poor quality) This example show comparison of masks and resulting images. (Normal and selective)

4. Selective mask - Contrast reduction

Another purpose of selective contrast mask is reduction of contrast without hallo effect. Note that sharpening here is optional.

5. Selective mask with postblur

Sometimes I noticed artifacts on "borders", so I added a "postblur" blurring to the script to soften transitions between areas. I don't have the example now, but keep in mind that such feature is there.

6. Mask-to-img difference

Another possibility (it is up to you what you could do with it) is Mask-to-img difference. Here the output is depending on radius, type of mask, but in addition you can use controls under Mask-to-Img parameters.

Examples:

last one was done using Selective blur mask, thought differences to normal mask might be not that visible

7. HDR

Another option how to use functionality is something like this.


Final note

Any ideas and feedback is welcomed (to email prefferably).

Comment by photoco...@gmail.com, May 19, 2011

A nice touch would be allow to apply to channel As example only to the L channel (of Lab ) or only to to the Value channel .. that will allow to sharpen without modify hue and saturation

I suppose is already possible run the plugin on a channel, here i was suggesting to allow to do from the plugin gui adding a dropdown list (i.e Default "All" or "RGB", then Luminosity Value,and so on )

Obviously that require convert the image (i.e to LAB o HSL or HSV) apply on the chosen channel(s) and reconvert back

another way to allow something similar but with less complication (but less flexibility ) may be add a option as "Preserve Original Hue & Saturation

if that true 1 the active layer is duplicated 2 the filter applied to the dup 3 the 2 layer merged in value mode (= value of edited layer, original Hue and Saturation )

Comment by project member tibor...@gmail.com, May 19, 2011

to PhotoComiX I opened new wiki page - Color processing, where I would like to define alternate algorithmes for processing - please look there and try to suggest formulas for your alternate ways. Before doing any changes I would like to have everything specified so that I would only do programmers work, and not need to deal with color space theory.

Comment by photoco...@gmail.com, Dec 29, 2011

i did not see your reply before sorry i would have a look to the wiki


Sign in to add a comment
Powered by Google Project Hosting