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} $$

  • $\begingroup$ what is f_x and f_y in your case? they are gradients, right? try to compare it with terms in SIFT. $\endgroup$ – Abid Rahman K Jul 13 '13 at 6:41

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


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


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.

| improve this answer | |
  • $\begingroup$ I still have a little doubt, but thank you very much :) $\endgroup$ – jakeoung Jul 15 '13 at 5:31
  • $\begingroup$ Okay. You can consult the Image gradient wiki article. There is some brief explanation and similar formulas (same meaning). $\endgroup$ – Libor Jul 15 '13 at 5:36

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.