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

void Impala::Core::Feature::InterestPointFeature::ComputeDescriptors ( PointDescriptorTable pointData,
Array::Array2dVec3UInt8 inputNoBorder,
String  descriptorMode 
) [inline, private]

Definition at line 1364 of file InterestPointFeature.h.

References Impala::Core::Feature::CalculateFISTDescriptors(), Impala::Core::Feature::CalculateRegionDescriptors(), Impala::Core::Feature::CalculateSurfDescriptors(), Impala::Core::Feature::PointDescriptorTable::GetDescriptorData(), Impala::Core::Feature::PointDescriptorTable::GetDescriptorLength(), Impala::Core::Feature::PointDescriptorTable::GetDescriptorMatrix(), Impala::Core::Matrix::MatConcatenateHorizontal(), Impala::Core::Matrix::MatE(), Impala::Core::Matrix::MatNrCol(), mSurfParams, Impala::Core::Feature::PointDescriptorTable::ReplaceAllDescriptors(), and Impala::Core::Table::Table::Size().

Referenced by FindInterestPoints().

01367     {
01368         if((descriptorMode == "huesift") || (descriptorMode == "huefist"))
01369         {
01370             using namespace Core::Matrix;
01371             CalculateRegionDescriptors(inputNoBorder, pointData,
01372                                        "huehistogram");
01373 
01374             // now fix the range of hue...
01375             Mat* part1 = MatCreate<Mat>(pointData->Size(), pointData->GetDescriptorLength());
01376             for(int i = 0; i < pointData->Size(); i++)
01377             {
01378                 Real64* ptr = pointData->GetDescriptorData(i);
01379                 for(int j = 0; j < MatNrCol(part1); j++)
01380                 {
01381                     *MatE(part1, i, j) = static_cast<int>(ptr[j] * 512);
01382                 }
01383             }
01384             
01385             CalculateFISTDescriptors(inputNoBorder, pointData, "sift");
01386             Mat* part0 = pointData->GetDescriptorMatrix();
01387             std::vector<Mat*> matrices;
01388             matrices.push_back(part0);
01389             matrices.push_back(part1);
01390             Matrix::Mat* descriptors =
01391                 Matrix::MatConcatenateHorizontal(matrices);
01392         
01393             // takes ownership of memory
01394             pointData->ReplaceAllDescriptors(descriptors);
01395             
01396             delete part1;
01397        }
01398         else if((descriptorMode.size() >= 4) &&
01399                 (descriptorMode.substr(descriptorMode.size()-4,4) == "fist"))
01400         {
01401             CalculateFISTDescriptors
01402                 (inputNoBorder, pointData, descriptorMode);
01403         }
01404         else if((descriptorMode.size() >= 4) &&
01405                 (descriptorMode.substr(descriptorMode.size()-4,4) == "sift"))
01406         {
01407             CalculateFISTDescriptors
01408                 (inputNoBorder, pointData, descriptorMode);
01409         }
01410         else if((descriptorMode.size() >= 4) &&
01411                 (descriptorMode.substr(descriptorMode.size()-4,4) == "surf"))
01412         {
01413             CalculateSurfDescriptors
01414                 (inputNoBorder, pointData, descriptorMode, mSurfParams[0],
01415                  mSurfParams[1], mSurfParams[2]);
01416         }
01417         else if(descriptorMode == "none")
01418         {
01419             // do nothing, assume the user knows what he is doing
01420         }
01421         else
01422         {
01423             CalculateRegionDescriptors
01424                 (inputNoBorder, pointData, descriptorMode);
01425         }
01426     }

Here is the call graph for this function:


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