25 #ifndef __TERRALIB_RP_INTERNAL_TIEPOINTSLOCATORSURFSTRATEGY_H 
   26 #define __TERRALIB_RP_INTERNAL_TIEPOINTSLOCATORSURFSTRATEGY_H 
   30 #include <boost/thread.hpp> 
   39     class TiePointsLocator;
 
  135         bool getMatchedInterestPoints( 
 
  137           const double raster1ToRaster2TransfDMapError,
 
  141         unsigned int getAutoMaxTiePointsNumber() 
const;        
 
  154         static bool createIntegralImage( 
 
  177         bool locateSurfInterestPoints( 
 
  178           const unsigned int maxInterestPoints,
 
  203         static bool generateSurfFeatures( 
 
  228         bool executeMatchingByEuclideanDist( 
 
  234           const double raster1ToRaster2TransfDMapError,
 
  242         static void executeMatchingByEuclideanDistThreadEntry(
 
  258         template< 
typename BufferType >
 
  260           const unsigned int& upperLeftX, 
const unsigned int& upperLeftY, 
 
  261           const unsigned int& lowerRightX, 
const unsigned int& lowerRightY )
 
  263           return buffer[ lowerRightY ][ lowerRightX ]
 
  264             - ( ( upperLeftY ) ? buffer[ upperLeftY - 1 ][ lowerRightX ] : 0 )
 
  265             - ( ( upperLeftX ) ? buffer[ lowerRightY ][ upperLeftX - 1 ] : 0 )
 
  266             + ( ( ( upperLeftX != 0 ) && ( upperLeftY != 0 ) ) ? buffer[ upperLeftY - 1 ][ upperLeftX - 1 ] : 0 );
 
  283           const unsigned int& centerX,  
const unsigned int& centerY, 
 
  284            const unsigned int& lobeWidth,  
const unsigned int& lobeRadius )
 
  289               ( centerX + 1 - lobeWidth ),
 
  290               ( centerY - lobeWidth - lobeRadius ),
 
  291               ( centerX + lobeWidth - 1 ),
 
  292               ( centerY + lobeWidth + lobeRadius ) )
 
  296               ( centerX + 1 - lobeWidth ),
 
  297               ( centerY - lobeRadius ),
 
  298               ( centerX + lobeWidth - 1 ),
 
  299               ( centerY + lobeRadius ) ) );
 
  316           const unsigned int& centerX,  
const unsigned int& centerY, 
 
  317            const unsigned int& lobeWidth,  
const unsigned int& lobeRadius )
 
  322               ( centerX - lobeWidth - lobeRadius ),
 
  323               ( centerY + 1 - lobeWidth ),
 
  324               ( centerX + lobeWidth + lobeRadius ),
 
  325               ( centerY + lobeWidth - 1 ) )
 
  329               ( centerX - lobeRadius ),
 
  330               ( centerY + 1 - lobeWidth ),
 
  331               ( centerX + lobeRadius ),
 
  332               ( centerY + lobeWidth - 1 ) );
 
  347           const unsigned int& centerX,  
const unsigned int& centerY, 
 
  348            const unsigned int& lobeWidth )
 
  354               ( centerX - lobeWidth ),
 
  355               ( centerY - lobeWidth ),
 
  364               ( centerX + lobeWidth ),
 
  365               ( centerY + lobeWidth ) )
 
  371               ( centerY - lobeWidth ),
 
  372               ( centerX + lobeWidth ),
 
  378               ( centerX - lobeWidth ),
 
  381               ( centerY + lobeWidth ) );
 
  395         template< 
typename BufferType >
 
  397           const unsigned int& centerX,  
const unsigned int& centerY, 
 
  398            const unsigned int& radius )
 
  404               ( centerY - radius ),
 
  405               ( centerX + radius ),
 
  406               ( centerY + radius ) )
 
  410               ( centerX - radius ),
 
  411               ( centerY - radius ),
 
  413               ( centerY + radius ) );
 
  427         template< 
typename BufferType >
 
  429           const unsigned int& centerX,  
const unsigned int& centerY, 
 
  430            const unsigned int& radius )
 
  435               ( centerX - radius ),
 
  436               ( centerY - radius ),
 
  437               ( centerX + radius ),
 
  442               ( centerX - radius ),
 
  444               ( centerX + radius ),
 
  445               ( centerY + radius ) );
 
  455           return (
unsigned int)std::pow( 2.0, (
double)(octaveIndex + 1) );
 
  465           return  3 + ( 3 * getSurfOctaveFilterStepSize( octaveIndex ) );
 
  476           const unsigned int& scaleIndex )
 
  478           return  getSurfOctaveBaseFilterSize( octaveIndex ) + 
 
  479             ( 3 * ( getSurfOctaveFilterStepSize( octaveIndex ) * scaleIndex ) );
 
static float getIntegralBoxSum(BufferType &buffer, const unsigned int &upperLeftX, const unsigned int &upperLeftY, const unsigned int &lowerRightX, const unsigned int &lowerRightY)
Return a sum of all pixels inside a box over the given integral image buffer. 
 
static float getSurfDxyDerivative(float **bufferPtr, const unsigned int ¢erX, const unsigned int ¢erY, const unsigned int &lobeWidth)
Return a SURF box filter Dxy derivative centered over the given position from the given integral imag...
 
te::gm::GeometricTransformation const * m_raster1ToRaster2TransfPtr
A pointer to a transformation direct mapping raster 1 indexed coords into raster 2 indexed coords...
 
ExecuteMatchingByEuclideanDistThreadEntryParams()
 
double m_searchOptTreeSearchRadius
Optimization tree search radius (pixels). 
 
unsigned int m_tiePointsSubSectorsSplitFactor
The number of sectors along each direction. 
 
boost::mutex * m_syncMutexPtr
 
FloatsMatrix * m_distMatrixPtr
 
static float getSurfDyyDerivative(float **bufferPtr, const unsigned int ¢erX, const unsigned int ¢erY, const unsigned int &lobeWidth, const unsigned int &lobeRadius)
Return a SURF box filter Dxx derivative centered over the given position from the given integral imag...
 
Tie-Pointsr locator strategy. 
 
unsigned int m_processingBlocksNumber
The raster data will be splitted into this number of blocks for processing. 
 
unsigned int m_octavesNumber
The number of octaves to generate (minimum:1). 
 
std::vector< InterestPointsSetT > * m_interestPointsSubSectorsPtr
A pointer to a valid interest points container (one element by subsector).. 
 
static unsigned int getSurfOctaveBaseFilterSize(const unsigned int &octaveIndex)
Return the surf octave base filter size (width). 
 
boost::mutex * m_rastaDataAccessMutexPtr
A pointer to a valid mutex to controle raster data access. 
 
SurfLocatorThreadParams()
 
~ExecuteMatchingByEuclideanDistThreadEntryParams()
 
static unsigned int getSurfFilterSize(const unsigned int &octaveIndex, const unsigned int &scaleIndex)
Return the surf octave filter size (width). 
 
~SurfLocatorThreadParams()
 
te::rp::TiePointsLocatorInputParameters m_inputParameters
Input parameters. 
 
The parameters passed to the executeMatchingByEuclideanDistThreadEntry method. 
 
FloatsMatrix const * m_featuresSet2Ptr
 
std::multiset< InterestPointT > InterestPointsSetT
 
#define TERPEXPORT
You can use this macro in order to export/import classes and functions from this module. 
 
InterestPointT const * m_interestPointsSet2Ptr
 
FloatsMatrix const * m_integralRasterDataPtr
The integral image raster data. 
 
Tie-points locator SURF strategy. 
 
Tie-points locator strategy. 
 
The parameters passed to the surfLocatorThreadEntry method. 
 
UCharsMatrix const * m_maskRasterDataPtr
The loaded mask raster data pointer (or zero if no mask is avaliable). 
 
InterestPointT const * m_interestPointsSet1Ptr
 
A generic template matrix. 
 
boost::mutex * m_interestPointsAccessMutexPtr
A pointer to a valid mutex to control the output interest points container access. 
 
FloatsMatrix const * m_featuresSet1Ptr
 
unsigned int m_maxInterestPointsBySubSector
The maximum number of interest points by sub-sector. 
 
bool m_isInitialized
true if this instance is initialized. 
 
unsigned int * m_nextRasterLinesBlockToProcessValuePtr
A pointer to a valid counter to control the blocks processing sequence. 
 
unsigned int * m_nextFeatureIdx1ToProcessPtr
 
static float getSurfDxxDerivative(float **bufferPtr, const unsigned int ¢erX, const unsigned int ¢erY, const unsigned int &lobeWidth, const unsigned int &lobeRadius)
Return a SURF box filter Dyy derivative centered over the given position from the given integral imag...
 
static unsigned int getSurfOctaveFilterStepSize(const unsigned int &octaveIndex)
Return the surf octave filter step size (width). 
 
std::multiset< MatchedInterestPointsT > MatchedInterestPointsSetT
 
unsigned int m_scalesNumber
Thread return value pointer. 
 
static float getHaarYVectorIntensity(BufferType &buffer, const unsigned int ¢erX, const unsigned int ¢erY, const unsigned int &radius)
Return a Haar Y intesity vector for the window centered at the given point. 
 
static float getHaarXVectorIntensity(BufferType &buffer, const unsigned int ¢erX, const unsigned int ¢erY, const unsigned int &radius)
Return a Haar X intesity vector for the window centered at the given point.