1 #ifndef __SPARROW_EDGES_H__
2 #define __SPARROW_EDGES_H__
6 /* for discarding outliers */
7 #define OUTLIER_RADIUS 7
8 #define OUTLIER_THRESHOLD (OUTLIER_RADIUS * OUTLIER_RADIUS)
10 #define SPARROW_MAP_LUT_SHIFT 1
11 #define SPARROW_FP_2_LUT (SPARROW_FIXED_POINT - SPARROW_MAP_LUT_SHIFT)
15 #define FL_DUMPFILE "/tmp/edges.dump"
18 typedef enum corner_status
{
24 typedef enum edges_state
{
32 typedef struct sparrow_corner_s
{
35 /*dyr -> dy to next point right
36 dxd ->dx to next point down */
41 corner_status_t status
;
44 typedef struct sparrow_voter_s
{
50 typedef struct sparrow_cluster_s
{
52 sparrow_voter_t voters
[8];
56 typedef union sparrow_signal_s
{
62 typedef struct sparrow_intersect_s
{
65 } sparrow_intersect_t
;
67 typedef struct sparrow_line_s
{
73 typedef struct sparrow_find_lines_s
{
74 //sparrow_line_t *lines;
75 sparrow_line_t
*h_lines
;
76 sparrow_line_t
*v_lines
;
77 sparrow_line_t
**shuffled_lines
;
84 sparrow_intersect_t
*map
;
85 sparrow_corner_t
*mesh
;
86 sparrow_cluster_t
*clusters
;
93 } sparrow_find_lines_t
;
96 #define DEBUG_FIND_LINES(fl)GST_DEBUG( \
98 " sparrow_line_t *h_lines: %p\n" \
99 " sparrow_line_t *v_lines: %p\n" \
100 " sparrow_line_t **shuffled_lines: %p\n" \
101 " int current: %d\n" \
102 " int n_lines: %d\n" \
103 " int n_vlines: %d\n" \
104 " int n_hlines: %d\n" \
105 " gint threshold: %d\n" \
106 " gint shift1: %d\n" \
107 " gint shift2: %d\n" \
108 " sparrow_intersect_t *map: %p\n" \
109 " sparrow_corner_t *mesh: %p\n" \
110 " sparrow_cluster_t *clusters: %p\n" \
114 (fl)->shuffled_lines, \
126 //#undef debug_find_lines
127 //#define debug_find_lines(x) /* */
130 #endif /*have this .h*/