# Unsharp Mask with Statistical Differencing

This topic is 4835 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi guys, I got my unsharp mask working, basically I use a convolution filter for the Gaussian blur then I apply this formula: V' = (V - x*U)/(1 - x) where V is the value of the image pixel , U is the unsharp mask pixel, and x is degree of sharpening applied (0.0...1.0) I came acroos this statement: "...method called 'statistical differencing', which extends the idea of an unsharp mask by weighting the subtraction of the blurred version of the image using the local standard deviation." I understand that conceptionally, for each pixel I compute the 'x' value in the formula above based on the standard deviation (SD) of surrounding pixels. But how do I put that into practice ? What sized box do I use to compute the SD and how do I scale that value to something useful ? I can't find much information on this technique. Also, this is rather interesting, so if you know about this as well I'd appreciate some information: "The fun comes when you want to sharpen a picture, without sharpening the grain. This means you want to boost the middle frequencies." I'll leave 'boosting the middle frequencies' to another project but it sounds very interesting. I hope someone can help me out with the statistical differencing technique and maybe shed some light on the paragraph just above. Thanks.

##### Share on other sites
I dont know how to do this either but it seems like a 3x3 or 5x5 box centered about the pixel would do the trick. if you converted the images to float I'd assume your maximum std deviation would be if aproximatly half the pixels were black(0) and half(1) so you find the maximum std deviation I'd assume it would be about 9*(.5)^2/8 for the 3x3box this gives you a upper limit to your deviation and thus a scale to measure it by. that last statment he's refering to using band pass filters to sharpen images. in this way you don't get over amplification of the noise in the image, in fact usually even if you're sharpening an image you run a small guassian(3x3 or 5x5) through it first, because sharpening tends to bring out the unwanted noise in the image. look up band pass filter for more information on that last statemnt, unfortunatly bandpass filtering usually requires you to take the fourier transform of the image, because convolving with them is a pain in the ass. the only reason you can do it with a guassian is because a guassian has the really neat property that a guassian in the frequency domain is a guassian in the space domain. some common bandpass filters are butterworuth if I got that name right maybe you can look it up..

Tim

1. 1
Rutin
42
2. 2
3. 3
4. 4
5. 5

• 9
• 27
• 20
• 14
• 14
• ### Forum Statistics

• Total Topics
633387
• Total Posts
3011607
• ### Who's Online (See full list)

There are no registered users currently online

×