4
$\begingroup$

I have this confusion related to Laplacian filter. It states that it uses second derivative and finds the point of zero crossing(where the second derivative is zero) for which the first derivative has the high peak. I have seen them using kernels like

0 1 0
1 -4 1
0 1  0

I am not sure how this kernel finds the point of zero crossing. I mean definitely this kernel is equivalent to the second derivative.

Suppose I have points something like this

0 255 255
0 255 255
0 255 255

Definitely, it has an edge at the middle. But if I convolve the kernel with this image for example. I won't get zero result. So how come its called zero crossing

$\endgroup$

migrated from stackoverflow.com Sep 17 '12 at 15:04

This question came from our site for professional and enthusiast programmers.

6
$\begingroup$

The Laplace filter is the sum of the differences of neighbourhood pixels compared to the central pixel. Its output will be zero in regions where the intensity is constant, and non-zero when there is a transition in intensity (i.e. an edge).

For simplicity's sake, consider what happens in one axis only, where the filter kernel would be [1 -2 1]. If we have a sequence of values with a step transition then the input and output will look like this:

input:  10   10   10   10   10  100  100  100  100  100

output:       0    0    0   90  -90    0    0    0
$\endgroup$
  • 2
    $\begingroup$ And it's called Zero Crossing because the edge is at the point where the values cross from positive to negative or vice versa. $\endgroup$ – Mark Ransom Sep 17 '12 at 14:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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