25 #ifndef __TERRALIB_RP_INTERNAL_TIEPOINTSLOCATORSURFSTRATEGY_H    26 #define __TERRALIB_RP_INTERNAL_TIEPOINTSLOCATORSURFSTRATEGY_H    32 #include <boost/thread.hpp>    77             AbstractParameters* clone() const;
    83         void getSubSampledSpecStrategyParams( 
    84           const 
double subSampleOptimizationRescaleFactor,
    89         void getDefaultSpecStrategyParams( 
   174         bool getMatchedInterestPoints( 
   176           const double raster1ToRaster2TransfDMapError,
   180         unsigned int getAutoMaxTiePointsNumber() 
const;        
   193         static bool createIntegralImage( 
   216         bool locateSurfInterestPoints( 
   217           const unsigned int maxInterestPoints,
   242         static bool generateSurfFeatures( 
   267         bool executeMatchingByEuclideanDist( 
   273           const double raster1ToRaster2TransfDMapError,
   281         static void executeMatchingByEuclideanDistThreadEntry(
   297         template< 
typename BufferType >
   299           const unsigned int& upperLeftX, 
const unsigned int& upperLeftY, 
   300           const unsigned int& lowerRightX, 
const unsigned int& lowerRightY )
   302           return buffer[ lowerRightY ][ lowerRightX ]
   303             - ( ( upperLeftY ) ? buffer[ upperLeftY - 1 ][ lowerRightX ] : 0 )
   304             - ( ( upperLeftX ) ? buffer[ lowerRightY ][ upperLeftX - 1 ] : 0 )
   305             + ( ( ( upperLeftX != 0 ) && ( upperLeftY != 0 ) ) ? buffer[ upperLeftY - 1 ][ upperLeftX - 1 ] : 0 );
   322           const unsigned int& centerX,  
const unsigned int& centerY, 
   323            const unsigned int& lobeWidth,  
const unsigned int& lobeRadius )
   328               ( centerX + 1 - lobeWidth ),
   329               ( centerY - lobeWidth - lobeRadius ),
   330               ( centerX + lobeWidth - 1 ),
   331               ( centerY + lobeWidth + lobeRadius ) )
   335               ( centerX + 1 - lobeWidth ),
   336               ( centerY - lobeRadius ),
   337               ( centerX + lobeWidth - 1 ),
   338               ( centerY + lobeRadius ) ) );
   355           const unsigned int& centerX,  
const unsigned int& centerY, 
   356            const unsigned int& lobeWidth,  
const unsigned int& lobeRadius )
   361               ( centerX - lobeWidth - lobeRadius ),
   362               ( centerY + 1 - lobeWidth ),
   363               ( centerX + lobeWidth + lobeRadius ),
   364               ( centerY + lobeWidth - 1 ) )
   368               ( centerX - lobeRadius ),
   369               ( centerY + 1 - lobeWidth ),
   370               ( centerX + lobeRadius ),
   371               ( centerY + lobeWidth - 1 ) );
   386           const unsigned int& centerX,  
const unsigned int& centerY, 
   387            const unsigned int& lobeWidth )
   393               ( centerX - lobeWidth ),
   394               ( centerY - lobeWidth ),
   403               ( centerX + lobeWidth ),
   404               ( centerY + lobeWidth ) )
   410               ( centerY - lobeWidth ),
   411               ( centerX + lobeWidth ),
   417               ( centerX - lobeWidth ),
   420               ( centerY + lobeWidth ) );
   434         template< 
typename BufferType >
   436           const unsigned int& centerX,  
const unsigned int& centerY, 
   437            const unsigned int& radius )
   443               ( centerY - radius ),
   444               ( centerX + radius ),
   445               ( centerY + radius ) )
   449               ( centerX - radius ),
   450               ( centerY - radius ),
   452               ( centerY + radius ) );
   466         template< 
typename BufferType >
   468           const unsigned int& centerX,  
const unsigned int& centerY, 
   469            const unsigned int& radius )
   474               ( centerX - radius ),
   475               ( centerY - radius ),
   476               ( centerX + radius ),
   481               ( centerX - radius ),
   483               ( centerX + radius ),
   484               ( centerY + radius ) );
   494           return (
unsigned int)std::pow( 2.0, (
double)(octaveIndex + 1) );
   504           return  3 + ( 3 * getSurfOctaveFilterStepSize( octaveIndex ) );
   515           const unsigned int& scaleIndex )
   517           return  getSurfOctaveBaseFilterSize( octaveIndex ) + 
   518             ( 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. 
 
Tie Points Locator strategy parameters. 
 
SURF tie-points locator strategy factory. 
 
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...
 
unsigned int m_surfScalesNumber
The number of sub-sampling scales to generate, when applicable (default:3, minimum:3). 
 
te::gm::GeometricTransformation const  * m_raster1ToRaster2TransfPtr
A pointer to a transformation direct mapping raster 1 indexed coords into raster 2 indexed coords...
 
Base exception class for plugin module. 
 
ExecuteMatchingByEuclideanDistThreadEntryParams()
 
double m_searchOptTreeSearchRadius
Optimization tree search radius (pixels). 
 
unsigned int m_tiePointsSubSectorsSplitFactor
The number of sectors along each direction. 
 
boost::mutex * m_syncMutexPtr
 
TiePointsLocator SURF strategy parameters. 
 
Raster tie points locator strategy factory base class. 
 
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()
 
TiePointsLocator strategy parameters. 
 
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. 
 
unsigned int m_surfOctavesNumber
The number of octaves to generate, when applicable (default: 2, minimum:2). 
 
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. 
 
Raster tie-points locator strategy factory base class. 
 
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...
 
double m_surfMaxNormEuclideanDist
The maximum acceptable euclidean distance when matching features (when applicable), default:0.75, valid range: [0,1]. 
 
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.