#include <d_geo_pointset_2d.h>
|
| D_Geo_PointSet_2D () |
|
| D_Geo_PointSet_2D (vector< D_Geo_Point_2D > points) |
|
void | add_point (D_Geo_Point_2D P) |
|
void | add_point (double x, double y) |
|
void | add_point (double u, double v, double w) |
|
void | add_point (D_Geo_Line_2D L1, D_Geo_Line_2D L2) |
|
size_t | size () |
|
vector< D_Geo_Point_2D > | points () |
|
D_Geo_Point_2D | point (size_t i) |
|
D_Geo_Point_2D | point_random () |
| D_Geo_PointSet_2D::point_random returns a random point from the point set. More...
|
|
D_Geo_PointSet_2D | subset_random (double rel_size) |
| D_Geo_PointSet_2D::random_subset takes a subset of the line set for i.e. RANSAC methods. More...
|
|
RotatedRect | ellipse_fitted () |
| D_Geo_PointSet_2D::ellipse_fitted fit an ellipse to the point set. More...
|
|
RotatedRect | ellipse_pca_deviations () |
|
D_Geo_Point_2D | center () |
| D_Geo_PointSet_2D::center calc center of the point set. More...
|
|
D_Geo_Point_2D | center (double *std) |
|
D_Geo_Point_2D | center (double *std, vector< double > *v_residuals) |
|
double | standard_deviation (D_Geo_Point_2D P_reference) |
|
double | standard_deviation () |
| D_Geo_PointSet_2D::standard_deviation calcs the standard deviation to the center. More...
|
|
double | standard_deviation (D_Geo_Point_2D P_reference, vector< double > *v_residuals) |
|
D_Geo_PointSet_2D | centers_clusters_kmeans (size_t k, size_t iterations, double *deviation) |
|
D_Geo_PointSet_2D | centers_clusters_kmeans (size_t k, double *deviation) |
| D_Geo_PointSet_2D::centers_clusters_kmeans uses k-means to estimate k cluster centers. More...
|
|
D_Geo_PointSet_2D | centers_clusters_kmeans (D_Geo_PointSet_2D centers_initial, double *deviation) |
|
◆ D_Geo_PointSet_2D() [1/2]
D_Geo_PointSet_2D::D_Geo_PointSet_2D |
( |
| ) |
|
◆ D_Geo_PointSet_2D() [2/2]
D_Geo_PointSet_2D::D_Geo_PointSet_2D |
( |
vector< D_Geo_Point_2D > |
points | ) |
|
◆ add_point() [1/4]
◆ add_point() [2/4]
◆ add_point() [3/4]
void D_Geo_PointSet_2D::add_point |
( |
double |
u, |
|
|
double |
v, |
|
|
double |
w |
|
) |
| |
|
inline |
◆ add_point() [4/4]
void D_Geo_PointSet_2D::add_point |
( |
double |
x, |
|
|
double |
y |
|
) |
| |
|
inline |
◆ center() [1/3]
◆ center() [2/3]
◆ center() [3/3]
D_Geo_Point_2D D_Geo_PointSet_2D::center |
( |
double * |
std, |
|
|
vector< double > * |
v_residuals |
|
) |
| |
◆ centers_clusters_kmeans() [1/3]
clusters
initial clustering
iterate until optimum
calc resulting centers and remaining deviation
return resulting centers
◆ centers_clusters_kmeans() [2/3]
D_Geo_PointSet_2D D_Geo_PointSet_2D::centers_clusters_kmeans |
( |
size_t |
k, |
|
|
double * |
deviation |
|
) |
| |
D_Geo_PointSet_2D::centers_clusters_kmeans uses k-means to estimate k cluster centers.
guesses inital center points using simplified k-means++ (see this aticle for short explanation) This implementation is simplified: As initial centers the beyond the first, always the furthest point from the remaining distribution is chosen.
- Parameters
-
k | number of clusters |
deviation | remaining deviation |
- Returns
- cluster centers
init inital centers guess with a random point from the point set
other centers are the furthest point to all others (max dist to closest center)
execute k-means with given inital centers
◆ centers_clusters_kmeans() [3/3]
D_Geo_PointSet_2D D_Geo_PointSet_2D::centers_clusters_kmeans |
( |
size_t |
k, |
|
|
size_t |
iterations, |
|
|
double * |
deviation |
|
) |
| |
init best clustering
try iterations clusterings with different initializations
return best cluster centers
◆ ellipse_fitted()
◆ ellipse_pca_deviations()
RotatedRect D_Geo_PointSet_2D::ellipse_pca_deviations |
( |
| ) |
|
◆ point()
◆ point_random()
D_Geo_PointSet_2D::point_random returns a random point from the point set.
- Returns
- a random point from the point set
uniform distibution (range fitting to index max)
seed random generator
return a random point
◆ points()
◆ size()
size_t D_Geo_PointSet_2D::size |
( |
| ) |
|
|
inline |
◆ standard_deviation() [1/3]
double D_Geo_PointSet_2D::standard_deviation |
( |
| ) |
|
◆ standard_deviation() [2/3]
double D_Geo_PointSet_2D::standard_deviation |
( |
D_Geo_Point_2D |
P_reference | ) |
|
◆ standard_deviation() [3/3]
double D_Geo_PointSet_2D::standard_deviation |
( |
D_Geo_Point_2D |
P_reference, |
|
|
vector< double > * |
v_residuals |
|
) |
| |
◆ subset_random()
D_Geo_PointSet_2D::random_subset takes a subset of the line set for i.e. RANSAC methods.
- Parameters
-
percent | percentage of elemenets --> subset size |
- Returns
- subset of points
make sure rel_size is in range (0,1)
calc subset size
create vector of indices and shuffel it
create line subset
return subset
The documentation for this class was generated from the following files: