Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

SIFT is derivative of DoG needed for Hessian or just DoG?

  1. Jun 26, 2017 #1
    Wikipedia defines hessian of Difference of Gaussians as


    and earlier in the page uses D for difference of gaussians,
    So do i just need D(x,y) or do i need d/dx D(x,y) for the elements? If so how does one go about differentiating DoG?

    Any help appreciated
  2. jcsd
  3. Jun 26, 2017 #2


    User Avatar
    Science Advisor

    The Hessian is the matrix of second partial derivatives, so yes, you should read it as $$\left (\begin {array}{cc}
    \frac {\partial^2D}{\partial x^2}&\frac {\partial^2D}{\partial x\partial y}\\
    \frac {\partial^2D}{\partial y\partial x}&\frac {\partial^2D}{\partial y^2}
    \end {array}\right) $$How do you usually go about doing a partial differential?
  4. Jun 26, 2017 #3
    Using variants of central difference methods. In the past i have approximated hessian by taking discrete derivatives twice, but that was very inaccurate. Now I am using difference of Gaussian for first derivative, but seek an efficient/best way to compute Dxx, Dxy etc given that we know first derivative was obtained via DoG, for two reasons.

    A) I have a very slow computer, generating the scale space and taking DoG takes above 20 seconds for one 200x200 image (I have no gpu)
    B) I need very high accuracy for this project (in terms of keypoint detection/matching), false positives and too few true positives can cause exponentially noticeable flaws.
    Accuracy matters more than speed, but if a tiny increase in accuracy requires a large decrease in speed it's not worth the tradeoff.
  5. Jun 26, 2017 #4


    User Avatar
    Science Advisor

    So do the partial differentiation with a pencil and paper or Wolfram Alpha. Are you going to want to Fourier transform this at some point? If so you might also want to do the FT by hand.
  6. Jun 26, 2017 #5
    what is the most accurate way in your experiance to get Dxx and Dxy, Is Central Diff applied to DoG really accurate enough for low resolution, noisy images?
    Last edited: Jun 26, 2017
  7. Jun 26, 2017 #6


    User Avatar
    Science Advisor

    Do it with pen and paper. You can directly populate an array with the answer to whatever precision you need.

    You presumably want to convolve this with an image. And you're presumably doing that by DFTing the image, multiplying by the FT of the derivatives of the difference of Gaussian and then inverse DFTing. So you can save a lot of computation by writing down the Fourier transform of the difference of Gaussian functions and calculating that directly.

    Do you know what the partial derivatives of the Gaussian function are? Can you Fourier transform them?
  8. Jun 26, 2017 #7
    Yea, thanks for the help :D
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted