Go to the documentation of this file.
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 );
bool operator<(const InterestPointT &other) const
A generic template matrix.
MatchedInterestPointsT(const MatchedInterestPointsT &other)
virtual ~TiePointsLocatorStrategy()
InterestPointT m_point2
Interest point 2.
const MatchedInterestPointsT & operator=(const MatchedInterestPointsT &other)
virtual bool getMatchedInterestPoints(te::gm::GeometricTransformation const *const raster1ToRaster2TransfPtr, const double raster1ToRaster2TransfDMapError, MatchedInterestPointsSetT &matchedInterestPoints)=0
Try to find matched interest points.
InterestPointT & operator=(const InterestPointT &other)
float m_feature
Matched interest feature.
virtual void reset()
Clear all internal allocated resources and go back to the initial not-initialized state.
TiePointsLocatorStrategy(const TiePointsLocatorStrategy &)
An abstract class for raster data strucutures.
static bool checkForDuplicatedInterestPoints(const InterestPointsSetT &interestPoints, double &x, double &y)
Check for duplicated interest points.
static void createTifFromMatrix(const FloatsMatrix &rasterData, const InterestPointsSetT &interestPoints, const std::string &tifFileName)
Moravec interest points locator.
InterestPointT(const InterestPointT &other)
std::list< InterestPointT > InterestPointsListT
virtual bool initialize(const te::rp::TiePointsLocatorInputParameters &inputParameters)=0
Initialize the strategy.
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).
MatchedInterestPointsT(const InterestPointT &point1, const InterestPointT &point2, const float &feature)
TiePointsLocatorStrategy & operator=(const TiePointsLocatorStrategy &)
unsigned int m_y
Point Y coord.
virtual unsigned int getAutoMaxTiePointsNumber() const =0
Returns a automatically calculated optimum maximum amount tie-points following the current parameters...
te::rp::Matrix< double > DoublesMatrix
A matrix do store double values.
TiePointsLocatorStrategy()
InterpolationMethod
Allowed interpolation methods.
unsigned int m_x
Point X coord.
float m_feature2
Interest point feature 2 value.
std::string m_errorMessage
Current error message.
te::rp::Matrix< unsigned char > UCharsMatrix
A matrix do store unsigned char values.
#define TERPEXPORT
You can use this macro in order to export/import classes and functions from this module.
virtual void getDefaultSpecStrategyParams(std::unique_ptr< TiePointsLocatorStrategyParameters > &defaultSpecParamsPtr) const =0
Returns a sub-sampled version of the given locator strategy specific input parameters.
float m_feature3
Interest point feature 3 value.
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.
bool operator<(const MatchedInterestPointsT &other) const
TiePointsLocator strategy parameters.
std::multiset< InterestPointT > InterestPointsSetT
Tie-points locator strategy.
std::multiset< MatchedInterestPointsT > MatchedInterestPointsSetT
static void features2Tiff(const DoublesMatrix &features, const InterestPointsSetT &interestPoints, const std::string &fileNameBeginning)
Save the generated features to tif files.
InterestPointT m_point1
Interest point 1.
Proxy configuration file for TerraView (see terraview_config.h).
float m_feature1
Interest point feature 1 value.
~MatchedInterestPointsT()
const std::string & getErrorMessage() const
Return the current error message if there is any.
static void roolUpBuffer(BufferElementT **bufferPtr, const unsigned int &bufferLinesNumber)
RoolUp a buffer of lines.
te::rp::Matrix< float > FloatsMatrix
A matrix do store float values.
void setErrorMessage(const std::string &newErrorMessage)
Set the current error message.