Tie-points locator SURF strategy. More...
#include <TiePointsLocatorSURFStrategy.h>
Classes | |
class | ExecuteMatchingByEuclideanDistThreadEntryParams |
The parameters passed to the executeMatchingByEuclideanDistThreadEntry method. More... | |
class | Parameters |
TiePointsLocator SURF strategy parameters. More... | |
class | SurfLocatorThreadParams |
The parameters passed to the surfLocatorThreadEntry method. More... | |
Public Member Functions | |
void | getDefaultSpecStrategyParams (std::auto_ptr< TiePointsLocatorStrategyParameters > &defaultSpecParamsPtr) const |
Returns a sub-sampled version of the given locator strategy specific input parameters. More... | |
void | getSubSampledSpecStrategyParams (const double subSampleOptimizationRescaleFactor, const TiePointsLocatorStrategyParameters &inputSpecParams, std::auto_ptr< TiePointsLocatorStrategyParameters > &subSampledSpecParamsPtr) const |
Returns a sub-sampled version of the given locator strategy specific input parameters. More... | |
~TiePointsLocatorSURFStrategy () | |
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 | executeMatchingByEuclideanDist (const FloatsMatrix &featuresSet1, const FloatsMatrix &featuresSet2, const InterestPointsSetT &interestPointsSet1, const InterestPointsSetT &interestPointsSet2, te::gm::GeometricTransformation const *const raster1ToRaster2TransfPtr, const double raster1ToRaster2TransfDMapError, MatchedInterestPointsSetT &matchedPoints) const |
Match each feature using eucliean distance. More... | |
unsigned int | getAutoMaxTiePointsNumber () const |
Returns a automatically calculated optimum maximum amount tie-points following the current parameters. More... | |
bool | getMatchedInterestPoints (te::gm::GeometricTransformation const *const raster1ToRaster2TransfPtr, const double raster1ToRaster2TransfDMapError, MatchedInterestPointsSetT &matchedInterestPoints) |
Try to find matched interest points. More... | |
bool | initialize (const te::rp::TiePointsLocatorInputParameters &inputParameters) |
Initialize the strategy. More... | |
bool | locateSurfInterestPoints (const unsigned int maxInterestPoints, const FloatsMatrix &integralRasterData, UCharsMatrix const *maskRasterDataPtr, InterestPointsSetT &interestPoints) const |
SURF interest points locator. More... | |
void | reset () |
Clear all internal allocated resources and go back to the initial not-initialized state. More... | |
TiePointsLocatorSURFStrategy () | |
Static Protected Member Functions | |
static bool | checkForDuplicatedInterestPoints (const InterestPointsSetT &interestPoints, double &x, double &y) |
Check for duplicated interest points. More... | |
static bool | createIntegralImage (const FloatsMatrix &inputData, FloatsMatrix &outputData) |
Create an integral image. More... | |
static void | createTifFromMatrix (const FloatsMatrix &rasterData, const InterestPointsSetT &interestPoints, const std::string &tifFileName) |
Moravec interest points locator. 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 | 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 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... | |
static void | locateSurfInterestPointsThreadEntry (SurfLocatorThreadParams *paramsPtr) |
Surf locator thread entry. More... | |
template<typename BufferElementT > | |
static void | roolUpBuffer (BufferElementT **bufferPtr, const unsigned int &bufferLinesNumber) |
RoolUp a buffer of lines. More... | |
Protected Attributes | |
te::rp::TiePointsLocatorInputParameters | m_inputParameters |
Input parameters. More... | |
bool | m_isInitialized |
true if this instance is initialized. More... | |
Friends | |
class | TiePointsLocatorSURFStrategyFactory |
Tie-points locator SURF strategy.
Definition at line 44 of file TiePointsLocatorSURFStrategy.h.
|
protectedinherited |
A matrix do store double values.
Definition at line 92 of file TiePointsLocatorStrategy.h.
|
protectedinherited |
A matrix do store float values.
Definition at line 86 of file TiePointsLocatorStrategy.h.
|
protectedinherited |
Interest points list container type
Definition at line 149 of file TiePointsLocatorStrategy.h.
|
protectedinherited |
Interest points set container type
Definition at line 145 of file TiePointsLocatorStrategy.h.
|
protectedinherited |
Matched interest points container type
Definition at line 192 of file TiePointsLocatorStrategy.h.
|
protectedinherited |
A matrix do store unsigned char values.
Definition at line 98 of file TiePointsLocatorStrategy.h.
te::rp::TiePointsLocatorSURFStrategy::~TiePointsLocatorSURFStrategy | ( | ) |
|
protected |
|
staticprotectedinherited |
Check for duplicated interest points.
x | The duplicated tie-points X coord. |
y | The duplicated tie-points Y coord. |
|
staticprotected |
Create an integral image.
inputData | The input data. |
outputData | The output data. |
|
staticprotectedinherited |
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. |
|
protected |
Match each feature using eucliean distance.
featuresSet1 | Features set 1. |
featuresSet2 | Features set 2. |
interestPointsSet1 | The interest pionts set 1 (full raster 1 indexed coods reference).. |
interestPointsSet2 | The interest pionts set 2 (full raster 1 indexed coods reference).. |
raster1ToRaster2TransfPtr | A pointer to a transformation 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. |
matchedPoints | The matched points. |
|
staticprotected |
Correlation/Euclidean match thread entry.
paramsPtr | A pointer to the thread parameters. |
|
staticprotectedinherited |
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. |
|
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). |
|
protectedvirtual |
Returns a automatically calculated optimum maximum amount tie-points following the current parameters.
Implements te::rp::TiePointsLocatorStrategy.
|
virtual |
Returns a sub-sampled version of the given locator strategy specific input parameters.
subSampleOptimizationRescaleFactor | Sub-sampled optimization tie-points search rescale factor. |
inputSpecParams | Input parameters (sub-sample factor 1). |
subSampledSpecParams | Sub-sampled parameters. |
Implements te::rp::TiePointsLocatorStrategy.
|
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 435 of file TiePointsLocatorSURFStrategy.h.
|
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 467 of file TiePointsLocatorSURFStrategy.h.
|
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 298 of file TiePointsLocatorSURFStrategy.h.
|
protectedvirtual |
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. |
Implements te::rp::TiePointsLocatorStrategy.
|
virtual |
Returns a sub-sampled version of the given locator strategy specific input parameters.
subSampleOptimizationRescaleFactor | Sub-sampled optimization tie-points search rescale factor. |
inputSpecParams | Input parameters (sub-sample factor 1). |
subSampledSpecParamsPtr | Sub-sampled parameters. |
Implements te::rp::TiePointsLocatorStrategy.
|
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 354 of file TiePointsLocatorSURFStrategy.h.
|
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 385 of file TiePointsLocatorSURFStrategy.h.
|
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 321 of file TiePointsLocatorSURFStrategy.h.
|
inlinestaticprotected |
Return the surf octave filter size (width).
octaveIndex | Octave index (starting from zero). |
scaleIndex | Scale index (starting from zero). |
Definition at line 514 of file TiePointsLocatorSURFStrategy.h.
|
inlinestaticprotected |
Return the surf octave base filter size (width).
octaveIndex | Octave index (starting from zero). |
Definition at line 502 of file TiePointsLocatorSURFStrategy.h.
|
inlinestaticprotected |
Return the surf octave filter step size (width).
octaveIndex | Octave index (starting from zero). |
Definition at line 492 of file TiePointsLocatorSURFStrategy.h.
|
protectedvirtual |
Initialize the strategy.
inputParameters | Input parameters. |
Implements te::rp::TiePointsLocatorStrategy.
|
staticprotectedinherited |
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. |
|
protected |
SURF interest points locator.
maxInterestPoints | The maximum number of interest points to find. |
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). |
|
staticprotected |
Surf locator thread entry.
paramsPtr | A pointer to the thread parameters. |
|
protectedvirtual |
Clear all internal allocated resources and go back to the initial not-initialized state.
Implements te::rp::TiePointsLocatorStrategy.
|
inlinestaticprotectedinherited |
RoolUp a buffer of lines.
bufferPtr | Buffer pointer. |
bufferLinesNumber | Buffer lines number. |
Definition at line 290 of file TiePointsLocatorStrategy.h.
|
friend |
Definition at line 46 of file TiePointsLocatorSURFStrategy.h.
|
protected |
Input parameters.
Definition at line 162 of file TiePointsLocatorSURFStrategy.h.
|
protected |
true if this instance is initialized.
Definition at line 160 of file TiePointsLocatorSURFStrategy.h.