ImageD  v2_7_5 (24.06.22)
ImageD is an image processing software designed for rapid prototyping and implementing algorithms and solutions for science, research and teaching.
D_Geo_LineSet_2D Class Reference

#include <d_geo_lineset_2d.h>

Public Member Functions

 D_Geo_LineSet_2D ()
 
 D_Geo_LineSet_2D (vector< D_Geo_Line_2D > lines)
 
void add_line (D_Geo_Line_2D line)
 
void add_line_point_point (D_Geo_Point_2D P1, D_Geo_Point_2D P2)
 
void add_line_point_direction (D_Geo_Point_2D P_support, D_Geo_Point_2D direction)
 
void add_line_point_angle (D_Geo_Point_2D P_support, double angle_rad)
 
D_Geo_LineSet_2D subset_random (double rel_size)
 D_Geo_LineSet_2D::subset_random takes a subset of the line set for i.e. RANSAC methods. More...
 
D_Geo_Line_2D line (size_t i)
 
size_t size ()
 D_Geo_LineSet_2D::size number of lines in line set. More...
 
D_Geo_PointSet_2D intersections_pairwise ()
 D_Geo_LineSet_2D::intersections_pairwise calc pairwise intersections of lines in set. More...
 
D_Geo_Point_2D intersection (double *deviation)
 
D_Geo_Point_2D intersection (double *deviation, vector< double > *v_residuals)
 
D_Geo_Point_2D intersection_ransac (double *least_deviation, double lines_needed_for_modell_rel, double p_good_guess, double p_outliers, bool subset_of_points_not_lines)
 D_Geo_LineSet_2D::intersection_ransac Find best guess for intersections center of line set. More...
 
D_Geo_Point_2D intersection_ransac (double *least_deviation, double subset_size_rel, size_t iterations, bool subset_of_points_not_lines)
 D_Geo_LineSet_2D::intersection_ransac Find best guess for intersections center of line set. More...
 
D_Geo_Point_2D intersection_ransac (double *least_deviation, D_Geo_PointSet_2D *IntersectionsUsed, vector< double > *v_residuals, double subset_size_rel, size_t iterations, bool subset_of_points_not_lines)
 
D_Geo_PointSet_2D intersections_clustered_kmeans (double *deviation, size_t k, size_t iterations)
 
D_Geo_PointSet_2D intersections_clustered_kmeans_ransac (double *deviation, size_t clustering_k, size_t clustering_iterations, double ransac_subset_size_rel, size_t ransac_iterations)
 

Constructor & Destructor Documentation

◆ D_Geo_LineSet_2D() [1/2]

D_Geo_LineSet_2D::D_Geo_LineSet_2D ( )

◆ D_Geo_LineSet_2D() [2/2]

D_Geo_LineSet_2D::D_Geo_LineSet_2D ( vector< D_Geo_Line_2D lines)

Member Function Documentation

◆ add_line()

void D_Geo_LineSet_2D::add_line ( D_Geo_Line_2D  line)

◆ add_line_point_angle()

void D_Geo_LineSet_2D::add_line_point_angle ( D_Geo_Point_2D  P_support,
double  angle_rad 
)

◆ add_line_point_direction()

void D_Geo_LineSet_2D::add_line_point_direction ( D_Geo_Point_2D  P_support,
D_Geo_Point_2D  direction 
)

◆ add_line_point_point()

void D_Geo_LineSet_2D::add_line_point_point ( D_Geo_Point_2D  P1,
D_Geo_Point_2D  P2 
)

◆ intersection() [1/2]

D_Geo_Point_2D D_Geo_LineSet_2D::intersection ( double *  deviation)

◆ intersection() [2/2]

D_Geo_Point_2D D_Geo_LineSet_2D::intersection ( double *  deviation,
vector< double > *  v_residuals 
)

◆ intersection_ransac() [1/3]

D_Geo_Point_2D D_Geo_LineSet_2D::intersection_ransac ( double *  least_deviation,
D_Geo_PointSet_2D IntersectionsUsed,
vector< double > *  v_residuals,
double  subset_size_rel,
size_t  iterations,
bool  subset_of_points_not_lines 
)

init centers & stds top/current

get number of cpus

init random gen

init threads guesses

create & start threads

join threads and find best guess

return best guess

◆ intersection_ransac() [2/3]

D_Geo_Point_2D D_Geo_LineSet_2D::intersection_ransac ( double *  least_deviation,
double  lines_needed_for_modell_rel,
double  p_good_guess,
double  p_outliers,
bool  subset_of_points_not_lines 
)

D_Geo_LineSet_2D::intersection_ransac Find best guess for intersections center of line set.

Parameters
least_deviationremaining deviation in subset
lines_needed_for_modell_relrelative amount of lines needed for a good modell
p_good_guessprobability of getting a good modell (greater than 0, lower than 1)
p_outliersprobability of outliers
Returns
best guess for intersection of line set

parameters needed for try count calculation

needed number of tries

◆ intersection_ransac() [3/3]

D_Geo_Point_2D D_Geo_LineSet_2D::intersection_ransac ( double *  least_deviation,
double  subset_size_rel,
size_t  iterations,
bool  subset_of_points_not_lines 
)

D_Geo_LineSet_2D::intersection_ransac Find best guess for intersections center of line set.

Parameters
least_deviationremaining deviation in subset
subset_size_relrealtive subset size
iterationsnumber of trys (= count of subsets) to find center
Returns
best guess for intersection of line set

◆ intersections_clustered_kmeans()

D_Geo_PointSet_2D D_Geo_LineSet_2D::intersections_clustered_kmeans ( double *  deviation,
size_t  k,
size_t  iterations 
)

◆ intersections_clustered_kmeans_ransac()

D_Geo_PointSet_2D D_Geo_LineSet_2D::intersections_clustered_kmeans_ransac ( double *  deviation,
size_t  clustering_k,
size_t  clustering_iterations,
double  ransac_subset_size_rel,
size_t  ransac_iterations 
)

init centers & stds top/current

try iterations subsets

find best guesses for centers (k-means)

return best guess

◆ intersections_pairwise()

D_Geo_PointSet_2D D_Geo_LineSet_2D::intersections_pairwise ( )

D_Geo_LineSet_2D::intersections_pairwise calc pairwise intersections of lines in set.

Returns
set of intersection points

◆ line()

D_Geo_Line_2D D_Geo_LineSet_2D::line ( size_t  i)

◆ size()

size_t D_Geo_LineSet_2D::size ( )

D_Geo_LineSet_2D::size number of lines in line set.

Returns
number of lines

◆ subset_random()

D_Geo_LineSet_2D D_Geo_LineSet_2D::subset_random ( double  rel_size)

D_Geo_LineSet_2D::subset_random takes a subset of the line set for i.e. RANSAC methods.

Parameters
rel_sizepercent percentage of elemenets --> subset size
Returns
subset of lines

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: