te::gm::GTFilter Class Reference

2D Geometric transformation tie-points filter (outliers remotion). More...

#include <GTFilter.h>

Classes

class  ApplyRansacThreadEntryThreadParams
 Parameters used by the GTFilter::applyRansacThreadEntry method. More...
 
class  RansacSetData
 Parameters used by the GTFilter::applyRansacThreadEntry method. More...
 

Public Types

enum  RANSACAreaRestrictionType { RANSAC_NO_AREA_REST = 0, RANSAC_BBOX_AREA_REST = 1, RANSAC_CHULL_AREA_REST = 2 }
 
typedef long double RansacFloatCounterT
 RANSAC floating point counter type. More...
 
typedef unsigned long int RansacIntegerCounterT
 RANSAC integer counter type. More...
 

Public Member Functions

bool applyRansac (const std::string &transfName, const GTParameters &inputParams, const double allowedMaxDirectMapError, const double allowedMaxInverseMapError, const RansacIntegerCounterT &maxIterations, const bool enableMultiThread, const RANSACAreaRestrictionType areaRestT, const std::vector< double > &tiePointsWeights, std::vector< te::gm::GTParameters::TiePoint > &outTiePoints, std::unique_ptr< GeometricTransformation > &outTransf)
 Apply a RANSAC based outliers remotion strategy. More...
 
 GTFilter ()
 Default constructor. More...
 
 ~GTFilter ()
 Destructor. More...
 

Static Protected Member Functions

static void applyRansacThreadEntry (te::gm::GTFilter::ApplyRansacThreadEntryThreadParams *paramsPtr)
 Surf locator thread entry. More...
 
static RansacIntegerCounterT getExcpectedIterationsNumber (const unsigned int goodTPNumber, const unsigned int totalTPNumber, const unsigned int modelRequiredTPNumber)
 Returns the number of expected iterations to be performed. More...
 
static void getTPsConvexHullArea (const std::vector< GTParameters::TiePoint > &tiePoints, double &area1, double &area2)
 Returns the tie-points convex hull area. More...
 

Detailed Description

2D Geometric transformation tie-points filter (outliers remotion).

Definition at line 50 of file GTFilter.h.

Member Typedef Documentation

◆ RansacFloatCounterT

RANSAC floating point counter type.

Definition at line 58 of file GTFilter.h.

◆ RansacIntegerCounterT

typedef unsigned long int te::gm::GTFilter::RansacIntegerCounterT

RANSAC integer counter type.

Definition at line 55 of file GTFilter.h.

Member Enumeration Documentation

◆ RANSACAreaRestrictionType

Enumerator
RANSAC_NO_AREA_REST 

No area restriction.

RANSAC_BBOX_AREA_REST 

Preference will be given to tie-points groups with bigger bounding-box areas.

RANSAC_CHULL_AREA_REST 

Preference will be given to tie-points groups with bigger convex hull areas.

Definition at line 64 of file GTFilter.h.

Constructor & Destructor Documentation

◆ GTFilter()

te::gm::GTFilter::GTFilter ( )

Default constructor.

◆ ~GTFilter()

te::gm::GTFilter::~GTFilter ( )

Destructor.

Member Function Documentation

◆ applyRansac()

bool te::gm::GTFilter::applyRansac ( const std::string &  transfName,
const GTParameters inputParams,
const double  allowedMaxDirectMapError,
const double  allowedMaxInverseMapError,
const RansacIntegerCounterT maxIterations,
const bool  enableMultiThread,
const RANSACAreaRestrictionType  areaRestT,
const std::vector< double > &  tiePointsWeights,
std::vector< te::gm::GTParameters::TiePoint > &  outTiePoints,
std::unique_ptr< GeometricTransformation > &  outTransf 
)

Apply a RANSAC based outliers remotion strategy.

Parameters
transfNameTransformation name (see te::gm::GTFactory dictionary for reference).
inputParamsInput transformation parameters.
allowedMaxDirectMapErrorThe maximum allowed direct mapping error.
allowedMaxInverseMapErrorThe maximum allowed inverse mapping error.
maxIterationsThe maximum number of iterations (Use 0-zero to let this number be automatically found).
enableMultiThreadEnable multi-threaded processing (good for multi-processor or multi-core systems).
outTransfThe generated output transformation (with the base mininum required tie-points set).
tiePointsWeightsOptional tie-points weights (only positive values) or an empty vector if no weights must be used.
outTiePointsThe filtered output tie-points (non-outliers) in agreenment with the generated transformation.
areaRestTRANSAC area restriction type.
Returns
true if OK, false on errors.
Note
Reference: Martin A. Fischler and Robert C. Bolles, Random Sample Consensus: A Paradigm for Model Fitting with Applications to Image Analysis and Automated Cartography, Communications of the ACM archive, Volume 24, Issue 6 (June 1981).

◆ applyRansacThreadEntry()

static void te::gm::GTFilter::applyRansacThreadEntry ( te::gm::GTFilter::ApplyRansacThreadEntryThreadParams paramsPtr)
staticprotected

Surf locator thread entry.

Parameters
paramsPtrA pointer to the thread parameters.

◆ getExcpectedIterationsNumber()

static RansacIntegerCounterT te::gm::GTFilter::getExcpectedIterationsNumber ( const unsigned int  goodTPNumber,
const unsigned int  totalTPNumber,
const unsigned int  modelRequiredTPNumber 
)
staticprotected

Returns the number of expected iterations to be performed.

Parameters
goodTPNumberNumber of good tie-points.
totalTPNumberTotal number of tie-points.
modelRequiredTPNumberModel minimum required tie-points.
Returns
The number of expected iterations to be performed.

◆ getTPsConvexHullArea()

static void te::gm::GTFilter::getTPsConvexHullArea ( const std::vector< GTParameters::TiePoint > &  tiePoints,
double &  area1,
double &  area2 
)
staticprotected

Returns the tie-points convex hull area.

Parameters
area1GTParameters::TiePoint::first area.
area2GTParameters::TiePoint::second area.
tiePointsTie points.

The documentation for this class was generated from the following file: