1

I am reading a paper on SIFT by Lowe.

In it, gradient magnitudes and orientations are calculated using these formulae:

enter image description here $$$$ I don't know why m(x,y) is calculated above. I heard that gradient magnitude is usually calculated like the following.

$$\sqrt{f_x ^2 + f_y^2} $$

jakeoung
  • 457
  • 1
  • 6
  • 17

1 Answers1

2

Horizontal and vertical gradients are computed by taking neighbor pixel differences:

$$g_{x}=L(x+1,y)-L(x-1,y)\\g_{y}=L(x,y+1)-L(x,y-1)$$

Gradient magnitude is computed the same way as in your formula:

$$m(x,y)=\sqrt{g_x^2+g_y^{2}}$$

Replacing $g_{x}$ and $g_{y}$ with above will give you the original formula.

Gradients are usually computed by forward or central difference formula, but I think in this case the above is still accurate enough since the image $L$ is smoothed.

Libor
  • 4,255
  • 24
  • 38