Skip to content

Commit 5a295bb

Browse files
author
Carsten Griwodz
committed
[popsift] vlfeat descriptor area corrected
1 parent 7be0e89 commit 5a295bb

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

src/popsift/s_desc_vlfeat.cu

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,17 @@ void ext_desc_vlfeat_sub( const float ang,
5151
const float2 maxdist = make_float2( -2.0f, -2.0f );
5252

5353
// We rotate the corner of the maximum range by the keypoint orientation.
54-
const float ptx = fabsf( ::fmaf( csbp, maxdist.x, ::fmaf( -ssbp, maxdist.y, x )) );
55-
const float pty = fabsf( ::fmaf( csbp, maxdist.y, ::fmaf( ssbp, maxdist.x, y ) ) );
54+
// const float ptx = csbp * maxdist - ssbp * maxdist;
55+
// const float pty = csbp * maxdist + ssbp * maxdist;
56+
const float ptx = fabsf( ::fmaf( csbp, maxdist.x, -ssbp * maxdist.y ) );
57+
const float pty = fabsf( ::fmaf( csbp, maxdist.y, ssbp * maxdist.x ) );
58+
59+
const float bsz = 2.0f * ( fabsf(csbp) + fabsf(ssbp) );
5660

57-
const float bsz = fabsf(csbp) + fabsf(ssbp);
5861
const int xmin = max(1, (int)floorf(x - ptx - bsz));
5962
const int ymin = max(1, (int)floorf(y - pty - bsz));
6063
const int xmax = min(width - 2, (int)floorf(x + ptx + bsz));
6164
const int ymax = min(height - 2, (int)floorf(y + pty + bsz));
62-
6365
__shared__ float dpt[4][128];
6466
for( int i=threadIdx.x; i<128; i+=blockDim.x )
6567
{

0 commit comments

Comments
 (0)