Functions
mtt_clustering.h File Reference

Clustering related functions header. More...

#include "mtt.h"
Include dependency graph for mtt_clustering.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void _p (const char *text)
 
void calc_cluster_props (t_cluster **clusters, int size, t_data *data, t_config *config)
 Calculates cluster properties. More...
 
void calc_cluster_props (vector< t_clustersPtr > &clusters, t_data &data)
 
void calc_object_props (vector< t_objectPtr > &objects)
 Computes object properties, such as centroid and size. More...
 
void clean_objets (vector< t_objectPtr > &objects)
 Frees memory associated with objects. More...
 
t_cluster ** clustering (t_data *data, int *count, t_config *config, t_flag *flags)
 Performs clustering operation. More...
 
bool clustering (t_data &data, vector< t_clustersPtr > &clustersPtr, t_config *config, t_flag *flags)
 
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. More...
 
double dietmayer_threshold (double r, t_config *config)
 Computes dietmayer clustering threshold. More...
 
void FlagCollisionWithOcclusion (t_cluster **clusters, int object_size, t_data *data, t_config *config)
 
void free_lines (vector< t_objectPtr > &objects)
 Removes lines from memory. More...
 
double point2line_distance (double alpha, double ro, double x, double y)
 Calculates the line to point distance. More...
 
double point2point_distance (double xi, double yi, double xf, double yf)
 Calculates the distante between two points. More...
 
int real2print (double x, t_config *config)
 
void recursive_IEPF (t_objectPtr &object, t_data &data, int start, int end, t_config &config)
 Recursive iterative end point fit. Single step. More...
 
void recursive_line_fitting (t_objectPtr &object, t_cluster &cluster, t_data &data, t_config &config)
 Recursive line fitting, complete process. More...
 
void remove_border_points (t_cluster **clusters, int size, int npoints)
 Removes cluster border points. More...
 
void remove_small_clusters (t_cluster **clusters, int *size, int threshold)
 Removes clusters based on their size. More...
 

Detailed Description

Clustering related functions header.

Definition in file mtt_clustering.h.

Function Documentation

void _p ( const char *  text)
void calc_cluster_props ( t_cluster **  clusters,
int  size,
t_data data,
t_config config 
)

Calculates cluster properties.

Parameters
clustersclusters to be drawn
sizenumber of clusters
datageneral data storage vector
configgeneral config structure
Returns
void

Definition at line 307 of file mtt_clustering.cpp.

void calc_cluster_props ( vector< t_clustersPtr > &  clusters,
t_data data 
)

Definition at line 331 of file mtt_clustering.cpp.

void calc_object_props ( vector< t_objectPtr > &  objects)

Computes object properties, such as centroid and size.

Parameters
objectslist of objects
Returns
void

Definition at line 378 of file mtt_clustering.cpp.

void clean_objets ( vector< t_objectPtr > &  objects)

Frees memory associated with objects.

Parameters
objectsInput objects
Returns
void

Definition at line 418 of file mtt_clustering.cpp.

t_cluster** clustering ( t_data data,
int *  count,
t_config config,
t_flag flags 
)

Performs clustering operation.

Parameters
datageneral data storage vector
countnumber of clusters
configgeneral config structure
flagsgeneral flags structure
Returns
clusters

Definition at line 113 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.

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.

Parameters
objectsPtrOutput objects
clustersInput clusters
dataData points
configgeneral config structure
Returns
always true

Definition at line 355 of file mtt_clustering.cpp.

double dietmayer_threshold ( double  r,
t_config config 
)

Computes dietmayer clustering threshold.

Parameters
r
configgeneral config structure
Returns
dietmayer threshold

Definition at line 97 of file mtt_clustering.cpp.

void FlagCollisionWithOcclusion ( t_cluster **  clusters,
int  object_size,
t_data data,
t_config config 
)

Definition at line 34 of file mtt_clustering.cpp.

void free_lines ( vector< t_objectPtr > &  objects)

Removes lines from memory.

Parameters
objectslist of objects
Returns
void

Definition at line 69 of file line_fitting.cpp.

double point2line_distance ( double  alpha,
double  ro,
double  x,
double  y 
)

Calculates the line to point distance.

Parameters
alphapolar coordinates of the line
ropolar coordinates of the line
xcartesian coordinates of the point
y
Returns
algebric distance

Definition at line 66 of file line_fitting.cpp.

double point2point_distance ( double  xi,
double  yi,
double  xf,
double  yf 
)

Calculates the distante between two points.

Parameters
xi
yi
xf
yf
Returns
distance

Definition at line 63 of file line_fitting.cpp.

int real2print ( double  x,
t_config config 
)
void recursive_IEPF ( t_objectPtr object,
t_data data,
int  start,
int  end,
t_config config 
)

Recursive iterative end point fit. Single step.

Parameters
objectsingle object
datadata points
startstart point
endend point
configgeneral config structure
Returns
void

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.

Parameters
objectsingle object
clustersingle cluster
datadata points
configgeneral config structure
Returns
void

Definition at line 482 of file mtt_clustering.cpp.

void remove_border_points ( t_cluster **  clusters,
int  size,
int  npoints 
)

Removes cluster border points.

Parameters
clustersclusters to be drawn
sizenumber of clusters
npointsnumber of points to be removed
Returns
void

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.

Parameters
clustersclusters to be drawn
sizenumber of clusters
thresholdnumber of points a cluster must have not to be deleted
Returns
void

Definition at line 270 of file mtt_clustering.cpp.



mtt
Author(s): Jorge Almeida
autogenerated on Mon Mar 2 2015 01:32:18