Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion FriedLiver/Source/Bundler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ void Bundler::initSift(unsigned int widthSift, unsigned int heightSift, bool isL
{
if (isLocal) {
m_sift = new SiftGPU;
m_sift->SetParams(widthSift, heightSift, false, 150, GlobalAppState::get().s_sensorDepthMin, GlobalAppState::get().s_sensorDepthMax);
m_sift->SetParams(widthSift, heightSift, false, GlobalBundlingState::get().s_maxNumKeysPerImage, GlobalAppState::get().s_sensorDepthMin, GlobalAppState::get().s_sensorDepthMax);
m_sift->InitSiftGPU();
}
else {
Expand Down
11 changes: 10 additions & 1 deletion FriedLiver/Source/SiftGPU/SiftPyramid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,12 +245,21 @@ void SiftPyramid::LimitFeatureCount(int have_keylist)
else
{
int i = 0, num_to_erase = 0;
//remove remaining levels before the number of features drops below the threshold.
while (_featureNum - _levelFeatureNum[i] > _FeatureCountThreshold)
{
num_to_erase += _levelFeatureNum[i];
_featureNum -= _levelFeatureNum[i];
_levelFeatureNum[i++] = 0;
}
//clamp number of features in the last contributing level.
if (_featureNum > _FeatureCountThreshold)
{
int num_to_erase_last = _featureNum - _FeatureCountThreshold;
num_to_erase += num_to_erase_last;
_featureNum -= num_to_erase_last;
_levelFeatureNum[i] -= num_to_erase_last;
}
}
}

Expand Down Expand Up @@ -745,7 +754,7 @@ void SiftPyramid::CreateGlobalKeyPointList(float4* d_keypoints, const float* d_d

//if needed, eliminate lower level keypoints first
std::vector<int> numKeysPerLevel(n, 0); int cur = 0;
const bool bHasMax = maxNumKeyPoints == (unsigned int)-1;
const bool bHasMax = maxNumKeyPoints != (unsigned int)-1;
for (int i = n - 1; i >= 0; i--) {
if (!bHasMax) numKeysPerLevel[i] = _levelFeatureNum[i];
else {
Expand Down
2 changes: 1 addition & 1 deletion FriedLiver/zParametersBundlingDefault.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ s_denseOverlapCheckSubsampleFactor = 4;

s_maxNumImages = 1200;
s_submapSize = 10;
s_maxNumKeysPerImage = 1024;
s_maxNumKeysPerImage = 150;

s_useLocalDense = true;
s_numOptPerResidualRemoval = 1;
Expand Down