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

void Impala::Core::Feature::CalculateSurfDescriptors ( Array::Array2dVec3UInt8 *  inputNoBorder,
PointDescriptorTable *  pointData,
String  descriptor,
int  haarSize,
int  components,
int  spatiality 
)

this code is analogous to CalculateFIST2Descriptors

Definition at line 19 of file Surf.h.

References DSurf(), GetColorChannels(), Impala::Core::Matrix::MatConcatenateHorizontal(), Impala::Core::Feature::PointDescriptorTable::ReplaceAllDescriptors(), and Impala::StringReplace().

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

00023 {
00024     using namespace Matrix;
00025 
00026     descriptor = StringReplace(descriptor, "surf", "");
00027     std::vector<Array::Array2dScalarReal64*> channels =
00028         GetColorChannels(inputNoBorder, descriptor);
00029 
00030     std::vector<Matrix::Mat*> channelDescriptors;
00031     for(int i=0 ; i<channels.size() ; ++i)
00032     {
00033         Mat* descriptors = DSurf(channels[i], pointData, haarSize, 
00034                                  components, spatiality);
00035         channelDescriptors.push_back(descriptors);
00036         delete channels[i];
00037     }
00038 
00039     if(channelDescriptors.size() == 1)
00040     {
00041         // takes ownership of memory
00042         pointData->ReplaceAllDescriptors(channelDescriptors[0]);
00043     }
00044     else
00045     {
00046         // now turn them all into a big descriptor
00047         Matrix::Mat* descriptors =
00048             Matrix::MatConcatenateHorizontal(channelDescriptors);
00049         
00050         // takes ownership of memory
00051         pointData->ReplaceAllDescriptors(descriptors);
00052 
00053         for(int i=0 ; i<channelDescriptors.size() ; i++)
00054             delete channelDescriptors[i];
00055     }
00056 }

Here is the call graph for this function:


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