00001
00021 #ifndef CHOP_H
00022 #define CHOP_H
00023
00024
00025
00026
00027 #include "oldheap.h"
00028 #include "seam.h"
00029
00030
00031
00032
00034 #define MAX_NUM_POINTS 50
00035
00040 typedef HEAP *POINT_GROUP;
00045 typedef HEAP *SPLIT_GROUP;
00046
00047
00048
00049
00050 extern int chop_enable;
00051 extern int chop_debug;
00052 extern int same_distance;
00053 extern int split_length;
00054 extern float center_knob;
00055 extern float overlap_knob;
00056 extern float split_dist_knob;
00057 extern float width_change_knob;
00058 extern float sharpness_knob;
00059 extern int min_outline_area;
00060 extern int min_outline_points;
00061 extern float good_split;
00062 extern float ok_split;
00063 extern int chop_enable;
00064
00065
00066
00067
00068
00074 #define point_bend_angle(point) \
00075 (angle_change ((point)->prev, (point), (point)->next))
00076
00077
00078
00079
00080 PRIORITY point_priority(EDGEPT *point);
00081
00082 void add_point_to_list(POINT_GROUP point_list, EDGEPT *point);
00083
00084 int angle_change(EDGEPT *point1, EDGEPT *point2, EDGEPT *point3);
00085
00086 void init_chop();
00087
00088 int is_little_chunk(EDGEPT *point1, EDGEPT *point2);
00089
00090 int is_small_area(EDGEPT *point1, EDGEPT *point2);
00091
00092 EDGEPT *pick_close_point(EDGEPT *critical_point,
00093 EDGEPT *vertical_point,
00094 int *best_dist);
00095
00096 void prioritize_points(TESSLINE *outline, POINT_GROUP points);
00097
00098 void new_min_point(EDGEPT *local_min, POINT_GROUP points);
00099
00100 void new_max_point(EDGEPT *local_max, POINT_GROUP points);
00101
00102
00103 void vertical_projection_point(EDGEPT *split_point, EDGEPT *target_point,
00104 EDGEPT** best_point);
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156
00157
00158
00159 #endif