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

void Impala::Core::Feature::InterestPointFeature::ProjectHardMatrix ( CodebookVectors codebookVectors,
Mat matrixDescriptors,
int  imageWidth,
int  imageHeight,
std::vector< int > &  X,
std::vector< int > &  Y,
std::vector< Real64 > &  regionCounts 
) [inline, private]

Definition at line 907 of file InterestPointFeature.h.

References AddToPyramids(), Impala::Core::Table::TableTem< Col1T, Col2T, Col3T, Col4T, Col5T, Col6T, Col7T, Col8T, Col9T >::GetColumn2(), ILOG_DEBUG, Impala::Core::Matrix::MatE(), Impala::Core::Matrix::MatMul(), Impala::Core::Matrix::MatNrCol(), Impala::Core::Matrix::MatNrRow(), mCodebook, mDescriptorReduce, Impala::Timer::SplitTimeStr(), and Impala::Core::Matrix::VectorQuantize().

Referenced by ProjectOntoCodebook().

00910     {
00911         using namespace Matrix;
00912         Timer timerProjection;
00913         if(mDescriptorReduce)
00914         {
00915             matrixDescriptors = MatMul(matrixDescriptors, mDescriptorReduce);
00916         }
00917         Mat* matrixCodebook = mCodebook->GetColumn2()->GetStorage();
00918         ILOG_DEBUG(MatNrRow(matrixDescriptors) << " " <<
00919                    MatNrCol(matrixDescriptors));
00920         ILOG_DEBUG(MatNrRow(matrixCodebook) << " " <<
00921                    MatNrCol(matrixCodebook));
00922         ILOG_DEBUG("Codebook projection (init) took: " <<
00923                    timerProjection.SplitTimeStr());
00924         // result will be a (#descriptors, 2) matrix
00925         Mat* assignment =
00926             Core::Matrix::VectorQuantize(matrixDescriptors, matrixCodebook);
00927             
00928         ILOG_DEBUG("Codebook projection (matrix) took: " <<
00929                    timerProjection.SplitTimeStr());
00930         for(int vj = 0; vj < MatNrRow(matrixDescriptors); vj++)
00931         {
00932             Real64 bestDistance = *MatE(assignment, vj, 1);
00933             int    bestIndex = static_cast<int>(*MatE(assignment, vj, 0));
00934             AddToPyramids(codebookVectors, bestIndex, X[vj], Y[vj], imageWidth,
00935                           imageHeight, regionCounts);
00936             //std::cout << "Codebook projection (inner loop) took: " <<
00937             //timerProjection.SplitTimeStr() << std::endl;
00938         }
00939         ILOG_DEBUG("Codebook projection (matrix-form) took: " <<
00940                    timerProjection.SplitTimeStr());
00941         delete assignment;
00942         if(mDescriptorReduce)
00943         {
00944             delete matrixDescriptors;
00945         }
00946     }

Here is the call graph for this function:


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