I am very new to the concept of computer vision (and image processing), and trying to understand the algorithm used for edge detection. One thing I'm currently struggling to figure out is the Laplacian of Gaussian

enter image description here

In this case, how to you determine the value of x and y? I thought the centre of the kernel was the origin $((x,y) = (0,0))$, but it doesn't seems like the right number.

Also, if there are any resources that you would recommend to go through, I would really appreciate them.


1 Answer 1


You are right about the $x$ and $y$ values. The center of the matrix is $(0,0)$ and the corner points are $(\pm 4,\pm 4)$. But they obviously wanted integer values in the matrix, so they simply scaled the LoG function by a factor of $482.75$ (just to get a decent range). Evaluating the function with this scale factor gives you (for the lower right quarter of the total matrix):

LoG =

  -40.000000  -23.086993    0.294243    5.218347    2.080704
  -23.086993  -11.762411    3.077873    4.839310    1.745668
    0.294243    3.077873    5.409023    3.361998    0.998325
    5.218347    4.839310    3.361998    1.456020    0.365518
    2.080704    1.745668    0.998325    0.365518    0.081641

Rounding should give you the final result. However, if you look closely, you'll see that it doesn't (at least not for all $(x,y)$ values). If you check the matrix on this page, you'll see that for the same $\sigma$ it is also different. So people make mistakes and they just copy from each other.


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.