It is currently Tue Jul 23, 2024 8:30 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Using unsharp mask w. max radius to enhance contrast / colour balance
PostPosted: Tue Nov 22, 2011 8:55 am  (#1) 
Offline
GimpChat Member

Joined: Oct 31, 2011
Posts: 16
In another thread in this category, Saulgoode mentioned using unsharp mask with a maximum radius as a "gentle adjustment" to contrast / colour balance. That was totally new to me, but I thought I would give it a shot next time I was editing photos. I did, and it works - I find I need to set the amount quite low to avoid overdoing the contrast, but it often produces a nice, gentle clarifying effect.

I just simply can't understand what it does, and that bothers me a bit!

I shoot in raw format. As I understand it, digital image files are "softened" a bit in the raw form, and unsharp mask will, well, mask this initial unsharpening, which has the effect of recovering detail. I'm not completely sure how, but it has something to do with increasing contrast of neighbouring elements, as I understand it. This is why noise will be enhanced also, and why overdoing it will produce halos along high-contrast edges. I usually set the radius very low (GIMP has a default of 5, but I use somewhere around 1 or two, to avoid artifacts and halos). As I understand it, the greater the resolution in your image, the more you can enhance fine detail with a low radius unsharp mask.

But... how does this general clarity effect (using maximum radius) fit into this? Or did I misunderstand how unsharp mask works in the first place?

I would appreciate if someone wants to help educate me a bit... ;)


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Using unsharp mask w. max radius to enhance contrast / colour bala
PostPosted: Tue Nov 22, 2011 3:23 pm  (#2) 
Offline
Script Coder
User avatar

Joined: Jun 22, 2010
Posts: 1171
Location: Here and there
I'm going to pass responsibility for trying to explain to Wikipedia: http://en.wikipedia.org/wiki/Unsharp_masking and especially the, rather brief, section on Local contrast enhancement.

A much better explanation is on the Cambridge In Colour website:
http://www.cambridgeincolour.com/tutori ... cement.htm


Top
 Post subject: Re: Using unsharp mask w. max radius to enhance contrast / colour bala
PostPosted: Wed Nov 23, 2011 2:51 am  (#3) 
Offline
GimpChat Member

Joined: Oct 31, 2011
Posts: 16
Wow, paynekj, that's like... telling me I'm lazy? ;)

You were right though, and thanks: I understand it all a bit better now. Maybe next time I'll do my own research rather than ask a board community to educate me. Or, actually, maybe not - after all this worked quite well... :hehe


Top
 Post subject: Re: Using unsharp mask w. max radius to enhance contrast / colour bala
PostPosted: Wed Nov 23, 2011 3:56 am  (#4) 
Offline
Script Coder
User avatar

Joined: Jun 22, 2010
Posts: 1171
Location: Here and there
MetteHHH wrote:
Wow, paynekj, that's like... telling me I'm lazy? ;)


No, that's me telling you that I'm too lazy to read it then try to explain it to you :hehe

If I wanted to tell you that you're lazy I'd use LetMeGoogleThatForYou: http://lmgtfy.com/?q=local+contrast+enhancement

Kevin


Top
 Post subject: Re: Using unsharp mask w. max radius to enhance contrast / colour bala
PostPosted: Wed Nov 23, 2011 4:20 am  (#5) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14728
Location: USA
LOCAL CONTRAST ENHANCEMENT -

Local contrast enhancement attempts to increase the appearance of large-scale light-dark transitions, similar to how sharpening with an "unsharp mask" increases the appearance of small-scale edges. Good local contrast gives an image its "pop" and creates a three-dimensional effect — mimicking the look naturally created by high-end camera lenses. Local contrast enhancement is also useful for minimizing the effect of haze, lens flare, or the dull look created by taking a photograph through a dirty window.

Yes i took that from a result of LetMeGoogleThatForYou WEBSITE :lol

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: Using unsharp mask w. max radius to enhance contrast / colour bala
PostPosted: Wed Nov 23, 2011 6:04 am  (#6) 
Offline
Script Coder
User avatar

Joined: Apr 23, 2010
Posts: 1553
Location: not from Guildford after all
Let's approach it from the opposite direction...

Imagine that a school decided to expel all of its students having "average" skin color, so that the resultant student body comprised only the exceptionally dark- and the especially light-skinned kids. Relatively speaking, the school's population would end up having greater diversity than it had originally (with regard to skin color). This is somewhat analogous to how unsharp masking can be used to achieve contrast enhancement.

Consider the following image (from Wikipedia), if we subtract the average color from it then we will have effectively increased the overall contrast of the image and cancelled out the "haze".

Attachment:
640px-Tropical_forest.JPG
640px-Tropical_forest.JPG [ 143.52 KiB | Viewed 4012 times ]

To do this, we first determine the mean values for the red, green, and blue channels using "Colors->Info->Histogram" and then create a new layer filled with this color. After setting the layermode of this new layer to "Subtract", the end result has much higher contrast and the haze has been for the most part eliminated. (The result is not exactly what we would typically want -- being far too drastic and removing more of the original than desirable -- but that is where the masking and threshold comes into play; our main concern is with understanding the mechanism for contrast enhancement and color toning.)

Attachment:
SSavg.jpg
SSavg.jpg [ 37.55 KiB | Viewed 4012 times ]


Now going back to our hypothetical politically incorrect school, imagine if the average skin color was determined on a classroom-by-classroom basis, rather than just an average of all the students in the school . The result would probably be a little bit different since the different classes might have their own biases (for example, woodshop might have on average a lighter skin tone than a course on African studies), but the final population would still be relatively more diverse (with even greater diversity found in each of the individual classrooms).

This is analogous to how blurring works -- a pixel's color is determined by a (weighted) averaging of its nearest neighbors -- and when we choose a large radius for the Unsharp Mask filter we are effectively changing the makeup of our "Subtract" layer (in the preceding approach) and making the average more "localized".

Attachment:
SSblur.jpg
SSblur.jpg [ 38.33 KiB | Viewed 4012 times ]


Again, the result achieved merely by subtracting the average color is not the complete solution to understanding Unsharp Masking; but my main goal was to demonstrate how "haze removal" through employment of a large USM radius basically works. If you wanted to replicate the functionality of USM completely, you would need to generate a mask based on how much each pixel deviates from the average (USM Threshold) and also adjust the blending of the result with the original (USM Amount).

_________________
Any sufficiently primitive technology is indistinguishable from a rock.


Last edited by saulgoode on Wed Nov 23, 2011 9:18 am, edited 1 time in total.

Top
 Post subject: Re: Using unsharp mask w. max radius to enhance contrast / colour bala
PostPosted: Wed Nov 23, 2011 7:50 am  (#7) 
Offline
GimpChat Member

Joined: Oct 31, 2011
Posts: 16
Thanks saulgoode! I love your "politically incorrect school" example! :)

Actually, by now this discussion has improved my understanding both of why the large-radius USM works the way it does, how USM works in general, and even the historical context of how this applied to film processing also. What a great forum.


Top
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) 'Equalize' and 'White Balance' makes image greyscale

3

No new posts color enhance

2

No new posts Attachment(s) How to enhance color

5

No new posts Attachment(s) How to enhance an old photo

17

No new posts Attachment(s) Enhance Shadows Plug-in

2



* Login  



Powered by phpBB3 © phpBB Group