Jafar
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Public Attributes
jafar::model3d::RansacLine2D Class Reference

ransac algorithm for extracting lines 2D More...


Detailed Description

ransac algorithm for extracting lines 2D

Definition at line 17 of file ransacLine2D.hpp.

#include <ransacLine2D.hpp>

Inheritance diagram for jafar::model3d::RansacLine2D:
Inheritance graph
[legend]

List of all members.

Public Member Functions

void fitSampleModel (std::vector< unsigned int > &sample_data_indices, Line2D &model)
 Fit the model(s) for the given sample.
double distance (const Line2D &model, unsigned int unIndex)
 Calculate the distance between the model and a data point.
bool isDegenerate (std::vector< unsigned int > &sample_data_indices)
 determine wether the selected sample can define a model or not
void setData (std::vector< Point2D > *pPoints, std::vector< int > *dataIndices)
 you MUST call this function with good value before using any other function

Public Attributes

std::vector< Point2D > * m_pPoints
 pointer to the vector of all point2D but we will consider only those pointed at by the indices in the dataIndices vector
std::vector< int > * m_pDataIndices
 vector contains indices of data point

Member Function Documentation

double jafar::model3d::RansacLine2D::distance ( const Line2D model,
unsigned int  unIndex 
) [virtual]

Calculate the distance between the model and a data point.

Ths function MUST be overloaded to fit to a distance between a model and a data point

Implements jafar::model3d::RANSAC< Line2D >.

void jafar::model3d::RansacLine2D::fitSampleModel ( std::vector< unsigned int > &  sample_data_indices,
Line2D model 
) [virtual]

Fit the model(s) for the given sample.

Returns:
the number of models found.

The sample_data_indices array will be of length sample_length, selecting the indices to be fit to from the subclass's data array.

Implements jafar::model3d::RANSAC< Line2D >.

bool jafar::model3d::RansacLine2D::isDegenerate ( std::vector< unsigned int > &  sample_data_indices) [virtual]

determine wether the selected sample can define a model or not

The default implementation return false always. If implemented, this function should determine wether the selected sample can define a model or not

Returns:
true if the sample can't define a model otherwize false.
Author:
Ayman

Reimplemented from jafar::model3d::RANSAC< Line2D >.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Wed Oct 15 2014 00:37:42 for Jafar by doxygen 1.7.6.1
LAAS-CNRS