Tie-points locator strategy. More...
#include <TiePointsLocatorStrategy.h>
Classes | |
class | InterestPointT |
class | MatchedInterestPointsT |
Public Member Functions | |
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< InterestPointT > | InterestPointsListT |
typedef std::multiset < InterestPointT > | InterestPointsSetT |
typedef std::multiset < MatchedInterestPointsT > | MatchedInterestPointsSetT |
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 TiePointsLocatorStrategy & | operator= (const TiePointsLocatorStrategy &) |
TiePointsLocatorStrategy (const TiePointsLocatorStrategy &) | |
Friends | |
class | TiePointsLocator |
Tie-points locator strategy.
Definition at line 51 of file TiePointsLocatorStrategy.h.
A matrix do store double values.
Definition at line 71 of file TiePointsLocatorStrategy.h.
A matrix do store float values.
Definition at line 65 of file TiePointsLocatorStrategy.h.
|
protected |
Interest points list container type
Definition at line 128 of file TiePointsLocatorStrategy.h.
|
protected |
Interest points set container type
Definition at line 124 of file TiePointsLocatorStrategy.h.
|
protected |
Matched interest points container type
Definition at line 171 of file TiePointsLocatorStrategy.h.
A matrix do store unsigned char values.
Definition at line 77 of file TiePointsLocatorStrategy.h.
|
virtual |
Definition at line 41 of file TiePointsLocatorStrategy.cpp.
|
protected |
Definition at line 37 of file TiePointsLocatorStrategy.cpp.
|
private |
Definition at line 45 of file TiePointsLocatorStrategy.cpp.
|
staticprotected |
Check for duplicated interest points.
x | The duplicated tie-points X coord. |
y | The duplicated tie-points Y coord. |
Definition at line 363 of file TiePointsLocatorStrategy.cpp.
Referenced by te::rp::TiePointsLocatorSURFStrategy::locateSurfInterestPointsThreadEntry().
|
staticprotected |
Moravec interest points locator.
rasterData | The loaded raster data. |
interestPoints | The found raster 1 interest points (coords related to rasterData lines/cols). |
tifFileName | Tif file name. |
Definition at line 222 of file TiePointsLocatorStrategy.cpp.
References te::rst::BlueCInt, te::rp::Matrix< TemplateElementType >::getColumnsNumber(), te::rp::Matrix< TemplateElementType >::getLinesNumber(), te::rst::GreenCInt, te::sa::Grid, te::rst::RasterFactory::make(), te::rst::RedCInt, TERP_TRUE_OR_THROW, and te::dt::UCHAR_TYPE.
|
staticprotected |
Save the generated features to tif files.
features | The features to be saved. |
validInteresPoints | The interest pionts related to each feature inside the features matrix. |
fileNameStart | The output file name beginning. |
Definition at line 298 of file TiePointsLocatorStrategy.cpp.
References te::rp::Matrix< TemplateElementType >::getColumnsNumber(), te::rp::Matrix< TemplateElementType >::getLinesNumber(), te::sa::Grid, te::rst::RasterFactory::make(), MAX, MIN, te::rst::RedCInt, TERP_TRUE_OR_THROW, and te::dt::UCHAR_TYPE.
|
protectedpure virtual |
Returns a automatically calculated optimum maximum amount tie-points following the current parameters.
Implemented in te::rp::TiePointsLocatorSURFStrategy, and te::rp::TiePointsLocatorMoravecStrategy.
|
protectedpure virtual |
Try to find matched interest points.
matchedInterestPoints | The matched interest points. |
raster1ToRaster2TransfPtr | A 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. |
raster1ToRaster2TransfDMapError | The expected transformation error. |
Implemented in te::rp::TiePointsLocatorSURFStrategy, and te::rp::TiePointsLocatorMoravecStrategy.
|
protectedpure virtual |
Initialize the strategy.
inputParameters | Input parameters. |
Implemented in te::rp::TiePointsLocatorSURFStrategy, and te::rp::TiePointsLocatorMoravecStrategy.
|
staticprotected |
Load rasters data (normalized between 0 and 1).
rasterPtr | Input raster pointer. |
rasterBands | Input raster bands. |
maskRasterPtr | The related input mask raster pointer (or zero, if no mask raster is avaliable). |
maskRasterBand | The input mask raster band to use. |
rasterTargetAreaLineStart | The raster target area initial line. |
rasterTargetAreaColStart | The raster target area initial column. |
rasterTargetAreaWidth | The raster target area width. |
rasterTargetAreaHeight | The raster target area height. |
desiredRescaleFactorX | The desired Scale factor to be applied on the loaded data. |
desiredRescaleFactorY | The desired Scale factor to be applied on the loaded data. |
rasterInterpMethod | The interpolation used when loading the input raster. |
maxMemPercentUsage | The maximum amount (percent) of memory to use for the loaded data [0,100]. |
loadedRasterData | The loaded raster data. |
loadedMaskRasterData | The loaded mask raster data. |
desiredRescaleFactorX | The real achieved Scale factor. |
desiredRescaleFactorY | The real achieved Scale factor. |
Definition at line 54 of file TiePointsLocatorStrategy.cpp.
References te::rp::Matrix< TemplateElementType >::AutoMemPol, te::rp::Matrix< double >::AutoMemPol, te::rst::Raster::getBand(), te::rst::Interpolator::getValue(), te::rst::Band::getValue(), MAX, te::rp::Matrix< TemplateElementType >::reset(), reset(), and TERP_TRUE_OR_RETURN_FALSE.
Referenced by te::rp::TiePointsLocatorMoravecStrategy::getMatchedInterestPoints(), and te::rp::TiePointsLocatorSURFStrategy::getMatchedInterestPoints().
|
private |
Definition at line 49 of file TiePointsLocatorStrategy.cpp.
|
protectedpure virtual |
Clear all internal allocated resources and go back to the initial not-initialized state.
Implemented in te::rp::TiePointsLocatorSURFStrategy, and te::rp::TiePointsLocatorMoravecStrategy.
Referenced by loadRasterData().
|
inlinestaticprotected |
RoolUp a buffer of lines.
bufferPtr | Buffer pointer. |
bufferLinesNumber | Buffer lines number. |
Definition at line 269 of file TiePointsLocatorStrategy.h.
Referenced by te::rp::TiePointsLocatorMoravecStrategy::locateMoravecInterestPointsThreadEntry(), and te::rp::TiePointsLocatorSURFStrategy::locateSurfInterestPointsThreadEntry().
|
friend |
Definition at line 53 of file TiePointsLocatorStrategy.h.