There are some educational materials, like Alex Pan - CS 194-26: Image Manipulation and Computational Photography - Fun With Frequencies and Gradients, which demonstrate the unsharp masking technique used for sharpening the image is almost equivalent to applying a Laplacian of Gaussian (LoG) filter on the image:

LoG for image sharpening

However, as far as I know and understand, the LoG is basically the Laplacian of the smoothed-image and therefore it just gives us the high frequency components of the image, e.g. details such as edges, and not a sharpened version of the image (as is obtained with unsharp masking). Since I have seen the image above a few times in lecture slides/notes of various image processing courses, I was wondering whether I am wrong in my reasoning or there is some other point which I have missed.


1 Answer 1


Unsharp Mask is a sharpening filter.
Intuitively, you apply high pass filter on an image and add the scaled result to the original image.

So the equation you posted is accurate:

$$ o = f + \alpha (h \ast f) $$

Where $ h $ is an High Pass Filter.
If we implement our high pass filter by $ e - g $ where $ e $ is the unit impulse and $ g $ is a low pass filter implemented by a Gaussian Filter you'd get:

$$ o = f + \alpha (h \ast f) = f + \alpha ((e - g) \ast f) = f + \alpha ( f - g \ast f) $$

So basically the result is add to the image the scaled difference between the image and a low pass filtered version of the image.

This is exactly (With some quantization steps) what Photohsop is doing (See Example 001, and Example 002).

Regarding your question, Laplacian of Gaussian (LoG) is an high Pass Filter. So it can replace $ h $ from above.
As you can see, you can't only use it directly but scale the result and add it to the original image.

Difference of Gaussians

As can be seen in the Difference of Gaussians page at Wikipedia, there is a connection between difference of gaussians and LoG. It is explained in Tony Lindeberg - Image Matching Using Generalized Scale Space Interest Points - Appendix A:

enter image description here

Intuitively, we can approximate a Scaled Unit Impulse by a Gaussian Kernel with very small standard deviation.
Now, the difference between Unit Impulse (Or its approximation) and LPF gives us High Pass / Band Pass. It is easy to see in Frequency Domain:

enter image description here

So the logic is: Unit Impulse - Wide Gaussian (Low Pass Filter) ~= Narrow Gaussian - Wide Gaussian = Dog ~= Log. Where DoG and LoG are basically High Pass Filter based on the Gaussian Kernel.

The Equation

From :

enter image description here

The equation says that: $ (1 + \alpha) e - \alpha H $ is the sharpening filter which is correct. Let's rewrite it:

$$ (1 + \alpha) e - \alpha H = e + \alpha e - \alpha H = e + \alpha (e - H) $$

So $ e $ being the Unit Impulse, hence $ e - H $ where $ H $ is a low pass filter (Specifically one could use Gaussian Kernel) gives us an High Pass Filter. Scaling it and adding it wo the neutral item with respect to convolution (The Unit Impulse) gives the sharpening filter. Applying on the image:

$$ f \ast (e + \alpha (e - H)) = f + \alpha (f \ast (e - H)) $$

As written above, Unsharp Mask, which is a sharpening filter, is adding to the image the scaled convolution of the image with an High Pass filter.

  • $\begingroup$ Thank you for your answer (though, I think it could be much more shorter and to-the-point). But the thing I still don't understand is that why the picture claims that the "Scaled impulse - Gaussian ~= Laplacian of Gaussian" whereas the LoG gives us the high frequencies, not the sharpened image directly? Is it an error, repeating over and over in these lecture materials? Or should we view it in the sense of similarity and not equality? $\endgroup$
    – today
    Oct 20, 2020 at 18:49
  • $\begingroup$ But scaled impulse - Gaussian also gives us High Pass Filter. So I'm not sure what's the issue here. Mathematically, I add explanation. Unsharp Mask isn't the result of High Pass Filter. It is the scaled result of High Pass Filter added to the original image. $\endgroup$
    – Royi
    Oct 21, 2020 at 4:22
  • $\begingroup$ I understand, but this "Unsharp Mask isn't the result of High Pass Filter. It is the scaled result of High Pass Filter added to the original image" is exactly what I am saying; i.e. the image in my question implies that sharpening filter is (almost) equivalent to LoG, however their effect is different (the former gives us the sharpened version of the image while the latter gives only the high-frequency components of the image). $\endgroup$
    – today
    Oct 21, 2020 at 9:19
  • $\begingroup$ @today, You're wrong. The equation in your question, just like my derivation applies High Pass Filter to the image and add the result to the original image. Remember, the result of High Pass Filter has zero mean. The equation you wrote says $ f + \alpha (f + g \ast f) $. Pay attention that $ f - f \ast g $ is equivalent of applying High Pass Filter to the image for any low pass filter $ g $. $\endgroup$
    – Royi
    Oct 21, 2020 at 17:14
  • $\begingroup$ Sorry, I don't see where I have used "+" sign as in $f + g*f$?! Actually, I haven't written any equations, it's all in the image! And the equation is adding the difference of the image and the low-pass filtered image to the image itself. $\endgroup$
    – today
    Oct 21, 2020 at 17:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.