Definition at line 635 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(). 00638 { 00639 using namespace Matrix; 00640 Timer timerProjection; 00641 if(mDescriptorReduce) 00642 { 00643 matrixDescriptors = MatMul(matrixDescriptors, mDescriptorReduce); 00644 } 00645 Mat* matrixCodebook = mCodebook->GetColumn2()->GetStorage(); 00646 ILOG_DEBUG(MatNrRow(matrixDescriptors) << " " << 00647 MatNrCol(matrixDescriptors)); 00648 ILOG_DEBUG(MatNrRow(matrixCodebook) << " " << 00649 MatNrCol(matrixCodebook)); 00650 ILOG_DEBUG("Codebook projection (init) took: " << 00651 timerProjection.SplitTimeStr()); 00652 // result will be a (#descriptors, 2) matrix 00653 Mat* assignment = 00654 Core::Matrix::VectorQuantize(matrixDescriptors, matrixCodebook); 00655 00656 ILOG_DEBUG("Codebook projection (matrix) took: " << 00657 timerProjection.SplitTimeStr()); 00658 for(int vj = 0; vj < MatNrRow(matrixDescriptors); vj++) 00659 { 00660 Real64 bestDistance = *MatE(assignment, vj, 1); 00661 int bestIndex = static_cast<int>(*MatE(assignment, vj, 0)); 00662 AddToPyramids(bestIndex, X[vj], Y[vj], imageWidth, imageHeight, 00663 regionCounts); 00664 //std::cout << "Codebook projection (inner loop) took: " << 00665 //timerProjection.SplitTimeStr() << std::endl; 00666 } 00667 ILOG_DEBUG("Codebook projection (matrix-form) took: " << 00668 timerProjection.SplitTimeStr()); 00669 delete assignment; 00670 if(mDescriptorReduce) 00671 { 00672 delete matrixDescriptors; 00673 } 00674 }
Here is the call graph for this function:
|