1 #ifndef __SPARROW_EDGES_H__
2 #define __SPARROW_EDGES_H__
7 /* for discarding outliers */
8 #define OUTLIER_RADIUS 7
9 #define OUTLIER_THRESHOLD (OUTLIER_RADIUS * OUTLIER_RADIUS)
11 #define BAD_PIXEL 0xffff
13 #define FL_DUMPFILE "/tmp/edges.dump"
16 typedef enum corner_status
{
22 typedef enum edges_state
{
30 typedef struct sparrow_corner_s
{
33 /*dyr -> dy to next point right
34 dxd ->dx to next point down */
39 corner_status_t status
;
42 typedef struct sparrow_voter_s
{
48 typedef struct sparrow_cluster_s
{
50 sparrow_voter_t voters
[8];
54 typedef union sparrow_signal_s
{
60 typedef struct sparrow_intersect_s
{
63 } sparrow_intersect_t
;
65 typedef struct sparrow_line_s
{
71 /*condensed version of <struct sparrow_find_lines_s> for saving: contains no
72 pointers or other unnecessary things that might vary in size across
74 typedef struct sparrow_fl_condensed
{
77 } sparrow_fl_condensed_t
;
79 typedef struct sparrow_find_lines_s
{
80 sparrow_line_t
*h_lines
;
81 sparrow_line_t
*v_lines
;
82 sparrow_line_t
**shuffled_lines
;
89 sparrow_intersect_t
*map
;
90 sparrow_corner_t
*mesh
;
91 sparrow_cluster_t
*clusters
;
97 } sparrow_find_lines_t
;
100 #define DEBUG_FIND_LINES(fl)GST_DEBUG( \
102 " sparrow_line_t *h_lines: %p\n" \
103 " sparrow_line_t *v_lines: %p\n" \
104 " sparrow_line_t **shuffled_lines: %p\n" \
105 " int current: %d\n" \
106 " int n_lines: %d\n" \
107 " int n_vlines: %d\n" \
108 " int n_hlines: %d\n" \
109 " gint shift1: %d\n" \
110 " gint shift2: %d\n" \
111 " sparrow_intersect_t *map: %p\n" \
112 " sparrow_corner_t *mesh: %p\n" \
113 " sparrow_cluster_t *clusters: %p\n" \
114 " IplImage *debug: %p\n" \
115 " IplImage *threshold: %p\n" \
116 " IplImage *working: %p\n" \
117 " IplImage *input: %p\n" \
118 " edges_state_t state: %d\n" \
122 (fl)->shuffled_lines, \
138 //#undef debug_find_lines
139 //#define debug_find_lines(x) /* */
142 #endif /*have this .h*/