Jafar
|
ransac algorithm for extracting lines 2D More...
ransac algorithm for extracting lines 2D
Definition at line 17 of file ransacLine2D.hpp.
#include <ransacLine2D.hpp>
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 |
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.
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
Reimplemented from jafar::model3d::RANSAC< Line2D >.
Generated on Wed Oct 15 2014 00:37:42 for Jafar by doxygen 1.7.6.1 |