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

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

Definition at line 929 of file InterestPointFeature.h.

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

Referenced by FindInterestPoints().

00930     {
00931         std::vector<int> indices;
00932         bool* keepers = new bool[pointData->Size()];
00933         for(int j = 0; j < pointData->Size(); j++)
00934         {
00935             indices.push_back(j);
00936             keepers[j] = false;
00937         }
00938         // do not know how to initialize this random number generator
00939         //std::random_shuffle(indices.begin(), indices.end());
00940         Util::RandomGenerator::GetInstance().PermutateVector(indices);
00941         
00942         for(int j = 0; j < keepCount; j++)
00943         {
00944             keepers[indices[j]] = true;
00945         }
00946         
00947         PointDescriptorTable* output = new PointDescriptorTable(pointData->GetFeatureDefinition());
00948         output->SetDescriptorLength(pointData->GetDescriptorLength());
00949         Select(output, pointData, keepers, false);
00950         delete pointData;
00951         return output;
00952     }

Here is the call graph for this function:


Generated on Fri Mar 19 11:10:01 2010 for ImpalaSrc by  doxygen 1.5.1