Tie points locator. More...
#include <TiePointsLocator.h>
Classes | |
class | ExecuteMatchingByCorrelationThreadEntryParams |
The parameters passed to the matchCorrelationEuclideanThreadEntry method. More... | |
class | ExecuteMatchingByEuclideanDistThreadEntryParams |
The parameters passed to the executeMatchingByEuclideanDistThreadEntry method. More... | |
class | InputParameters |
TiePointsLocator input parameters. More... | |
class | InterestPointT |
class | MatchedInterestPointsT |
class | MoravecLocatorThreadParams |
The parameters passed to the moravecLocatorThreadEntry method. More... | |
class | OutputParameters |
TiePointsLocator output parameters. More... | |
class | SurfLocatorThreadParams |
The parameters passed to the surfLocatorThreadEntry method. More... | |
Public Member Functions | |
bool | execute (AlgorithmOutputParameters &outputParams) throw ( te::rp::Exception ) |
Executes the algorithm using the supplied parameters. More... | |
bool | initialize (const AlgorithmInputParameters &inputParams) throw ( te::rp::Exception ) |
Initialize the algorithm instance making it ready for execution. More... | |
bool | isInitialized () const |
Returns true if the algorithm instance is initialized and ready for execution. More... | |
void | reset () throw ( te::rp::Exception ) |
Clear all internal allocated objects and reset the algorithm to its initial state. More... | |
TiePointsLocator () | |
~TiePointsLocator () | |
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 | |
bool | executeMoravec (const double raster1XRescFact, const double raster1YRescFact, const double raster2XRescFact, const double raster2YRescFact, te::common::TaskProgress *progressPtr, TiePointsLocator::OutputParameters *outParamsPtr, std::vector< double > &tiePointsWeights) throw ( te::rp::Exception ) |
Executes the Moravec algorithm using the supplied parameters. More... | |
bool | executeSurf (const double raster1XRescFact, const double raster1YRescFact, const double raster2XRescFact, const double raster2YRescFact, te::common::TaskProgress *progressPtr, TiePointsLocator::OutputParameters *outParamsPtr, std::vector< double > &tiePointsWeights) throw ( te::rp::Exception ) |
Executes the SURF algorithm using the supplied parameters. More... | |
bool | locateSurfInterestPoints (const FloatsMatrix &integralRasterData, UCharsMatrix const *maskRasterDataPtr, InterestPointsSetT &interestPoints) const |
SURF interest points locator. More... | |
Static Protected Member Functions | |
static bool | applyGaussianFilter (const DoublesMatrix &inputData, DoublesMatrix &outputData, const unsigned int iterationsNumber) |
Gaussian Filter. More... | |
static bool | applyMeanFilter (const FloatsMatrix &inputData, FloatsMatrix &outputData, const unsigned int iterationsNumber) |
Mean Filter. More... | |
static bool | createIntegralImage (const FloatsMatrix &inputData, FloatsMatrix &outputData) |
Create an integral image. More... | |
static void | createTifFromMatrix (const DoublesMatrix &rasterData, const InterestPointsSetT &interestPoints, const std::string &tifFileName) |
Moravec interest points locator. More... | |
static bool | executeMatchingByCorrelation (const FloatsMatrix &featuresSet1, const FloatsMatrix &featuresSet2, const InterestPointsSetT &interestPointsSet1, const InterestPointsSetT &interestPointsSet2, const unsigned int maxPt1ToPt2PixelDistance, const unsigned int enableMultiThread, const double minAllowedAbsCorrelation, MatchedInterestPointsSetT &matchedPoints) |
Match each feature using correlation. More... | |
static void | executeMatchingByCorrelationThreadEntry (ExecuteMatchingByCorrelationThreadEntryParams *paramsPtr) |
Correlation/Euclidean match thread entry. More... | |
static bool | executeMatchingByEuclideanDist (const FloatsMatrix &featuresSet1, const FloatsMatrix &featuresSet2, const InterestPointsSetT &interestPointsSet1, const InterestPointsSetT &interestPointsSet2, const unsigned int maxPt1ToPt2PixelDistance, const double maxEuclideanDist, const unsigned int enableMultiThread, MatchedInterestPointsSetT &matchedPoints) |
Match each feature using eucliean distance. More... | |
static void | executeMatchingByEuclideanDistThreadEntry (ExecuteMatchingByEuclideanDistThreadEntryParams *paramsPtr) |
Correlation/Euclidean match thread entry. More... | |
static void | features2Tiff (const DoublesMatrix &features, const InterestPointsSetT &interestPoints, const std::string &fileNameBeginning) |
Save the generated features to tif files. More... | |
static bool | generateCorrelationFeatures (const InterestPointsSetT &interestPoints, const unsigned int correlationWindowWidth, const FloatsMatrix &rasterData, FloatsMatrix &features, InterestPointsSetT &validInteresPoints) |
Generate correlation features ( normalized - unit vector ) matrix for the given interes points. More... | |
static bool | generateSurfFeatures (const InterestPointsSetT &interestPoints, const FloatsMatrix &integralRasterData, InterestPointsSetT &validInterestPoints, FloatsMatrix &features) |
Generate a Surf features matrix for the given interes points. More... | |
template<typename BufferType > | |
static float | getHaarXVectorIntensity (BufferType &buffer, const unsigned int ¢erX, const unsigned int ¢erY, const unsigned int &radius) |
Return a Haar X intesity vector for the window centered at the given point. More... | |
template<typename BufferType > | |
static float | getHaarYVectorIntensity (BufferType &buffer, const unsigned int ¢erX, const unsigned int ¢erY, const unsigned int &radius) |
Return a Haar Y intesity vector for the window centered at the given point. More... | |
template<typename BufferType > | |
static float | getIntegralBoxSum (BufferType &buffer, const unsigned int &upperLeftX, const unsigned int &upperLeftY, const unsigned int &lowerRightX, const unsigned int &lowerRightY) |
Return a sum of all pixels inside a box over the given integral image buffer. More... | |
static float | getSurfDxxDerivative (float **bufferPtr, const unsigned int ¢erX, const unsigned int ¢erY, const unsigned int &lobeWidth, const unsigned int &lobeRadius) |
Return a SURF box filter Dyy derivative centered over the given position from the given integral image buffer. More... | |
static float | getSurfDxyDerivative (float **bufferPtr, const unsigned int ¢erX, const unsigned int ¢erY, const unsigned int &lobeWidth) |
Return a SURF box filter Dxy derivative centered over the given position from the given integral image buffer. More... | |
static float | getSurfDyyDerivative (float **bufferPtr, const unsigned int ¢erX, const unsigned int ¢erY, const unsigned int &lobeWidth, const unsigned int &lobeRadius) |
Return a SURF box filter Dxx derivative centered over the given position from the given integral image buffer. More... | |
static unsigned int | getSurfFilterSize (const unsigned int &octaveIndex, const unsigned int &scaleIndex) |
Return the surf octave filter size (width). More... | |
static unsigned int | getSurfOctaveBaseFilterSize (const unsigned int &octaveIndex) |
Return the surf octave base filter size (width). More... | |
static unsigned int | getSurfOctaveFilterStepSize (const unsigned int &octaveIndex) |
Return the surf octave filter step size (width). 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 rescaleFactorX, const double rescaleFactorY, const te::rst::Interpolator::Method rasterInterpMethod, const unsigned char maxMemPercentUsage, std::vector< boost::shared_ptr< FloatsMatrix > > &loadedRasterData, UCharsMatrix &loadedMaskRasterData) |
Load rasters data (normalized between 0 and 1). More... | |
static bool | locateMoravecInterestPoints (const FloatsMatrix &rasterData, UCharsMatrix const *maskRasterDataPtr, const unsigned int moravecWindowWidth, const unsigned int maxInterestPoints, const unsigned int enableMultiThread, InterestPointsSetT &interestPoints) |
Moravec interest points locator. More... | |
static void | locateMoravecInterestPointsThreadEntry (MoravecLocatorThreadParams *paramsPtr) |
Movavec locator thread entry. More... | |
static void | locateSurfInterestPointsThreadEntry (SurfLocatorThreadParams *paramsPtr) |
Surf locator thread entry. More... | |
static void | printBuffer (double **buffer, const unsigned int nLines, const unsigned int nCols) |
Print the given buffer to std::out. More... | |
template<typename ElementT > | |
static void | printMatrix (const te::rp::Matrix< ElementT > &matrix) |
Print the given matrix to std::out. More... | |
template<typename BufferElementT > | |
static void | roolUpBuffer (BufferElementT **bufferPtr, const unsigned int &bufferLinesNumber) |
RoolUp a buffer of lines. More... | |
template<typename BufferElementT > | |
static void | zeroFillBuffer (BufferElementT **bufferPtr, const unsigned int &bufferLinesNumber, const unsigned int &bufferColsNumber) |
Fill a buffer with zeroes. More... | |
Protected Attributes | |
TiePointsLocator::InputParameters | m_inputParameters |
TiePointsLocator input execution parameters. More... | |
bool | m_isInitialized |
Tells if this instance is initialized. More... | |
Tie points locator.
Designed to find tie-points inside raster areas.
Definition at line 55 of file TiePointsLocator.h.
|
protected |
A matrix do store double values.
Definition at line 235 of file TiePointsLocator.h.
|
protected |
A matrix do store float values.
Definition at line 229 of file TiePointsLocator.h.
|
protected |
Interest points list container type
Definition at line 292 of file TiePointsLocator.h.
|
protected |
Interest points set container type
Definition at line 288 of file TiePointsLocator.h.
|
protected |
Matched interest points container type
Definition at line 335 of file TiePointsLocator.h.
|
protected |
A matrix do store unsigned char values.
Definition at line 241 of file TiePointsLocator.h.
te::rp::TiePointsLocator::TiePointsLocator | ( | ) |
Definition at line 201 of file TiePointsLocator.cpp.
References reset().
te::rp::TiePointsLocator::~TiePointsLocator | ( | ) |
Definition at line 206 of file TiePointsLocator.cpp.
|
staticprotected |
Gaussian Filter.
inputData | The input data. |
outputData | The output data. |
iterationsNumber | The number of filter iterations. |
Definition at line 2736 of file TiePointsLocator.cpp.
References te::rp::Matrix< double >::AutoMemPol, te::rp::Matrix< TemplateElementType >::getColumnsNumber(), te::rp::Matrix< TemplateElementType >::getLinesNumber(), te::rp::Matrix< TemplateElementType >::reset(), and TERP_TRUE_OR_RETURN_FALSE.
|
staticprotected |
Mean Filter.
inputData | The input data. |
outputData | The output data. |
iterationsNumber | The number of filter iterations. |
Definition at line 2823 of file TiePointsLocator.cpp.
References te::rp::Matrix< TemplateElementType >::AutoMemPol, te::rp::Matrix< TemplateElementType >::getColumnsNumber(), te::rp::Matrix< TemplateElementType >::getLinesNumber(), te::rp::Matrix< TemplateElementType >::reset(), and TERP_TRUE_OR_RETURN_FALSE.
Referenced by executeMoravec().
|
staticprotected |
Create an integral image.
inputData | The input data. |
outputData | The output data. |
Definition at line 2942 of file TiePointsLocator.cpp.
References te::rp::Matrix< TemplateElementType >::getColumnsNumber(), te::rp::Matrix< TemplateElementType >::getLinesNumber(), te::rp::Matrix< TemplateElementType >::reset(), and TERP_TRUE_OR_RETURN_FALSE.
Referenced by executeSurf().
|
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 2660 of file TiePointsLocator.cpp.
References te::rst::BlueCInt, te::rp::Matrix< TemplateElementType >::getColumnsNumber(), te::rp::Matrix< TemplateElementType >::getLinesNumber(), te::rst::GreenCInt, te::rst::RasterFactory::make(), te::rst::RedCInt, TERP_TRUE_OR_THROW, and te::dt::UCHAR_TYPE.
|
virtual |
Executes the algorithm using the supplied parameters.
outputParams | Output parameters. |
Implements te::rp::Algorithm.
Definition at line 210 of file TiePointsLocator.cpp.
References te::gm::GTFilter::applyRansac(), executeMoravec(), executeSurf(), te::rp::TiePointsLocator::InputParameters::m_enableGeometryFilter, te::rp::TiePointsLocator::InputParameters::m_enableMultiThread, te::rp::TiePointsLocator::InputParameters::m_enableProgress, te::rp::TiePointsLocator::InputParameters::m_geometryFilterAssurance, te::rp::TiePointsLocator::InputParameters::m_geomTransfMaxError, te::rp::TiePointsLocator::InputParameters::m_geomTransfName, m_inputParameters, te::rp::TiePointsLocator::InputParameters::m_interesPointsLocationStrategy, m_isInitialized, te::rp::TiePointsLocator::InputParameters::m_pixelSizeXRelation, te::rp::TiePointsLocator::InputParameters::m_pixelSizeYRelation, te::rp::TiePointsLocator::InputParameters::m_rastersRescaleFactor, te::gm::GTParameters::m_tiePoints, te::rp::TiePointsLocator::OutputParameters::m_tiePoints, te::rp::TiePointsLocator::OutputParameters::m_transformationPtr, te::common::AbstractFactory< GeometricTransformation, std::string >::make(), te::rp::TiePointsLocator::InputParameters::MoravecStrategyT, te::rp::TiePointsLocator::InputParameters::SurfStrategyT, TERP_DEBUG_TRUE_OR_THROW, TERP_LOG_AND_THROW, and TERP_TRUE_OR_THROW.
Referenced by te::rp::SequenceMosaic::execute(), te::rp::GeometricRefining::execute(), te::qt::widgets::TiePointsLocatorDialog::on_autoAcquireTiePointsPushButton_clicked(), and te::qt::widgets::TiePointLocatorWidget::onAutoAcquireTiePointsToolButtonClicked().
|
staticprotected |
Match each feature using correlation.
featuresSet1 | Features set 1. |
featuresSet2 | Features set 2. |
interestPointsSet1 | The interest pionts set 1. |
interestPointsSet2 | The interest pionts set 2. |
maxPt1ToPt2PixelDistance | Zero (disabled) or the maximum distance (pixels) between a point from set 1 to a point from set 1 (points beyond this distance will not be correlated and will have zero as correlation value). |
enableMultiThread | Enable/disable the use of threads. |
minAllowedAbsCorrelation | The minimum acceptable absolute correlation value when matching features (when applicable). |
matchedPoints | The matched points. |
Definition at line 3623 of file TiePointsLocator.cpp.
References executeMatchingByCorrelationThreadEntry(), te::rp::Matrix< TemplateElementType >::getColumnsNumber(), te::rp::Matrix< TemplateElementType >::getLinesNumber(), te::rp::Matrix< TemplateElementType >::getMemPolicy(), te::common::GetPhysProcNumber(), te::rp::TiePointsLocator::ExecuteMatchingByCorrelationThreadEntryParams::m_corrMatrixPtr, te::rp::TiePointsLocator::MatchedInterestPointsT::m_feature, te::rp::TiePointsLocator::ExecuteMatchingByCorrelationThreadEntryParams::m_featuresSet1Ptr, te::rp::TiePointsLocator::ExecuteMatchingByCorrelationThreadEntryParams::m_featuresSet2Ptr, te::rp::TiePointsLocator::ExecuteMatchingByCorrelationThreadEntryParams::m_interestPointsSet1Ptr, te::rp::TiePointsLocator::ExecuteMatchingByCorrelationThreadEntryParams::m_interestPointsSet2Ptr, te::rp::TiePointsLocator::ExecuteMatchingByCorrelationThreadEntryParams::m_maxPt1ToPt2Distance, te::rp::TiePointsLocator::ExecuteMatchingByCorrelationThreadEntryParams::m_nextFeatureIdx1ToProcessPtr, te::rp::TiePointsLocator::MatchedInterestPointsT::m_point1, te::rp::TiePointsLocator::MatchedInterestPointsT::m_point2, te::rp::TiePointsLocator::ExecuteMatchingByCorrelationThreadEntryParams::m_syncMutexPtr, te::rp::Matrix< TemplateElementType >::RAMMemPol, te::rp::Matrix< TemplateElementType >::reset(), and TERP_TRUE_OR_RETURN_FALSE.
Referenced by executeMoravec().
|
staticprotected |
Correlation/Euclidean match thread entry.
paramsPtr | A pointer to the thread parameters. |
Definition at line 3787 of file TiePointsLocator.cpp.
References te::rp::Matrix< TemplateElementType >::getColumnsNumber(), te::rp::Matrix< TemplateElementType >::getLinesNumber(), te::rp::Matrix< TemplateElementType >::getMemPolicy(), te::sam::rtree::Index< DATATYPE, MAXNODES, MINNODES >::insert(), te::rp::TiePointsLocator::ExecuteMatchingByCorrelationThreadEntryParams::m_corrMatrixPtr, te::rp::TiePointsLocator::ExecuteMatchingByCorrelationThreadEntryParams::m_featuresSet1Ptr, te::rp::TiePointsLocator::ExecuteMatchingByCorrelationThreadEntryParams::m_featuresSet2Ptr, te::rp::TiePointsLocator::ExecuteMatchingByCorrelationThreadEntryParams::m_interestPointsSet1Ptr, te::rp::TiePointsLocator::ExecuteMatchingByCorrelationThreadEntryParams::m_interestPointsSet2Ptr, te::gm::Envelope::m_llx, te::gm::Envelope::m_lly, te::rp::TiePointsLocator::ExecuteMatchingByCorrelationThreadEntryParams::m_maxPt1ToPt2Distance, te::rp::TiePointsLocator::ExecuteMatchingByCorrelationThreadEntryParams::m_nextFeatureIdx1ToProcessPtr, te::rp::TiePointsLocator::ExecuteMatchingByCorrelationThreadEntryParams::m_syncMutexPtr, te::gm::Envelope::m_urx, te::gm::Envelope::m_ury, te::rp::TiePointsLocator::InterestPointT::m_x, te::rp::TiePointsLocator::InterestPointT::m_y, te::rp::Matrix< TemplateElementType >::RAMMemPol, and te::sam::rtree::Index< DATATYPE, MAXNODES, MINNODES >::search().
Referenced by executeMatchingByCorrelation().
|
staticprotected |
Match each feature using eucliean distance.
featuresSet1 | Features set 1. |
featuresSet2 | Features set 2. |
interestPointsSet1 | The interest pionts set 1. |
interestPointsSet2 | The interest pionts set 2. |
maxPt1ToPt2PixelDistance | Zero (disabled) or the maximum distance (pixels) between a point from set 1 to a point from set 1 (points beyond this distance will not be correlated and will have zero as correlation value). |
maxEuclideanDist | //!< The maximum acceptable euclidean distance when matching features. |
enableMultiThread | Enable/disable the use of threads. |
matchedPoints | The matched points. |
Definition at line 3921 of file TiePointsLocator.cpp.
References executeMatchingByEuclideanDistThreadEntry(), te::rp::Matrix< TemplateElementType >::getColumnsNumber(), te::rp::Matrix< TemplateElementType >::getLinesNumber(), te::rp::Matrix< TemplateElementType >::getMemPolicy(), te::common::GetPhysProcNumber(), te::rp::TiePointsLocator::ExecuteMatchingByEuclideanDistThreadEntryParams::m_distMatrixPtr, te::rp::TiePointsLocator::MatchedInterestPointsT::m_feature, te::rp::TiePointsLocator::ExecuteMatchingByEuclideanDistThreadEntryParams::m_featuresSet1Ptr, te::rp::TiePointsLocator::ExecuteMatchingByEuclideanDistThreadEntryParams::m_featuresSet2Ptr, te::rp::TiePointsLocator::ExecuteMatchingByEuclideanDistThreadEntryParams::m_interestPointsSet1Ptr, te::rp::TiePointsLocator::ExecuteMatchingByEuclideanDistThreadEntryParams::m_interestPointsSet2Ptr, te::rp::TiePointsLocator::ExecuteMatchingByEuclideanDistThreadEntryParams::m_maxPt1ToPt2Distance, te::rp::TiePointsLocator::ExecuteMatchingByEuclideanDistThreadEntryParams::m_nextFeatureIdx1ToProcessPtr, te::rp::TiePointsLocator::MatchedInterestPointsT::m_point1, te::rp::TiePointsLocator::MatchedInterestPointsT::m_point2, te::rp::TiePointsLocator::ExecuteMatchingByEuclideanDistThreadEntryParams::m_syncMutexPtr, te::rp::Matrix< TemplateElementType >::RAMMemPol, te::rp::Matrix< TemplateElementType >::reset(), and TERP_TRUE_OR_RETURN_FALSE.
Referenced by executeSurf().
|
staticprotected |
Correlation/Euclidean match thread entry.
paramsPtr | A pointer to the thread parameters. |
Definition at line 4089 of file TiePointsLocator.cpp.
References te::rp::Matrix< TemplateElementType >::getColumnsNumber(), te::rp::Matrix< TemplateElementType >::getLinesNumber(), te::rp::Matrix< TemplateElementType >::getMemPolicy(), te::sam::rtree::Index< DATATYPE, MAXNODES, MINNODES >::insert(), te::rp::TiePointsLocator::ExecuteMatchingByEuclideanDistThreadEntryParams::m_distMatrixPtr, te::rp::TiePointsLocator::ExecuteMatchingByEuclideanDistThreadEntryParams::m_featuresSet1Ptr, te::rp::TiePointsLocator::ExecuteMatchingByEuclideanDistThreadEntryParams::m_featuresSet2Ptr, te::rp::TiePointsLocator::ExecuteMatchingByEuclideanDistThreadEntryParams::m_interestPointsSet1Ptr, te::rp::TiePointsLocator::ExecuteMatchingByEuclideanDistThreadEntryParams::m_interestPointsSet2Ptr, te::gm::Envelope::m_llx, te::gm::Envelope::m_lly, te::rp::TiePointsLocator::ExecuteMatchingByEuclideanDistThreadEntryParams::m_maxPt1ToPt2Distance, te::rp::TiePointsLocator::ExecuteMatchingByEuclideanDistThreadEntryParams::m_nextFeatureIdx1ToProcessPtr, te::rp::TiePointsLocator::ExecuteMatchingByEuclideanDistThreadEntryParams::m_syncMutexPtr, te::gm::Envelope::m_urx, te::gm::Envelope::m_ury, te::rp::TiePointsLocator::InterestPointT::m_x, te::rp::TiePointsLocator::InterestPointT::m_y, te::rp::Matrix< TemplateElementType >::RAMMemPol, and te::sam::rtree::Index< DATATYPE, MAXNODES, MINNODES >::search().
Referenced by executeMatchingByEuclideanDist().
|
protected |
Executes the Moravec algorithm using the supplied parameters.
raster1XRescFact | The X axis rescale factor to be aplied into raster 1. |
raster1YRescFact | The Y axis rescale factor to be aplied into raster 1. |
raster2XRescFact | The X axis rescale factor to be aplied into raster 2. |
raster2YRescFact | The Y axis rescale factor to be aplied into raster 2. |
progressPtr | A pointer to the progress instance or a NULL pointer if it is not used. |
raster1Data | The raster 1 loaded data. |
maskRaster1Data | The mask raster 1 loaded data. |
outParamsPtr | Output parameters pointer. |
tiePointsWeights | Ouptut tie-points weights. |
Definition at line 367 of file TiePointsLocator.cpp.
References applyMeanFilter(), te::rp::Matrix< TemplateElementType >::AutoMemPol, te::rp::Matrix< TemplateElementType >::clear(), executeMatchingByCorrelation(), generateCorrelationFeatures(), te::rp::Matrix< TemplateElementType >::getLinesNumber(), loadRasterData(), locateMoravecInterestPoints(), te::rp::TiePointsLocator::InputParameters::m_enableMultiThread, te::rp::TiePointsLocator::InputParameters::m_inMaskRaster1Ptr, te::rp::TiePointsLocator::InputParameters::m_inMaskRaster2Ptr, m_inputParameters, te::rp::TiePointsLocator::InputParameters::m_inRaster1Bands, te::rp::TiePointsLocator::InputParameters::m_inRaster1Ptr, te::rp::TiePointsLocator::InputParameters::m_inRaster2Bands, te::rp::TiePointsLocator::InputParameters::m_inRaster2Ptr, te::rp::TiePointsLocator::InputParameters::m_interpMethod, te::rp::TiePointsLocator::InputParameters::m_maxR1ToR2Offset, te::rp::TiePointsLocator::InputParameters::m_maxTiePoints, te::rp::TiePointsLocator::InputParameters::m_moravecCorrelationWindowWidth, te::rp::TiePointsLocator::InputParameters::m_moravecGaussianFilterIterations, te::rp::TiePointsLocator::InputParameters::m_moravecMinAbsCorrelation, te::rp::TiePointsLocator::InputParameters::m_moravecWindowWidth, te::rp::TiePointsLocator::InputParameters::m_raster1TargetAreaColStart, te::rp::TiePointsLocator::InputParameters::m_raster1TargetAreaHeight, te::rp::TiePointsLocator::InputParameters::m_raster1TargetAreaLineStart, te::rp::TiePointsLocator::InputParameters::m_raster1TargetAreaWidth, te::rp::TiePointsLocator::InputParameters::m_raster2TargetAreaColStart, te::rp::TiePointsLocator::InputParameters::m_raster2TargetAreaHeight, te::rp::TiePointsLocator::InputParameters::m_raster2TargetAreaLineStart, te::rp::TiePointsLocator::InputParameters::m_raster2TargetAreaWidth, te::rp::Matrix< TemplateElementType >::RAMMemPol, te::rp::Matrix< TemplateElementType >::reset(), and TERP_TRUE_OR_RETURN_FALSE.
Referenced by execute().
|
protected |
Executes the SURF algorithm using the supplied parameters.
raster1XRescFact | The X axis rescale factor to be aplied into raster 1. |
raster1YRescFact | The Y axis rescale factor to be aplied into raster 1. |
raster2XRescFact | The X axis rescale factor to be aplied into raster 2. |
raster2YRescFact | The Y axis rescale factor to be aplied into raster 2. |
progressPtr | A pointer to the progress instance or a NULL pointer if it is not used. |
raster1Data | The raster 1 loaded data. |
maskRaster1Data | The mask raster 1 loaded data. |
outParamsPtr | Output parameters pointer. |
tiePointsWeights | Ouptut tie-points weights. |
Definition at line 744 of file TiePointsLocator.cpp.
References createIntegralImage(), executeMatchingByEuclideanDist(), generateSurfFeatures(), te::rp::Matrix< TemplateElementType >::getLinesNumber(), loadRasterData(), locateSurfInterestPoints(), te::rp::TiePointsLocator::InputParameters::m_enableMultiThread, te::rp::TiePointsLocator::InputParameters::m_inMaskRaster1Ptr, te::rp::TiePointsLocator::InputParameters::m_inMaskRaster2Ptr, m_inputParameters, te::rp::TiePointsLocator::InputParameters::m_inRaster1Bands, te::rp::TiePointsLocator::InputParameters::m_inRaster1Ptr, te::rp::TiePointsLocator::InputParameters::m_inRaster2Bands, te::rp::TiePointsLocator::InputParameters::m_inRaster2Ptr, te::rp::TiePointsLocator::InputParameters::m_interpMethod, te::rp::TiePointsLocator::InputParameters::m_maxR1ToR2Offset, te::rp::TiePointsLocator::InputParameters::m_maxTiePoints, te::rp::TiePointsLocator::InputParameters::m_raster1TargetAreaColStart, te::rp::TiePointsLocator::InputParameters::m_raster1TargetAreaHeight, te::rp::TiePointsLocator::InputParameters::m_raster1TargetAreaLineStart, te::rp::TiePointsLocator::InputParameters::m_raster1TargetAreaWidth, te::rp::TiePointsLocator::InputParameters::m_raster2TargetAreaColStart, te::rp::TiePointsLocator::InputParameters::m_raster2TargetAreaHeight, te::rp::TiePointsLocator::InputParameters::m_raster2TargetAreaLineStart, te::rp::TiePointsLocator::InputParameters::m_raster2TargetAreaWidth, te::rp::TiePointsLocator::InputParameters::m_surfMaxNormEuclideanDist, and TERP_TRUE_OR_RETURN_FALSE.
Referenced by execute().
|
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 3559 of file TiePointsLocator.cpp.
References te::rp::Matrix< TemplateElementType >::getColumnsNumber(), te::rp::Matrix< TemplateElementType >::getLinesNumber(), te::rst::RasterFactory::make(), MAX, MIN, te::rst::RedCInt, TERP_TRUE_OR_THROW, and te::dt::UCHAR_TYPE.
|
staticprotected |
Generate correlation features ( normalized - unit vector ) matrix for the given interes points.
interestPoints | The interest points (coords related to rasterData lines/cols). |
correlationWindowWidth | The correlation window width used to correlate points between the images. |
rasterData | The loaded raster data. |
features | The generated features matrix (one feature per line, one feature per interes point). |
validInteresPoints | The valid interest pionts related to each feature inside the features matrix (some interest points may be invalid and are removed). |
Definition at line 2972 of file TiePointsLocator.cpp.
References te::rp::Matrix< TemplateElementType >::getColumnsNumber(), te::rp::Matrix< TemplateElementType >::getLinesNumber(), te::rp::Matrix< TemplateElementType >::reset(), ROUND, and TERP_TRUE_OR_RETURN_FALSE.
Referenced by executeMoravec().
|
staticprotected |
Generate a Surf features matrix for the given interes points.
interestPoints | The interest points (coords related to rasterData lines/cols). |
integralRasterData | The integral raster data. |
validInterestPoints | The valid interest points. |
features | The generated features matrix (one feature per line, one feature per interest point). |
Definition at line 3244 of file TiePointsLocator.cpp.
References te::rp::Matrix< TemplateElementType >::getColumnsNumber(), getHaarXVectorIntensity(), getHaarYVectorIntensity(), te::rp::Matrix< TemplateElementType >::getLinesNumber(), te::rp::Matrix< TemplateElementType >::reset(), ROUND, TERP_DEBUG_TRUE_OR_THROW, and TERP_TRUE_OR_RETURN_FALSE.
Referenced by executeSurf().
|
inlinestaticprotected |
Return a Haar X intesity vector for the window centered at the given point.
buffer | Integral image buffer. |
centerX | Center X. |
centerY | Center Y. |
radius | Window radius. |
Definition at line 1080 of file TiePointsLocator.h.
Referenced by generateSurfFeatures().
|
inlinestaticprotected |
Return a Haar Y intesity vector for the window centered at the given point.
buffer | Integral image buffer. |
centerX | Center X. |
centerY | Center Y. |
radius | Window radius. |
Definition at line 1112 of file TiePointsLocator.h.
Referenced by generateSurfFeatures().
|
inlinestaticprotected |
Return a sum of all pixels inside a box over the given integral image buffer.
bufferPtr | Buffer pointer. |
upperLeftX | Box upper left X. |
upperLeftY | Box upper left Y. |
lowerRightX | Box lower right X. |
lowerRightY | Box lower right X. |
Definition at line 943 of file TiePointsLocator.h.
|
inlinestaticprotected |
Return a SURF box filter Dyy derivative centered over the given position from the given integral image buffer.
bufferPtr | Buffer pointer. |
centerX | Center X. |
centerY | Center Y. |
lobeWidth | Filter lobe width. |
lobeRadius | Filter lobe radius. |
Definition at line 999 of file TiePointsLocator.h.
Referenced by locateSurfInterestPointsThreadEntry().
|
inlinestaticprotected |
Return a SURF box filter Dxy derivative centered over the given position from the given integral image buffer.
bufferPtr | Buffer pointer. |
centerX | Center X. |
centerY | Center Y. |
lobeWidth | Filter lobe width. |
Definition at line 1030 of file TiePointsLocator.h.
Referenced by locateSurfInterestPointsThreadEntry().
|
inlinestaticprotected |
Return a SURF box filter Dxx derivative centered over the given position from the given integral image buffer.
bufferPtr | Buffer pointer. |
centerX | Center X. |
centerY | Center Y. |
lobeWidth | Filter lobe width. |
lobeRadius | Filter lobe radius. |
Definition at line 966 of file TiePointsLocator.h.
Referenced by locateSurfInterestPointsThreadEntry().
|
inlinestaticprotected |
Return the surf octave filter size (width).
octaveIndex | Octave index (starting from zero). |
scaleIndex | Scale index (starting from zero). |
Definition at line 1159 of file TiePointsLocator.h.
Referenced by initialize(), locateSurfInterestPoints(), and locateSurfInterestPointsThreadEntry().
|
inlinestaticprotected |
Return the surf octave base filter size (width).
octaveIndex | Octave index (starting from zero). |
Definition at line 1147 of file TiePointsLocator.h.
|
inlinestaticprotected |
Return the surf octave filter step size (width).
octaveIndex | Octave index (starting from zero). |
Definition at line 1137 of file TiePointsLocator.h.
|
virtual |
Initialize the algorithm instance making it ready for execution.
inputParams | Input parameters. |
Implements te::rp::Algorithm.
Definition at line 1112 of file TiePointsLocator.cpp.
References te::common::AbstractFactory< GeometricTransformation, std::string >::find(), te::rst::Raster::getAccessPolicy(), te::rst::Raster::getNumberOfBands(), te::rst::Raster::getNumberOfColumns(), te::rst::Raster::getNumberOfRows(), getSurfFilterSize(), te::common::GetTotalPhysicalMemory(), te::common::GetTotalVirtualMemory(), te::common::GetUsedVirtualMemory(), te::rp::TiePointsLocator::InputParameters::m_geometryFilterAssurance, te::rp::TiePointsLocator::InputParameters::m_geomTransfMaxError, te::rp::TiePointsLocator::InputParameters::m_geomTransfName, te::rp::TiePointsLocator::InputParameters::m_inMaskRaster1Ptr, te::rp::TiePointsLocator::InputParameters::m_inMaskRaster2Ptr, m_inputParameters, te::rp::TiePointsLocator::InputParameters::m_inRaster1Bands, te::rp::TiePointsLocator::InputParameters::m_inRaster1Ptr, te::rp::TiePointsLocator::InputParameters::m_inRaster2Bands, te::rp::TiePointsLocator::InputParameters::m_inRaster2Ptr, te::rp::TiePointsLocator::InputParameters::m_interesPointsLocationStrategy, m_isInitialized, te::rp::TiePointsLocator::InputParameters::m_maxTiePoints, te::rp::TiePointsLocator::InputParameters::m_moravecCorrelationWindowWidth, te::rp::TiePointsLocator::InputParameters::m_moravecMinAbsCorrelation, te::rp::TiePointsLocator::InputParameters::m_moravecWindowWidth, te::rp::TiePointsLocator::InputParameters::m_pixelSizeXRelation, te::rp::TiePointsLocator::InputParameters::m_pixelSizeYRelation, te::rp::TiePointsLocator::InputParameters::m_raster1TargetAreaColStart, te::rp::TiePointsLocator::InputParameters::m_raster1TargetAreaHeight, te::rp::TiePointsLocator::InputParameters::m_raster1TargetAreaLineStart, te::rp::TiePointsLocator::InputParameters::m_raster1TargetAreaWidth, te::rp::TiePointsLocator::InputParameters::m_raster2TargetAreaColStart, te::rp::TiePointsLocator::InputParameters::m_raster2TargetAreaHeight, te::rp::TiePointsLocator::InputParameters::m_raster2TargetAreaLineStart, te::rp::TiePointsLocator::InputParameters::m_raster2TargetAreaWidth, te::rp::TiePointsLocator::InputParameters::m_rastersRescaleFactor, te::rp::TiePointsLocator::InputParameters::m_surfMaxNormEuclideanDist, te::rp::TiePointsLocator::InputParameters::m_surfOctavesNumber, te::rp::TiePointsLocator::InputParameters::m_surfScalesNumber, te::rp::TiePointsLocator::InputParameters::MoravecStrategyT, te::common::RAccess, reset(), te::rp::TiePointsLocator::InputParameters::SurfStrategyT, TERP_LOG_AND_RETURN_FALSE, and TERP_TRUE_OR_RETURN_FALSE.
Referenced by te::rp::SequenceMosaic::execute(), te::rp::GeometricRefining::execute(), te::qt::widgets::TiePointsLocatorDialog::on_autoAcquireTiePointsPushButton_clicked(), and te::qt::widgets::TiePointLocatorWidget::onAutoAcquireTiePointsToolButtonClicked().
|
virtual |
Returns true if the algorithm instance is initialized and ready for execution.
Implements te::rp::Algorithm.
Definition at line 1439 of file TiePointsLocator.cpp.
References m_isInitialized.
|
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. |
rescaleFactorX | Scale factor to be applied on the loaded data. |
rescaleFactorY | 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. |
Definition at line 1444 of file TiePointsLocator.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 executeMoravec(), and executeSurf().
|
staticprotected |
Moravec interest points locator.
rasterData | The loaded raster data. |
maskRasterDataPtr | The loaded mask raster data pointer (or zero if no mask is avaliable). |
moravecWindowWidth | Moravec window width. |
maxInterestPoints | The maximum number of interest points to find over raster 1. |
enableMultiThread | Enable/disable multi-thread. |
interestPoints | The found interest points (coords related to rasterData lines/cols). |
Definition at line 1607 of file TiePointsLocator.cpp.
References te::rp::Matrix< TemplateElementType >::getColumnsNumber(), te::rp::Matrix< TemplateElementType >::getLinesNumber(), te::common::GetPhysProcNumber(), locateMoravecInterestPointsThreadEntry(), te::rp::TiePointsLocator::MoravecLocatorThreadParams::m_interestPointsAccessMutexPtr, te::rp::TiePointsLocator::MoravecLocatorThreadParams::m_interestPointsPtr, te::rp::TiePointsLocator::MoravecLocatorThreadParams::m_maskRasterDataPtr, te::rp::TiePointsLocator::MoravecLocatorThreadParams::m_maxInterestPointsPerRasterLinesBlock, te::rp::TiePointsLocator::MoravecLocatorThreadParams::m_maxRasterLinesBlockMaxSize, te::rp::TiePointsLocator::MoravecLocatorThreadParams::m_moravecWindowWidth, te::rp::TiePointsLocator::MoravecLocatorThreadParams::m_nextRasterLinesBlockToProcessValuePtr, te::rp::TiePointsLocator::MoravecLocatorThreadParams::m_rastaDataAccessMutexPtr, te::rp::TiePointsLocator::MoravecLocatorThreadParams::m_rasterDataPtr, and te::rp::TiePointsLocator::MoravecLocatorThreadParams::m_returnValuePtr.
Referenced by executeMoravec().
|
staticprotected |
Movavec locator thread entry.
paramsPtr | A pointer to the thread parameters. |
Definition at line 1676 of file TiePointsLocator.cpp.
References te::rp::Matrix< TemplateElementType >::getColumnsNumber(), te::rp::Matrix< TemplateElementType >::getLinesNumber(), te::rp::TiePointsLocator::InterestPointT::m_feature1, te::rp::TiePointsLocator::MoravecLocatorThreadParams::m_interestPointsAccessMutexPtr, te::rp::TiePointsLocator::MoravecLocatorThreadParams::m_interestPointsPtr, te::rp::TiePointsLocator::MoravecLocatorThreadParams::m_maskRasterDataPtr, te::rp::TiePointsLocator::MoravecLocatorThreadParams::m_maxInterestPointsPerRasterLinesBlock, te::rp::TiePointsLocator::MoravecLocatorThreadParams::m_maxRasterLinesBlockMaxSize, te::rp::TiePointsLocator::MoravecLocatorThreadParams::m_moravecWindowWidth, te::rp::TiePointsLocator::MoravecLocatorThreadParams::m_nextRasterLinesBlockToProcessValuePtr, te::rp::TiePointsLocator::MoravecLocatorThreadParams::m_rastaDataAccessMutexPtr, te::rp::TiePointsLocator::MoravecLocatorThreadParams::m_rasterDataPtr, te::rp::TiePointsLocator::MoravecLocatorThreadParams::m_returnValuePtr, te::rp::TiePointsLocator::InterestPointT::m_x, te::rp::TiePointsLocator::InterestPointT::m_y, te::rp::Matrix< TemplateElementType >::RAMMemPol, te::rp::Matrix< TemplateElementType >::reset(), and roolUpBuffer().
Referenced by locateMoravecInterestPoints().
|
protected |
SURF interest points locator.
integralRasterData | Integral image raster data. |
maskRasterDataPtr | The loaded mask raster data pointer (or zero if no mask is avaliable). |
interestPoints | The found interest points (coords related to rasterData lines/cols). |
Definition at line 2001 of file TiePointsLocator.cpp.
References te::rp::Matrix< TemplateElementType >::getLinesNumber(), te::common::GetPhysProcNumber(), getSurfFilterSize(), locateSurfInterestPointsThreadEntry(), te::rp::TiePointsLocator::InputParameters::m_enableMultiThread, m_inputParameters, te::rp::TiePointsLocator::SurfLocatorThreadParams::m_integralRasterDataPtr, te::rp::TiePointsLocator::SurfLocatorThreadParams::m_interestPointsAccessMutexPtr, te::rp::TiePointsLocator::SurfLocatorThreadParams::m_interestPointsPtr, te::rp::TiePointsLocator::SurfLocatorThreadParams::m_maskRasterDataPtr, te::rp::TiePointsLocator::SurfLocatorThreadParams::m_maxInterestPointsPerRasterLinesBlock, te::rp::TiePointsLocator::SurfLocatorThreadParams::m_maxRasterLinesBlockMaxSize, te::rp::TiePointsLocator::InputParameters::m_maxTiePoints, te::rp::TiePointsLocator::SurfLocatorThreadParams::m_nextRasterLinesBlockToProcessValuePtr, te::rp::TiePointsLocator::SurfLocatorThreadParams::m_octavesNumber, te::rp::TiePointsLocator::SurfLocatorThreadParams::m_rastaDataAccessMutexPtr, te::rp::TiePointsLocator::SurfLocatorThreadParams::m_returnValuePtr, te::rp::TiePointsLocator::SurfLocatorThreadParams::m_scalesNumber, te::rp::TiePointsLocator::InputParameters::m_surfOctavesNumber, and te::rp::TiePointsLocator::InputParameters::m_surfScalesNumber.
Referenced by executeSurf().
|
staticprotected |
Surf locator thread entry.
paramsPtr | A pointer to the thread parameters. |
Definition at line 2071 of file TiePointsLocator.cpp.
References te::rp::Matrix< TemplateElementType >::getColumnsNumber(), te::rp::Matrix< TemplateElementType >::getLinesNumber(), getSurfDxxDerivative(), getSurfDxyDerivative(), getSurfDyyDerivative(), getSurfFilterSize(), te::rp::TiePointsLocator::InterestPointT::m_feature1, te::rp::TiePointsLocator::InterestPointT::m_feature2, te::rp::TiePointsLocator::InterestPointT::m_feature3, te::rp::TiePointsLocator::SurfLocatorThreadParams::m_integralRasterDataPtr, te::rp::TiePointsLocator::SurfLocatorThreadParams::m_interestPointsAccessMutexPtr, te::rp::TiePointsLocator::SurfLocatorThreadParams::m_interestPointsPtr, te::rp::TiePointsLocator::SurfLocatorThreadParams::m_maskRasterDataPtr, te::rp::TiePointsLocator::SurfLocatorThreadParams::m_maxInterestPointsPerRasterLinesBlock, te::rp::TiePointsLocator::SurfLocatorThreadParams::m_maxRasterLinesBlockMaxSize, te::rp::TiePointsLocator::SurfLocatorThreadParams::m_nextRasterLinesBlockToProcessValuePtr, te::rp::TiePointsLocator::SurfLocatorThreadParams::m_octavesNumber, te::rp::TiePointsLocator::SurfLocatorThreadParams::m_rastaDataAccessMutexPtr, te::rp::TiePointsLocator::SurfLocatorThreadParams::m_returnValuePtr, te::rp::TiePointsLocator::SurfLocatorThreadParams::m_scalesNumber, te::rp::TiePointsLocator::InterestPointT::m_x, te::rp::TiePointsLocator::InterestPointT::m_y, te::rp::Matrix< TemplateElementType >::RAMMemPol, te::rp::Matrix< TemplateElementType >::reset(), and roolUpBuffer().
Referenced by locateSurfInterestPoints().
|
staticprotected |
Print the given buffer to std::out.
buffer | Buffer pointer. |
nLines | Number of lines. |
nCols | Number of columns. |
Definition at line 4209 of file TiePointsLocator.cpp.
|
inlinestaticprotected |
Print the given matrix to std::out.
matrix | The given matrix. |
Definition at line 897 of file TiePointsLocator.h.
References te::rp::Matrix< TemplateElementType >::getColumnsNumber(), and te::rp::Matrix< TemplateElementType >::getLinesNumber().
|
virtual |
Clear all internal allocated objects and reset the algorithm to its initial state.
Implements te::rp::Algorithm.
Definition at line 1106 of file TiePointsLocator.cpp.
References m_inputParameters, m_isInitialized, and te::rp::TiePointsLocator::InputParameters::reset().
Referenced by initialize(), te::rp::TiePointsLocator::InputParameters::InputParameters(), loadRasterData(), te::rp::TiePointsLocator::InputParameters::operator=(), te::rp::TiePointsLocator::OutputParameters::operator=(), te::rp::TiePointsLocator::OutputParameters::OutputParameters(), TiePointsLocator(), te::rp::TiePointsLocator::InputParameters::~InputParameters(), and te::rp::TiePointsLocator::OutputParameters::~OutputParameters().
|
inlinestaticprotected |
RoolUp a buffer of lines.
bufferPtr | Buffer pointer. |
bufferLinesNumber | Buffer lines number. |
Definition at line 652 of file TiePointsLocator.h.
Referenced by locateMoravecInterestPointsThreadEntry(), and locateSurfInterestPointsThreadEntry().
|
inlinestaticprotected |
Fill a buffer with zeroes.
bufferPtr | Buffer pointer. |
bufferLinesNumber | Buffer lines number. |
bufferColsNumber | Buffer columns number. |
Definition at line 680 of file TiePointsLocator.h.
|
protected |
TiePointsLocator input execution parameters.
Definition at line 460 of file TiePointsLocator.h.
Referenced by execute(), executeMoravec(), executeSurf(), initialize(), locateSurfInterestPoints(), and reset().
|
protected |
Tells if this instance is initialized.
Definition at line 463 of file TiePointsLocator.h.
Referenced by execute(), initialize(), isInitialized(), and reset().