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

void Impala::Core::Feature::PointDescriptorTable::FromPointList ( Core::Geometry::InterestPointList pl  )  [inline]

Definition at line 176 of file PointDescriptorTable.h.

References Impala::Core::Table::TableTem< Col1T, Col2T, Col3T, Col4T, Col5T, Col6T, Col7T, Col8T, Col9T >::Add(), Impala::Core::Array::Array2dTem< StorT, elemSize, ArithT >::CPB(), Impala::Core::Geometry::Rectangle::Height(), ILOG_DEBUG, ILOG_ERROR, Impala::Core::Geometry::InterestCircle::mCornerness, Impala::Core::Geometry::InterestCircle::mOrientation, Impala::Core::Geometry::InterestCircle::mScale, ReplaceAllDescriptors(), Impala::Core::Table::TableTem< Col1T, Col2T, Col3T, Col4T, Col5T, Col6T, Col7T, Col8T, Col9T >::Reserve(), and Impala::Core::Geometry::Rectangle::Width().

Referenced by Impala::Core::Feature::InterestPointFeature::ComputeDescriptors(), and ImportFromFile().

00177     {
00178         if(pl.size() == 0) return;
00179         Reserve(pl.size(), false);
00180         int descriptorLength = (*pl.begin())->mDescriptor.size();
00181         Array::Array2dScalarReal64* descriptors = 0;
00182         if(descriptorLength > 0)
00183             descriptors = new Array::Array2dScalarReal64(descriptorLength, 
00184                                                          pl.size(), 0, 0);
00185 
00186         ILOG_DEBUG("extracting descriptor data");
00187         int idx = 0;
00188         for(Core::Geometry::InterestPointList::iterator it = pl.begin(); 
00189             it != pl.end(); it++)
00190         {
00191             Core::Geometry::InterestPoint* point = *it;
00192             std::string type  = point->geometryType();
00193             if(type != "CircleZ" && type != "RectangleZ" )
00194             {
00195                 ILOG_ERROR("Geometry type mismatch: " << point->geometryType());
00196                 return;
00197             }
00198             
00199             if(type == "CircleZ")
00200             {
00201                 Core::Geometry::InterestCircle* circle = 
00202                     dynamic_cast<Core::Geometry::InterestCircle*>(point);
00203                 Add(point->mX, point->mY, circle->mScale, circle->mOrientation, 
00204                     circle->mCornerness);
00205             }
00206             else if(type == "RectangleZ")
00207             {
00208                 Core::Geometry::InterestRectangleZ* rect = 
00209                     dynamic_cast<Core::Geometry::InterestRectangleZ*>(point);
00210                 Add(point->mX, point->mY, rect->Width(), rect->Height(), 0);
00211             }
00212             
00213             if(descriptorLength > 0)
00214             {
00215                 Vector::VectorTem<Real64> descriptor =
00216                     Vector::VectorTem<Real64>(point->mDescriptor.size());
00217                 Real64* ptr = descriptors->CPB(0, idx);
00218                 for(int j = 0; j < point->mDescriptor.size(); j++)
00219                 {
00220                     *ptr++ = point->mDescriptor[j];
00221                 }
00222             }
00223             idx++;
00224         }
00225         if(descriptorLength > 0)
00226             ReplaceAllDescriptors(descriptors);
00227     }

Here is the call graph for this function:


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