52 RansacImpl(
int min_params,
int max_params,
int sizeof_param,
int sizeof_model);
55 int _estimate(
void *params,
int param_c,
int support_limit,
int max_rounds,
void *model);
57 int _refine(
void *params,
62 char *inlier_mask = NULL);
64 virtual void _doEstimate(
void **params,
int param_c,
void *model){};
66 _doSupports(
void *param,
void *model)
74 RansacImpl(
int min_params,
int max_params,
int sizeof_model);
76 int _estimate(
int param_c,
int support_limit,
int max_rounds,
void *model);
79 _refine(
int param_c,
int support_limit,
int max_rounds,
void *model,
char *inlier_mask = NULL);
81 virtual void _doEstimate(
int *params,
int param_c,
void *model){};
83 _doSupports(
int param,
void *model)
172 template <
typename MODEL,
typename PARAMETER>
185 virtual void doEstimate(PARAMETER **params,
int param_c, MODEL *model) = 0;
206 doEstimate((PARAMETER **)params, param_c, (MODEL *)model);
215 return doSupports((PARAMETER *)param, (MODEL *)model);
232 :
RansacImpl(min_params, max_params, sizeof(PARAMETER), sizeof(MODEL))
261 estimate(PARAMETER *params,
int param_c,
int support_limit,
int max_rounds, MODEL *model)
263 return _estimate(params, param_c, support_limit, max_rounds, model);
291 char * inlier_mask = NULL)
293 return _refine(params, param_c, support_limit, max_rounds, model, inlier_mask);
355 template <
typename MODEL>
368 virtual void doEstimate(
int *params,
int param_c, MODEL *model) = 0;
442 estimate(
int param_c,
int support_limit,
int max_rounds, MODEL *model)
444 return _estimate(param_c, support_limit, max_rounds, model);
466 refine(
int param_c,
int support_limit,
int max_rounds, MODEL *model,
char *inlier_mask = NULL)
468 return _refine(param_c, support_limit, max_rounds, model, inlier_mask);
This file defines library export definitions, version numbers and build information.
Implementation of a general RANdom SAmple Consensus algorithm with implicit parameters.
IndexRansac(int min_params, int max_params)
Initialize the algorithm.
virtual bool doSupports(int param, MODEL *model)=0
Computes how well a parameters supports a model.
int refine(int param_c, int support_limit, int max_rounds, MODEL *model, char *inlier_mask=NULL)
Iteratively makes the estimated model better.
void _doEstimate(int *params, int param_c, void *model)
virtual void doEstimate(int *params, int param_c, MODEL *model)=0
Creates a model estimate from a set of parameters.
int estimate(int param_c, int support_limit, int max_rounds, MODEL *model)
Estimates a model from input data parameters.
bool _doSupports(int param, void *model)
Implementation of a general RANdom SAmple Consensus algorithm.
void _doEstimate(void **params, int param_c, void *model)
virtual void doEstimate(PARAMETER **params, int param_c, MODEL *model)=0
Creates a model estimate from a set of parameters.
bool _doSupports(void *param, void *model)
int refine(PARAMETER *params, int param_c, int support_limit, int max_rounds, MODEL *model, char *inlier_mask=NULL)
Iteratively makes the estimated model better.
Ransac(int min_params, int max_params)
Initialize the algorithm.
int estimate(PARAMETER *params, int param_c, int support_limit, int max_rounds, MODEL *model)
Estimates a model from input data parameters.
virtual bool doSupports(PARAMETER *param, MODEL *model)=0
Computes how well a parameters supports a model.
Internal implementation of RANSAC. Please use Ransac or IndexRansac.
int estimateRequiredRounds(float success_propability, float inlier_percentage)
How many rounds are needed for the Ransac to work.