Definition at line 112 of file PointDescriptorTable.h. References Impala::Core::Table::TableTem< Col1T, Col2T, Col3T, Col4T, Col5T, Col6T, Col7T, Col8T, Col9T >::Add(), ILOG_DEBUG, ILOG_WARN, Impala::Core::Matrix::MatE(), Impala::Core::Matrix::MatNrCol(), Impala::Core::Matrix::MatNrRow(), PointDescriptorTable(), Impala::Core::Feature::ReadBINDESC1FromBuffer(), and ReplaceAllDescriptors(). Referenced by Impala::Core::Feature::InterestPointFeature::FindInterestPoints(), and ImportFromFile(). 00113 { 00114 using namespace Impala::Core::Matrix; 00115 Mat* points = 0; 00116 Mat* descriptors = 0; 00117 00118 String dataType = ReadBINDESC1FromBuffer(points, descriptors, buffer, true, true); 00119 if(dataType.substr(0, 6) != "CIRCLE") 00120 { 00121 ILOG_WARN("Data type of file read is not CIRCLE, but '" << dataType << "'"); 00122 } 00123 ILOG_DEBUG("Loaded file: rows=" << MatNrRow(points) << "; cols=" << MatNrCol(points)); 00124 PointDescriptorTable* res = new PointDescriptorTable(def); 00125 for(int i = 0; i < MatNrRow(points); i++) 00126 { 00127 // shift by 1 for consistency with the public file format (which uses 1..n instead of 0..n-1) 00128 // make coordinates equal to the original image, without the borders removed 00129 res->Add(*MatE(points, i, 0) - 1 - mStripBorder, 00130 *MatE(points, i, 1) - 1 - mStripBorder, 00131 *MatE(points, i, 2), *MatE(points, i, 3), 00132 *MatE(points, i, 4)); 00133 } 00134 // callee takes ownership 00135 res->ReplaceAllDescriptors(descriptors); 00136 delete points; 00137 00138 return res; 00139 }
Here is the call graph for this function:
|