2
$\begingroup$

I've been diving into smoothing kernels and I came up with a lot of questions that I haven't been able to find in the internet. If you can I'd appreciate the help :)

(Capitals and bold were used for formatting)

QUESTION 1

It is my understanding that if we do:

Image $\rightarrow$ Gaussian Smoothing kernel on X $\rightarrow$ Gaussian Derivative Kernel on Y = Image Derivative along Y for Edge Detection

Image $\rightarrow$ Gaussian Derivative Kernel on X $\rightarrow$ Gaussian Smoothing kernel on Y = Image Derivative along X for Edge Detection

What happens if we do this?

Image $\rightarrow$ Gaussian Derivative Kernel on X $\rightarrow$ Gaussian Derivative Kernel on Y = ???

Does it make sense?

What is the correct way to visualize both derivatives? Is it the magnitude?

$$||\nabla f|| = \sqrt{{\left(\frac{\partial Image}{\partial x}\right)}^2+{\left(\frac{\partial Image}{\partial y}\right)}^2}$$

QUESTION 2

On the other hand, I was looking at the Prewitt and Sobel operators and I realized that both:

  • Do Smoothing on one axis
  • And the Derivative on the other

Is it a better strategy to do smoothing on both axis and then just apply a derivative on the axis of interest? It feels a bit like duplication (like the derivative is also smoothing)

QUESTION 3

What is the practical difference between the 1st and 2nd Derivative for edge detection?

QUESTION 4 Is the "Gaussian 2nd Derivative" what is called "Laplacian of Gaussian"? Any specific reason? I feel like everyone calls it Laplacian for short

Thanks for the help and sorry for the huge amount of questions! :)

$\endgroup$

1 Answer 1

2
$\begingroup$

Question 1: a derivative on both directions would react to more or less diagonal features. Note that there is a quantity of works dedicated to design more specific and accurate oriented features.

To visualize both derivatives, it is better to visualize them... both. You cannot turn a 2-valued information (derivative on $X$ and $Y$) into a 1-valued one without losing some content. You may however convert them for instance into another couple like magnitude and gradient direction.

Question 2: Prewitt and Sobel are operators with very compact support ($3\times 3$). Smoothing also on the axis you want to differentiate may blur some details. But for longer filters, it is not uncommon to combine a derivative and a smoothing, to limit the derivative sensitivity to noise. Indeed, a Gaussian derivative somehow both smooths and differentiate.

Question 3: morally (meaning: in text books and toy images) for a step edge (in 1D), the location of the step is (more or less) that of the maximum of the derivative magnitude, while it's a zero-crossing for the second derivative. A second derivative may be more sensitive to noise than a first one. Both can be combined, and could be somehow complementary

Question 4: the Laplacian is a mathematical differential operator given by the divergence of the gradient. In Cartesian coordinates, it is given by the sum of second partial derivatives of the function with respect to each independent variable. When you smooth/convolve first the image with a Gaussian, before the Laplacian, this is (almost) equivalent to convolving the image with the Laplacian of the Gaussian (the details hide in the spatial discretization of the kernel).

$\endgroup$
2
  • 1
    $\begingroup$ Question 1 through 3 super clear! For Question 4, is the Laplacian Operator and the Laplacian of Gaussian the same? I've seen both terms being used $\endgroup$
    – user61819
    Mar 2, 2022 at 16:58
  • $\begingroup$ No. The true Laplacian operator has no use of a Gaussian smoothing. $\endgroup$ Apr 4, 2022 at 21:42

Your Answer

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