25 #ifndef __TERRALIB_RP_INTERNAL_TIEPOINTSLOCATORSTRATEGY_H 
   26 #define __TERRALIB_RP_INTERNAL_TIEPOINTSLOCATORSTRATEGY_H 
   31 #include "../geometry/GTParameters.h" 
   32 #include "../raster/Raster.h" 
   33 #include "../raster/Interpolator.h" 
   46     class TiePointsLocator;
 
   67           const double subSampleOptimizationRescaleFactor,
 
   69           std::unique_ptr< TiePointsLocatorStrategyParameters >& subSampledSpecParamsPtr ) 
const = 0;
 
   78           std::unique_ptr< TiePointsLocatorStrategyParameters >& defaultSpecParamsPtr ) 
const = 0;          
 
  122               : m_x( 0 ), m_y( 0 ), m_feature1( 0 ), m_feature2( 0 ),
 
  178               m_point1( point1 ), m_point2( point2 ),
 
  179               m_feature( feature ) {};
 
  229           const double raster1ToRaster2TransfDMapError,
 
  273           const std::vector< unsigned int >& rasterBands,
 
  275           const unsigned int maskRasterBand,
 
  276           const unsigned int rasterTargetAreaLineStart,
 
  277           const unsigned int rasterTargetAreaColStart,
 
  278           const unsigned int rasterTargetAreaWidth,
 
  279           const unsigned int rasterTargetAreaHeight,
 
  280           const double desiredRescaleFactorX,
 
  281           const double desiredRescaleFactorY,
 
  283           const unsigned char maxMemPercentUsage, 
 
  284           std::vector< boost::shared_ptr< FloatsMatrix > >& loadedRasterData,
 
  286           double& achievedRescaleFactorX,
 
  287           double& achievedRescaleFactorY );
 
  296         template< 
typename BufferElementT >
 
  298           const unsigned int& bufferLinesNumber )
 
  301           assert( bufferLinesNumber );
 
  303           unsigned int idx = 0;
 
  304           BufferElementT* auxLinePtr = bufferPtr[ 0 ];
 
  305           const unsigned int lastLineIdx = bufferLinesNumber - 1;
 
  307           for( idx = 0 ; idx < lastLineIdx ; ++idx )
 
  309             bufferPtr[ idx ] = bufferPtr[ idx + 1 ];
 
  312           bufferPtr[ lastLineIdx ] = auxLinePtr;
 
  327           const std::string& tifFileName );         
 
  341           const std::string& fileNameBeginning ); 
 
  351           double& x, 
double& y );         
 
A generic template matrix.
 
TiePointsLocator strategy parameters.
 
unsigned int m_x
Point X coord.
 
float m_feature1
Interest point feature 1 value.
 
InterestPointT(const InterestPointT &other)
 
float m_feature3
Interest point feature 3 value.
 
unsigned int m_y
Point Y coord.
 
float m_feature2
Interest point feature 2 value.
 
InterestPointT & operator=(const InterestPointT &other)
 
bool operator<(const InterestPointT &other) const
 
~MatchedInterestPointsT()
 
const MatchedInterestPointsT & operator=(const MatchedInterestPointsT &other)
 
bool operator<(const MatchedInterestPointsT &other) const
 
MatchedInterestPointsT(const MatchedInterestPointsT &other)
 
InterestPointT m_point2
Interest point 2.
 
MatchedInterestPointsT(const InterestPointT &point1, const InterestPointT &point2, const float &feature)
 
float m_feature
Matched interest feature.
 
InterestPointT m_point1
Interest point 1.
 
Tie-points locator strategy.
 
TiePointsLocatorStrategy()
 
TiePointsLocatorStrategy(const TiePointsLocatorStrategy &)
 
virtual void getSubSampledSpecStrategyParams(const double subSampleOptimizationRescaleFactor, const TiePointsLocatorStrategyParameters &inputSpecParams, std::unique_ptr< TiePointsLocatorStrategyParameters > &subSampledSpecParamsPtr) const =0
Returns a sub-sampled version of the given locator strategy specific input parameters.
 
te::rp::Matrix< unsigned char > UCharsMatrix
A matrix do store unsigned char values.
 
std::string m_errorMessage
Current error message.
 
TiePointsLocatorStrategy & operator=(const TiePointsLocatorStrategy &)
 
const std::string & getErrorMessage() const
Return the current error message if there is any.
 
te::rp::Matrix< float > FloatsMatrix
A matrix do store float values.
 
virtual bool getMatchedInterestPoints(te::gm::GeometricTransformation const *const raster1ToRaster2TransfPtr, const double raster1ToRaster2TransfDMapError, MatchedInterestPointsSetT &matchedInterestPoints)=0
Try to find matched interest points.
 
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).
 
static void roolUpBuffer(BufferElementT **bufferPtr, const unsigned int &bufferLinesNumber)
RoolUp a buffer of lines.
 
std::list< InterestPointT > InterestPointsListT
 
virtual bool initialize(const te::rp::TiePointsLocatorInputParameters &inputParameters)=0
Initialize the strategy.
 
static void features2Tiff(const DoublesMatrix &features, const InterestPointsSetT &interestPoints, const std::string &fileNameBeginning)
Save the generated features to tif files.
 
virtual void reset()
Clear all internal allocated resources and go back to the initial not-initialized state.
 
te::rp::Matrix< double > DoublesMatrix
A matrix do store double values.
 
std::multiset< InterestPointT > InterestPointsSetT
 
static bool checkForDuplicatedInterestPoints(const InterestPointsSetT &interestPoints, double &x, double &y)
Check for duplicated interest points.
 
virtual ~TiePointsLocatorStrategy()
 
static void createTifFromMatrix(const FloatsMatrix &rasterData, const InterestPointsSetT &interestPoints, const std::string &tifFileName)
Moravec interest points locator.
 
void setErrorMessage(const std::string &newErrorMessage)
Set the current error message.
 
std::multiset< MatchedInterestPointsT > MatchedInterestPointsSetT
 
virtual unsigned int getAutoMaxTiePointsNumber() const =0
Returns a automatically calculated optimum maximum amount tie-points following the current parameters...
 
virtual void getDefaultSpecStrategyParams(std::unique_ptr< TiePointsLocatorStrategyParameters > &defaultSpecParamsPtr) const =0
Returns a sub-sampled version of the given locator strategy specific input parameters.
 
An abstract class for raster data strucutures.
 
InterpolationMethod
Allowed interpolation methods.
 
#define TERPEXPORT
You can use this macro in order to export/import classes and functions from this module.
 
Proxy configuration file for TerraView (see terraview_config.h).