victorcapelini / jopensurf

Automatically exported from code.google.com/p/jopensurf
Other
0 stars 0 forks source link

Small discrepency in the Hessian computation #9

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Looking at the following extract from ResponseLayer, the Dxx and Dyy are not 
correctly computed

   int b = (mFilter - 1) / 2 + 1;
   int l = mFilter / 3;
   int w = mFilter;

...

   Dxx = ImageTransformUtils.BoxIntegral(img, r - l + 1, c - b, 2*l - 1, w)
       - ImageTransformUtils.BoxIntegral(img, r - l + 1, c - l / 2, 2*l - 1, l)*3;

Consider the 9x9 filter. This filter for XX is (with '.'=0, '+'=1 and '-'=-2)

  . . . . . . . . .
  . . . . . . . . .
  + + + - - - + + +
  + + + - - - + + +
  + + + - - - + + +
  + + + - - - + + +
  + + + - - - + + +
  . . . . . . . . .
  . . . . . . . . .

We have then:
   b = 5
   l = 3
   w = 9
The corner of the first BoxIntegral is computed as {row=r - 2, col=c - 5} but 
the correct value is {row=r - 2, col=c - 4}. The problem is related to b that 
has un incorrect value!

Same thing for Dyy.

I think that the following will solve this:

   int b = (mFilter - 1) / 2;

My 2 cents.

PS: By the way, the sign of Dxy is reversed. But this has no impact ;^-)

Original issue reported on code.google.com by yves.cui...@gmail.com on 4 May 2011 at 6:58

GoogleCodeExporter commented 9 years ago
I integrated this fix today and rebuilt the jar file. Sorry it took me so long 
to do this, the project was kind of orphaned for a bit =/

https://code.google.com/p/jopensurf/source/detail?r=176471cfff138b2814e2280c9b43
601205648930

Original comment by andrew.s...@gmail.com on 17 Feb 2014 at 8:40