Clustering related functions. More...
#include <mtt/mtt_clustering.h>
Go to the source code of this file.
Functions | |
void | calc_cluster_props (vector< t_clustersPtr > &clusters, t_data &data) |
void | calc_cluster_props (t_cluster **clusters, int size, t_data *data, t_config *) |
Calculates cluster properties. | |
void | calc_object_props (vector< t_objectPtr > &objects) |
Computes object properties, such as centroid and size. | |
void | clean_objets (vector< t_objectPtr > &objects) |
Frees memory associated with objects. | |
bool | clustering (t_data &data, vector< t_clustersPtr > &clustersPtr, t_config *config, t_flag *flags) |
t_cluster ** | clustering (t_data *data, int *count, t_config *config, t_flag *flags) |
Performs clustering operation. | |
double | ClusteringThreshold (double r1, double t1, double r2, double t2, t_config *config) |
bool | clusters2objects (vector< t_objectPtr > &objectsPtr, vector< t_clustersPtr > &clusters, t_data &data, t_config &config) |
Converts clusters of points into objects using recursive line fitting. | |
double | dietmayer_threshold (double r, t_config *config) |
Computes dietmayer clustering threshold. | |
void | FlagCollisionWithOcclusion (t_cluster **clusters, int object_size, t_data *data, t_config *) |
void | free_lines (vector< t_objectPtr > &objects) |
Removes lines from memory. | |
void | recursive_IEPF (t_objectPtr &object, t_data &data, int start, int end, t_config &config) |
Recursive iterative end point fit. Single step. | |
void | recursive_line_fitting (t_objectPtr &object, t_cluster &cluster, t_data &data, t_config &config) |
Recursive line fitting, complete process. | |
void | remove_border_points (t_cluster **clusters, int size, int npoints) |
Removes cluster border points. | |
void | remove_small_clusters (t_cluster **clusters, int *size, int threshold) |
Removes clusters based on their size. |
Clustering related functions.
Definition in file mtt_clustering.cpp.
void calc_cluster_props | ( | vector< t_clustersPtr > & | clusters, | |
t_data & | data | |||
) |
Definition at line 331 of file mtt_clustering.cpp.
Calculates cluster properties.
clusters | clusters to be drawn | |
size | number of clusters | |
data | general data storage vector | |
config | general config structure |
Definition at line 307 of file mtt_clustering.cpp.
void calc_object_props | ( | vector< t_objectPtr > & | objects | ) |
Computes object properties, such as centroid and size.
objects | list of objects |
Definition at line 378 of file mtt_clustering.cpp.
void clean_objets | ( | vector< t_objectPtr > & | objects | ) |
Frees memory associated with objects.
objects | Input objects |
Definition at line 418 of file mtt_clustering.cpp.
bool clustering | ( | t_data & | data, | |
vector< t_clustersPtr > & | clustersPtr, | |||
t_config * | config, | |||
t_flag * | flags | |||
) |
Definition at line 196 of file mtt_clustering.cpp.
Performs clustering operation.
data | general data storage vector | |
count | number of clusters | |
config | general config structure | |
flags | general flags structure |
Definition at line 113 of file mtt_clustering.cpp.
double ClusteringThreshold | ( | double | r1, | |
double | t1, | |||
double | r2, | |||
double | t2, | |||
t_config * | config | |||
) |
Definition at line 68 of file mtt_clustering.cpp.
bool clusters2objects | ( | vector< t_objectPtr > & | objectsPtr, | |
vector< t_clustersPtr > & | clusters, | |||
t_data & | data, | |||
t_config & | config | |||
) |
Converts clusters of points into objects using recursive line fitting.
objectsPtr | Output objects | |
clusters | Input clusters | |
data | Data points | |
config | general config structure |
Definition at line 355 of file mtt_clustering.cpp.
double dietmayer_threshold | ( | double | r, | |
t_config * | config | |||
) |
Computes dietmayer clustering threshold.
r | ||
config | general config structure |
Definition at line 97 of file mtt_clustering.cpp.
void FlagCollisionWithOcclusion | ( | t_cluster ** | clusters, | |
int | object_size, | |||
t_data * | data, | |||
t_config * | ||||
) |
Definition at line 34 of file mtt_clustering.cpp.
void free_lines | ( | vector< t_objectPtr > & | objects | ) |
Removes lines from memory.
objects | list of objects |
Definition at line 476 of file mtt_clustering.cpp.
void recursive_IEPF | ( | t_objectPtr & | object, | |
t_data & | data, | |||
int | start, | |||
int | end, | |||
t_config & | config | |||
) |
Recursive iterative end point fit. Single step.
object | single object | |
data | data points | |
start | start point | |
end | end point | |
config | general config structure |
This functions malloc a line to work with, each time it mallocs a line it increments the number of lines object data
Definition at line 423 of file mtt_clustering.cpp.
void recursive_line_fitting | ( | t_objectPtr & | object, | |
t_cluster & | cluster, | |||
t_data & | data, | |||
t_config & | config | |||
) |
Recursive line fitting, complete process.
object | single object | |
cluster | single cluster | |
data | data points | |
config | general config structure |
Definition at line 482 of file mtt_clustering.cpp.
void remove_border_points | ( | t_cluster ** | clusters, | |
int | size, | |||
int | npoints | |||
) |
Removes cluster border points.
clusters | clusters to be drawn | |
size | number of clusters | |
npoints | number of points to be removed |
Definition at line 291 of file mtt_clustering.cpp.
void remove_small_clusters | ( | t_cluster ** | clusters, | |
int * | size, | |||
int | threshold | |||
) |
Removes clusters based on their size.
clusters | clusters to be drawn | |
size | number of clusters | |
threshold | number of points a cluster must have not to be deleted |
Definition at line 270 of file mtt_clustering.cpp.