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

template<class SrcArrayT>
PointDescriptorTable* Impala::Core::Feature::HarrisLaplaceDetector::HLDetector ( SrcArrayT *  input,
Real64  harrisThreshold,
Real64  harrisK,
Real64  laplaceThreshold 
) [inline]

Definition at line 450 of file HarrisLaplaceDetector.h.

References Impala::Core::Array::Array2dTem< StorT, elemSize, ArithT >::CH(), Impala::Core::Array::Array2dTem< StorT, elemSize, ArithT >::CW(), harrisCornerDetector(), ILOG_DEBUG, ILOG_INFO, laplacianScaleSelection(), Impala::Core::Array::MulVal(), Impala::Core::Array::RGB2Gray(), Impala::Core::Table::Table::Size(), Impala::Core::Table::SortOnColumn5(), and Impala::Timer::SplitTimeStr().

Referenced by Impala::Core::Feature::InterestPointFeature::ApplyDetector().

00451     {
00452         Timer timer;
00453         PointDescriptorTable* output = new PointDescriptorTable();
00454     
00455         // convert to grey-scale
00456         Array2dScalarReal64* imIntensity = 0;
00457         RGB2Gray(imIntensity, input);
00458       
00459         // scale intensity to the range 0..1 instead of 0..255 so it is comparable to Matlab
00460         MulVal(imIntensity, imIntensity, 1 / 255.0);
00461         
00462         // Harris corner detection
00463         MyPointList centroids;
00464         Real64 sigmaZero = 0.75;
00465         Real64 borderIgnoreSize = 4.0;
00466         for(int sigmaCounter = 1; sigmaCounter <= 8; sigmaCounter++) 
00467         {
00468             Real64 sigmaN = pow(sqrt(Real64(2)), sigmaCounter) * sigmaZero;   
00469             MyPointList pointList;
00470             harrisCornerDetector(pointList, imIntensity, sigmaN, harrisK, harrisThreshold);
00471             for(MyPointList::iterator iter = pointList.begin(); iter != pointList.end(); iter++)
00472             {
00473                 MyPoint* point(*iter);
00474                 
00475                 point->mDetectionScale = sigmaN;
00476                 //ILOG_DEBUG("   " << point->mX << " " << point->mY << " " << point->mCornerness << " " << point->mDetectionScale);
00477                 if((point->mX < borderIgnoreSize) ||
00478                    (point->mY < borderIgnoreSize) ||
00479                    (point->mX >= imIntensity->CW() - borderIgnoreSize) ||
00480                    (point->mY >= imIntensity->CH() - borderIgnoreSize)) 
00481                 {
00482                     //ILOG_DEBUG("   " << point->mX << " " << point->mY << " BORDER CLOSENESS REJECT");
00483                     continue;
00484                 }
00485                 centroids.push_back(point);
00486             }
00487             ILOG_DEBUG(sigmaN << " " << pointList.size());
00488         }
00489         int info_harrisCount = centroids.size();
00490         String info_harrisTiming = timer.SplitTimeStr();
00491         
00492         // Laplacian scale selection
00493         laplacianScaleSelection(output, imIntensity, centroids, laplaceThreshold);
00494     
00495         delete imIntensity;
00496     
00497         ILOG_INFO("Harris found " << info_harrisCount << " (" << info_harrisTiming << "); Laplacian left " << output->Size() << " (" << timer.SplitTimeStr() << ")");
00498         
00499         // now sort the points by cornerness
00500         SortOnColumn5(output, false);
00501         return output;
00502     }

Here is the call graph for this function:


Generated on Fri Mar 19 11:09:47 2010 for ImpalaSrc by  doxygen 1.5.1