Skip to content

Commit 3028f17

Browse files
author
Carsten Griwodz
committed
[sift] Remove the narrow Gaussian filter option "opencv"
OpenCV used quite narrow Gaussian filters when PopSift was first written. This computation was adopted for compatibility reasons. The other modes are more accurate.
1 parent cf4f4d2 commit 3028f17

File tree

4 files changed

+0
-18
lines changed

4 files changed

+0
-18
lines changed

src/popsift/gauss_filter.cu

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,6 @@ int GaussInfo::getSpan( float sigma ) const
273273
return GaussInfo::vlFeatSpan( sigma );
274274
case Config::VLFeat_Relative :
275275
return GaussInfo::vlFeatRelativeSpan( sigma );
276-
case Config::OpenCV_Compute :
277-
return GaussInfo::openCVSpan( sigma );
278276
case Config::Fixed9 :
279277
return 5;
280278
case Config::Fixed15 :
@@ -306,15 +304,6 @@ int GaussInfo::vlFeatRelativeSpan( float sigma )
306304
return spn;
307305
}
308306

309-
__host__
310-
int GaussInfo::openCVSpan( float sigma )
311-
{
312-
int span = int( roundf( 2.0f * 4.0f * sigma + 1.0f ) ) | 1;
313-
span >>= 1;
314-
span += 1;
315-
return std::min<int>( span, GAUSS_ALIGN - 1 );
316-
}
317-
318307
template<int LEVELS>
319308
__host__
320309
void GaussTable<LEVELS>::clearTables( )

src/popsift/gauss_filter.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,6 @@ struct GaussInfo
100100

101101
__host__
102102
static int vlFeatRelativeSpan( float sigma );
103-
104-
__host__
105-
static int openCVSpan( float sigma );
106103
};
107104

108105
extern __device__ __constant__ GaussInfo d_gauss;

src/popsift/sift_conf.cu

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,6 @@ void Config::setGaussMode( const std::string& m )
111111
setGaussMode( Config::VLFeat_Relative );
112112
else if( m == "vlfeat-direct" )
113113
setGaussMode( Config::VLFeat_Relative_All );
114-
else if( m == "opencv" )
115-
setGaussMode( Config::OpenCV_Compute );
116114
else if( m == "fixed9" )
117115
setGaussMode( Config::Fixed9 );
118116
else if( m == "fixed15" )
@@ -134,7 +132,6 @@ const char* Config::getGaussModeUsage( )
134132
"vlfeat (default), "
135133
"vlfeat-hw-interpolated, "
136134
"vlfeat-direct, "
137-
"opencv, "
138135
"fixed9, "
139136
"fixed15, "
140137
"relative (synonym for vlfeat-hw-interpolated)";

src/popsift/sift_conf.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ struct Config
4040
VLFeat_Compute,
4141
VLFeat_Relative,
4242
VLFeat_Relative_All,
43-
OpenCV_Compute,
4443
Fixed9,
4544
Fixed15
4645
};

0 commit comments

Comments
 (0)