25 #ifndef __TERRALIB_RP_INTERNAL_TIEPOINTSLOCATORMORAVECSTRATEGY_H
26 #define __TERRALIB_RP_INTERNAL_TIEPOINTSLOCATORMORAVECSTRATEGY_H
31 #include "../geometry/GeometricTransformation.h"
35 #include <boost/thread.hpp>
80 AbstractParameters*
clone()
const;
90 const double subSampleOptimizationRescaleFactor,
92 std::unique_ptr< TiePointsLocatorStrategyParameters >& subSampledSpecParamsPtr )
const;
96 std::unique_ptr< TiePointsLocatorStrategyParameters >& defaultSpecParamsPtr )
const;
180 const double raster1ToRaster2TransfDMapError,
200 const unsigned int iterationsNumber );
218 const unsigned int maxInterestPoints,
247 const unsigned int correlationWindowWidth,
277 const double raster1ToRaster2TransfDMapError,
Raster tie points locator strategy factory base class.
Tie Points Locator strategy parameters.
Tie-Pointsr locator strategy.
A generic template matrix.
Moravec tie-points locator strategy factory.
te::rp::TiePointsLocatorStrategy * build()
Concrete factories (derived from this one) must implement this method in order to create objects.
~TiePointsLocatorMoravecStrategyFactory()
TiePointsLocatorMoravecStrategyFactory()
The parameters passed to the matchCorrelationEuclideanThreadEntry method.
~ExecuteMatchingByCorrelationThreadEntryParams()
double m_searchOptTreeSearchRadius
Optimization tree search radius (pixels).
FloatsMatrix const * m_featuresSet2Ptr
ExecuteMatchingByCorrelationThreadEntryParams()
FloatsMatrix * m_corrMatrixPtr
boost::mutex * m_syncMutexPtr
InterestPointT const * m_interestPointsSet2Ptr
FloatsMatrix const * m_featuresSet1Ptr
te::gm::GeometricTransformation const * m_raster1ToRaster2TransfPtr
A pointer to a transformation direct mapping raster 1 indexed coords into raster 2 indexed coords,...
unsigned int * m_nextFeatureIdx1ToProcessPtr
InterestPointT const * m_interestPointsSet1Ptr
The parameters passed to the moravecLocatorThreadEntry method.
MoravecLocatorThreadParams()
unsigned int * m_nextRasterLinesBlockToProcessValuePtr
A pointer to a valid counter to control the blocks processing sequence.
unsigned int m_tiePointsSubSectorsSplitFactor
The number of sectors along each direction.
UCharsMatrix const * m_maskRasterDataPtr
The loaded mask raster data pointer (or zero if no mask is avaliable).
boost::mutex * m_rastaDataAccessMutexPtr
A pointer to a valid mutex to controle raster data access.
unsigned int m_maxInterestPointsBySubSector
The maximum number of interest points by sub-sector.
FloatsMatrix const * m_rasterDataPtr
The loaded raster data.
std::vector< InterestPointsSetT > * m_interestPointsSubSectorsPtr
A pointer to a valid interest points container (one element by subsector)..
boost::mutex * m_interestPointsAccessMutexPtr
A pointer to a valid mutex to control the output interest points container access.
~MoravecLocatorThreadParams()
unsigned int m_moravecWindowWidth
Thread return value pointer.
unsigned int m_processingBlocksNumber
The raster data will be splitted into this number of blocks for processing.
TiePointsLocator Moravec strategy parameters.
bool serialize(AlgorithmParametersSerializer &serializer) const
Returns a parameter serialization object.
unsigned int m_moravecNoiseFilterIterations
The number of noise filter iterations, when applicable (used to remove image noise,...
double m_moravecMinAbsCorrelation
The minimum acceptable absolute correlation value when matching features (when applicable),...
void reset()
Clear all internal allocated resources and reset the parameters instance to its initial state.
unsigned int m_moravecCorrelationWindowWidth
The correlation window width used to correlate points between the images (minimum 3,...
unsigned int m_moravecWindowWidth
The Moravec window width used to locate canditate tie-points (minimum 3, default: 21,...
AbstractParameters * clone() const
Create a clone copy of this instance.
const Parameters & operator=(const Parameters ¶ms)
Parameters(const Parameters &)
Tie-points locator Moravec strategy.
bool m_isInitialized
true if this instance is initialized.
~TiePointsLocatorMoravecStrategy()
bool executeMatchingByCorrelation(const FloatsMatrix &featuresSet1, const FloatsMatrix &featuresSet2, const InterestPointsSetT &interestPointsSet1, const InterestPointsSetT &interestPointsSet2, te::gm::GeometricTransformation const *const raster1ToRaster2TransfPtr, const double raster1ToRaster2TransfDMapError, MatchedInterestPointsSetT &matchedPoints)
Match each feature using correlation.
static bool applyMeanFilter(const FloatsMatrix &inputData, FloatsMatrix &outputData, const unsigned int iterationsNumber)
Mean Filter.
bool getMatchedInterestPoints(te::gm::GeometricTransformation const *const raster1ToRaster2TransfPtr, const double raster1ToRaster2TransfDMapError, MatchedInterestPointsSetT &matchedInterestPoints)
Try to find matched interest points.
bool initialize(const te::rp::TiePointsLocatorInputParameters &inputParameters)
Initialize the strategy.
te::rp::TiePointsLocatorInputParameters m_inputParameters
Input parameters.
static void locateMoravecInterestPointsThreadEntry(MoravecLocatorThreadParams *paramsPtr)
Movavec locator thread entry.
unsigned int getAutoMaxTiePointsNumber() const
Returns a automatically calculated optimum maximum amount tie-points following the current parameters...
bool locateMoravecInterestPoints(const unsigned int maxInterestPoints, const FloatsMatrix &rasterData, UCharsMatrix const *maskRasterDataPtr, InterestPointsSetT &interestPoints) const
Moravec interest points locator.
void reset()
Clear all internal allocated resources and go back to the initial not-initialized state.
void getSubSampledSpecStrategyParams(const double subSampleOptimizationRescaleFactor, const TiePointsLocatorStrategyParameters &inputSpecParams, std::unique_ptr< TiePointsLocatorStrategyParameters > &subSampledSpecParamsPtr) const
Returns a sub-sampled version of the given locator strategy specific input parameters.
void getDefaultSpecStrategyParams(std::unique_ptr< TiePointsLocatorStrategyParameters > &defaultSpecParamsPtr) const
Returns a sub-sampled version of the given locator strategy specific input parameters.
TiePointsLocatorMoravecStrategy()
static void executeMatchingByCorrelationThreadEntry(ExecuteMatchingByCorrelationThreadEntryParams *paramsPtr)
Correlation/Euclidean match thread entry.
static bool generateCorrelationFeatures(const InterestPointsSetT &interestPoints, const unsigned int correlationWindowWidth, const FloatsMatrix &rasterData, FloatsMatrix &features, InterestPointsSetT &validInteresPoints)
Generate correlation features ( normalized - unit vector ) matrix for the given interes points.
Raster tie-points locator strategy factory base class.
TiePointsLocator strategy parameters.
Tie-points locator strategy.
std::multiset< InterestPointT > InterestPointsSetT
std::multiset< MatchedInterestPointsT > MatchedInterestPointsSetT
#define TERPEXPORT
You can use this macro in order to export/import classes and functions from this module.