25#ifndef __TERRALIB_RP_INTERNAL_TIEPOINTSLOCATORSTRATEGY_H
26#define __TERRALIB_RP_INTERNAL_TIEPOINTSLOCATORSTRATEGY_H
67 const double subSampleOptimizationRescaleFactor,
69 std::unique_ptr< TiePointsLocatorStrategyParameters >& subSampledSpecParamsPtr )
const = 0;
78 std::unique_ptr< TiePointsLocatorStrategyParameters >& defaultSpecParamsPtr )
const = 0;
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 );
2D Geometric transformation parameters.
It interpolates one pixel based on a selected algorithm.
TiePointsLocator strategy parameters.
unsigned int m_x
Point X coord.
float m_feature1
Interest point feature 1 value.
InterestPointT(const InterestPointT &other)
InterestPointT & operator=(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.
bool operator<(const InterestPointT &other) const
~MatchedInterestPointsT()
bool operator<(const MatchedInterestPointsT &other) const
const MatchedInterestPointsT & operator=(const MatchedInterestPointsT &other)
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.
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.
std::string m_errorMessage
Current error message.
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).
te::rp::Matrix< double > DoublesMatrix
A matrix do store double values.
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.
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.
te::rp::Matrix< float > FloatsMatrix
A matrix do store float values.
void setErrorMessage(const std::string &newErrorMessage)
Set the current error message.
std::multiset< MatchedInterestPointsT > MatchedInterestPointsSetT
const std::string & getErrorMessage() const
Return the current error message if there is any.
virtual unsigned int getAutoMaxTiePointsNumber() const =0
Returns a automatically calculated optimum maximum amount tie-points following the current parameters...
te::rp::Matrix< unsigned char > UCharsMatrix
A matrix do store unsigned char values.
TiePointsLocatorStrategy & operator=(const TiePointsLocatorStrategy &)
virtual void getDefaultSpecStrategyParams(std::unique_ptr< TiePointsLocatorStrategyParameters > &defaultSpecParamsPtr) const =0
Returns a sub-sampled version of the given locator strategy specific input parameters.
InterpolationMethod Method
Allowed interpolation methods.
An abstract class for raster data strucutures.
Namespace for Raster Processing module of TerraLib.
An abstract class for raster data strucutures.
Configuration flags for the Raster Processing module of TerraLib.
#define TERPEXPORT
You can use this macro in order to export/import classes and functions from this module.