te::rp::TiePointsLocatorStrategy Class Referenceabstract

Tie-points locator strategy. More...

#include <TiePointsLocatorStrategy.h>

Inheritance diagram for te::rp::TiePointsLocatorStrategy:
te::rp::TiePointsLocatorMoravecStrategy te::rp::TiePointsLocatorSURFStrategy

Classes

class  InterestPointT
 
class  MatchedInterestPointsT
 

Public Member Functions

virtual void getDefaultSpecStrategyParams (std::auto_ptr< TiePointsLocatorStrategyParameters > &defaultSpecParamsPtr) const =0
 Returns a sub-sampled version of the given locator strategy specific input parameters. More...
 
virtual void getSubSampledSpecStrategyParams (const double subSampleOptimizationRescaleFactor, const TiePointsLocatorStrategyParameters &inputSpecParams, std::auto_ptr< TiePointsLocatorStrategyParameters > &subSampledSpecParamsPtr) const =0
 Returns a sub-sampled version of the given locator strategy specific input parameters. More...
 
virtual ~TiePointsLocatorStrategy ()
 

Protected Types

typedef te::rp::Matrix< double > DoublesMatrix
 A matrix do store double values. More...
 
typedef te::rp::Matrix< float > FloatsMatrix
 A matrix do store float values. More...
 
typedef std::list< InterestPointTInterestPointsListT
 
typedef std::multiset< InterestPointTInterestPointsSetT
 
typedef std::multiset< MatchedInterestPointsTMatchedInterestPointsSetT
 
typedef te::rp::Matrix< unsigned char > UCharsMatrix
 A matrix do store unsigned char values. More...
 

Protected Member Functions

virtual unsigned int getAutoMaxTiePointsNumber () const =0
 Returns a automatically calculated optimum maximum amount tie-points following the current parameters. More...
 
virtual bool getMatchedInterestPoints (te::gm::GeometricTransformation const *const raster1ToRaster2TransfPtr, const double raster1ToRaster2TransfDMapError, MatchedInterestPointsSetT &matchedInterestPoints)=0
 Try to find matched interest points. More...
 
virtual bool initialize (const te::rp::TiePointsLocatorInputParameters &inputParameters)=0
 Initialize the strategy. More...
 
virtual void reset ()=0
 Clear all internal allocated resources and go back to the initial not-initialized state. More...
 
 TiePointsLocatorStrategy ()
 

Static Protected Member Functions

static bool checkForDuplicatedInterestPoints (const InterestPointsSetT &interestPoints, double &x, double &y)
 Check for duplicated interest points. More...
 
static void createTifFromMatrix (const FloatsMatrix &rasterData, const InterestPointsSetT &interestPoints, const std::string &tifFileName)
 Moravec interest points locator. More...
 
static void features2Tiff (const DoublesMatrix &features, const InterestPointsSetT &interestPoints, const std::string &fileNameBeginning)
 Save the generated features to tif files. More...
 
static bool loadRasterData (te::rst::Raster const *rasterPtr, const std::vector< unsigned int > &rasterBands, te::rst::Raster const *maskRasterPtr, const unsigned int maskRasterBand, const unsigned int rasterTargetAreaLineStart, const unsigned int rasterTargetAreaColStart, const unsigned int rasterTargetAreaWidth, const unsigned int rasterTargetAreaHeight, const double desiredRescaleFactorX, const double desiredRescaleFactorY, const te::rst::Interpolator::Method rasterInterpMethod, const unsigned char maxMemPercentUsage, std::vector< boost::shared_ptr< FloatsMatrix > > &loadedRasterData, UCharsMatrix &loadedMaskRasterData, double &achievedRescaleFactorX, double &achievedRescaleFactorY)
 Load rasters data (normalized between 0 and 1). More...
 
template<typename BufferElementT >
static void roolUpBuffer (BufferElementT **bufferPtr, const unsigned int &bufferLinesNumber)
 RoolUp a buffer of lines. More...
 

Private Member Functions

const TiePointsLocatorStrategyoperator= (const TiePointsLocatorStrategy &)
 
 TiePointsLocatorStrategy (const TiePointsLocatorStrategy &)
 

Friends

class TiePointsLocator
 

Detailed Description

Tie-points locator strategy.

Definition at line 52 of file TiePointsLocatorStrategy.h.

Member Typedef Documentation

A matrix do store double values.

Definition at line 92 of file TiePointsLocatorStrategy.h.

A matrix do store float values.

Definition at line 86 of file TiePointsLocatorStrategy.h.

Interest points list container type

Definition at line 149 of file TiePointsLocatorStrategy.h.

Interest points set container type

Definition at line 145 of file TiePointsLocatorStrategy.h.

Matched interest points container type

Definition at line 192 of file TiePointsLocatorStrategy.h.

A matrix do store unsigned char values.

Definition at line 98 of file TiePointsLocatorStrategy.h.

Constructor & Destructor Documentation

virtual te::rp::TiePointsLocatorStrategy::~TiePointsLocatorStrategy ( )
virtual
te::rp::TiePointsLocatorStrategy::TiePointsLocatorStrategy ( )
protected
te::rp::TiePointsLocatorStrategy::TiePointsLocatorStrategy ( const TiePointsLocatorStrategy )
private

Member Function Documentation

static bool te::rp::TiePointsLocatorStrategy::checkForDuplicatedInterestPoints ( const InterestPointsSetT interestPoints,
double &  x,
double &  y 
)
staticprotected

Check for duplicated interest points.

Parameters
xThe duplicated tie-points X coord.
yThe duplicated tie-points Y coord.
Returns
false if duplicated interest points were found.
static void te::rp::TiePointsLocatorStrategy::createTifFromMatrix ( const FloatsMatrix rasterData,
const InterestPointsSetT interestPoints,
const std::string &  tifFileName 
)
staticprotected

Moravec interest points locator.

Parameters
rasterDataThe loaded raster data.
interestPointsThe found raster 1 interest points (coords related to rasterData lines/cols).
tifFileNameTif file name.
static void te::rp::TiePointsLocatorStrategy::features2Tiff ( const DoublesMatrix features,
const InterestPointsSetT interestPoints,
const std::string &  fileNameBeginning 
)
staticprotected

Save the generated features to tif files.

Parameters
featuresThe features to be saved.
validInteresPointsThe interest pionts related to each feature inside the features matrix.
fileNameStartThe output file name beginning.
virtual unsigned int te::rp::TiePointsLocatorStrategy::getAutoMaxTiePointsNumber ( ) const
protectedpure virtual

Returns a automatically calculated optimum maximum amount tie-points following the current parameters.

Returns
Returns a automatically calculated optimum maximum amount tie-points following the current parameters.

Implemented in te::rp::TiePointsLocatorMoravecStrategy, and te::rp::TiePointsLocatorSURFStrategy.

virtual void te::rp::TiePointsLocatorStrategy::getDefaultSpecStrategyParams ( std::auto_ptr< TiePointsLocatorStrategyParameters > &  defaultSpecParamsPtr) const
pure virtual

Returns a sub-sampled version of the given locator strategy specific input parameters.

Parameters
subSampleOptimizationRescaleFactorSub-sampled optimization tie-points search rescale factor.
inputSpecParamsInput parameters (sub-sample factor 1).
subSampledSpecParamsSub-sampled parameters.

Implemented in te::rp::TiePointsLocatorMoravecStrategy, and te::rp::TiePointsLocatorSURFStrategy.

virtual bool te::rp::TiePointsLocatorStrategy::getMatchedInterestPoints ( te::gm::GeometricTransformation const *const  raster1ToRaster2TransfPtr,
const double  raster1ToRaster2TransfDMapError,
MatchedInterestPointsSetT matchedInterestPoints 
)
protectedpure virtual

Try to find matched interest points.

Parameters
matchedInterestPointsThe matched interest points.
raster1ToRaster2TransfPtrA pointer to a transformation (estimation) direct mapping raster 1 indexed coords into raster 2 indexed coords, of an empty pointer if there is no transformation avaliable.
raster1ToRaster2TransfDMapErrorThe expected transformation error.
Returns
true if OK, false on errors.

Implemented in te::rp::TiePointsLocatorMoravecStrategy, and te::rp::TiePointsLocatorSURFStrategy.

virtual void te::rp::TiePointsLocatorStrategy::getSubSampledSpecStrategyParams ( const double  subSampleOptimizationRescaleFactor,
const TiePointsLocatorStrategyParameters inputSpecParams,
std::auto_ptr< TiePointsLocatorStrategyParameters > &  subSampledSpecParamsPtr 
) const
pure virtual

Returns a sub-sampled version of the given locator strategy specific input parameters.

Parameters
subSampleOptimizationRescaleFactorSub-sampled optimization tie-points search rescale factor.
inputSpecParamsInput parameters (sub-sample factor 1).
subSampledSpecParamsPtrSub-sampled parameters.

Implemented in te::rp::TiePointsLocatorMoravecStrategy, and te::rp::TiePointsLocatorSURFStrategy.

virtual bool te::rp::TiePointsLocatorStrategy::initialize ( const te::rp::TiePointsLocatorInputParameters inputParameters)
protectedpure virtual

Initialize the strategy.

Parameters
inputParametersInput parameters.
Returns
true if OK, false on errors.

Implemented in te::rp::TiePointsLocatorMoravecStrategy, and te::rp::TiePointsLocatorSURFStrategy.

static bool te::rp::TiePointsLocatorStrategy::loadRasterData ( te::rst::Raster const *  rasterPtr,
const std::vector< unsigned int > &  rasterBands,
te::rst::Raster const *  maskRasterPtr,
const unsigned int  maskRasterBand,
const unsigned int  rasterTargetAreaLineStart,
const unsigned int  rasterTargetAreaColStart,
const unsigned int  rasterTargetAreaWidth,
const unsigned int  rasterTargetAreaHeight,
const double  desiredRescaleFactorX,
const double  desiredRescaleFactorY,
const te::rst::Interpolator::Method  rasterInterpMethod,
const unsigned char  maxMemPercentUsage,
std::vector< boost::shared_ptr< FloatsMatrix > > &  loadedRasterData,
UCharsMatrix loadedMaskRasterData,
double &  achievedRescaleFactorX,
double &  achievedRescaleFactorY 
)
staticprotected

Load rasters data (normalized between 0 and 1).

Parameters
rasterPtrInput raster pointer.
rasterBandsInput raster bands.
maskRasterPtrThe related input mask raster pointer (or zero, if no mask raster is avaliable).
maskRasterBandThe input mask raster band to use.
rasterTargetAreaLineStartThe raster target area initial line.
rasterTargetAreaColStartThe raster target area initial column.
rasterTargetAreaWidthThe raster target area width.
rasterTargetAreaHeightThe raster target area height.
desiredRescaleFactorXThe desired Scale factor to be applied on the loaded data.
desiredRescaleFactorYThe desired Scale factor to be applied on the loaded data.
rasterInterpMethodThe interpolation used when loading the input raster.
maxMemPercentUsageThe maximum amount (percent) of memory to use for the loaded data [0,100].
loadedRasterDataThe loaded raster data.
loadedMaskRasterDataThe loaded mask raster data.
desiredRescaleFactorXThe real achieved Scale factor.
desiredRescaleFactorYThe real achieved Scale factor.
Returns
true if ok, false on errors.
const TiePointsLocatorStrategy& te::rp::TiePointsLocatorStrategy::operator= ( const TiePointsLocatorStrategy )
private
virtual void te::rp::TiePointsLocatorStrategy::reset ( )
protectedpure virtual

Clear all internal allocated resources and go back to the initial not-initialized state.

Implemented in te::rp::TiePointsLocatorMoravecStrategy, and te::rp::TiePointsLocatorSURFStrategy.

template<typename BufferElementT >
static void te::rp::TiePointsLocatorStrategy::roolUpBuffer ( BufferElementT **  bufferPtr,
const unsigned int &  bufferLinesNumber 
)
inlinestaticprotected

RoolUp a buffer of lines.

Parameters
bufferPtrBuffer pointer.
bufferLinesNumberBuffer lines number.

Definition at line 290 of file TiePointsLocatorStrategy.h.

Friends And Related Function Documentation

friend class TiePointsLocator
friend

Definition at line 54 of file TiePointsLocatorStrategy.h.


The documentation for this class was generated from the following file: