00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00031 #ifndef _MTT_CLUSTERING_H_
00032 #define _MTT_CLUSTERING_H_
00033
00034 #include "mtt.h"
00035
00036 void FlagCollisionWithOcclusion(t_cluster**clusters,int object_size,t_data*data,t_config*config);
00037
00045 double dietmayer_threshold(double r,t_config*config);
00046 double ClusteringThreshold(double r1,double t1,double r2,double t2,t_config*config);
00047
00057 t_cluster**clustering(t_data*data,int*count,t_config*config,t_flag*flags);
00058
00059 bool clustering(t_data&data,vector<t_clustersPtr> &clustersPtr,t_config*config,t_flag*flags);
00060
00069 void remove_border_points(t_cluster**clusters,int size,int npoints);
00070
00079 void remove_small_clusters(t_cluster**clusters,int*size,int threshold);
00080
00090 void calc_cluster_props(t_cluster**clusters,int size,t_data*data,t_config*config);
00091
00101 bool clusters2objects(vector<t_objectPtr> &objectsPtr,vector<t_clustersPtr> &clusters,t_data& data,t_config& config);
00102
00109 void calc_object_props(vector<t_objectPtr> &objects);
00110
00111 void calc_cluster_props(vector<t_clustersPtr> &clusters,t_data&data);
00112
00119 void clean_objets(vector<t_objectPtr> &objects);
00120
00121
00130 void recursive_line_fitting(t_objectPtr& object,t_cluster& cluster,t_data& data,t_config& config);
00131
00138 void free_lines(vector<t_objectPtr> &objects);
00139
00150 void recursive_IEPF(t_objectPtr& object,t_data& data,int start,int end,t_config& config);
00151
00152 extern double point2point_distance(double xi,double yi,double xf,double yf);
00153 extern double point2line_distance(double alpha,double ro,double x,double y);
00154 extern int real2print(double x,t_config*config);
00155 extern void _p(const char*text);
00156 #endif