Home || Visual Search || Applications || Architecture || Important Messages || OGL || Src

PointDescriptorTable* Impala::Core::Feature::InterestPointFeature::ReducePointCount ( PointDescriptorTable pointData,
int  keepCount 
) [inline, private]

Definition at line 1224 of file InterestPointFeature.h.

References Impala::Core::Feature::PointDescriptorTable::GetDescriptorLength(), Impala::Core::Feature::PointDescriptorTable::GetFeatureDefinition(), mRNG, Impala::Core::Table::Select(), Impala::Core::Feature::PointDescriptorTable::SetDescriptorLength(), and Impala::Core::Table::Table::Size().

Referenced by FindInterestPoints().

01225     {
01226         std::vector<int> indices;
01227         bool* keepers = new bool[pointData->Size()];
01228         for(int j = 0; j < pointData->Size(); j++)
01229         {
01230             indices.push_back(j);
01231             keepers[j] = false;
01232         }
01233         std::random_shuffle(indices.begin(), indices.end(), mRNG);
01234         
01235         for(int j = 0; j < keepCount; j++)
01236         {
01237             keepers[indices[j]] = true;
01238         }
01239         
01240         PointDescriptorTable* output = new PointDescriptorTable(pointData->GetFeatureDefinition());
01241         output->SetDescriptorLength(pointData->GetDescriptorLength());
01242         Select(output, pointData, keepers, false);
01243         delete pointData;
01244         return output;
01245     }

Here is the call graph for this function:


Generated on Thu Jan 13 09:19:23 2011 for ImpalaSrc by  doxygen 1.5.1