mirror of
https://github.com/opencv/opencv.git
synced 2025-06-11 20:09:23 +08:00
[move sift.cpp] Updated internal calls to linear resize to use bit-exact version
original commit: 8c394a4f2e
This commit is contained in:
parent
69d43e2997
commit
c5f06814bc
@ -162,7 +162,8 @@ static const float SIFT_DESCR_MAG_THR = 0.2f;
|
||||
// factor used to convert floating-point descriptor to unsigned char
|
||||
static const float SIFT_INT_DESCR_FCTR = 512.f;
|
||||
|
||||
#if 0
|
||||
#define DoG_TYPE_SHORT 0
|
||||
#if DoG_TYPE_SHORT
|
||||
// intermediate type used for DoG pyramids
|
||||
typedef short sift_wt;
|
||||
static const int SIFT_FIXPT_SCALE = 48;
|
||||
@ -198,7 +199,11 @@ static Mat createInitialImage( const Mat& img, bool doubleImageSize, float sigma
|
||||
{
|
||||
sig_diff = sqrtf( std::max(sigma * sigma - SIFT_INIT_SIGMA * SIFT_INIT_SIGMA * 4, 0.01f) );
|
||||
Mat dbl;
|
||||
#if DoG_TYPE_SHORT
|
||||
resize(gray_fpt, dbl, Size(gray_fpt.cols*2, gray_fpt.rows*2), 0, 0, INTER_LINEAR_EXACT);
|
||||
#else
|
||||
resize(gray_fpt, dbl, Size(gray_fpt.cols*2, gray_fpt.rows*2), 0, 0, INTER_LINEAR);
|
||||
#endif
|
||||
GaussianBlur(dbl, dbl, Size(), sig_diff, sig_diff);
|
||||
return dbl;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user