00001
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef _GAN_LINE_FEATURE_H
00030 #define _GAN_LINE_FEATURE_H
00031
00032 #include <gandalf/common/misc_defs.h>
00033 #include <gandalf/vision/camera.h>
00034 #include <gandalf/vision/local_feature.h>
00035 #include <gandalf/image/pixel.h>
00036 #include <gandalf/linalg/2vectorf.h>
00037 #include <gandalf/linalg/2x3matrixf.h>
00038
00039 #ifdef __cplusplus
00040 extern "C" {
00041 #endif
00042
00056 typedef struct Gan_LineFeature
00057 {
00059 unsigned r1, c1, r2, c2;
00060
00062 Gan_Vector2_f p1, p2;
00063
00065 float strength;
00066
00068 Gan_Vector3_f l;
00069
00071
00079 Gan_SquMatrix22_f N, Ni;
00080
00082 int status;
00083 int index;
00084
00086 Gan_Vector2_f *point;
00087
00089 unsigned npoints;
00090 } Gan_LineFeature;
00091
00095 typedef struct Gan_LineFeatureMap
00096 {
00098 unsigned nlines;
00099
00101 Gan_LineFeature *line;
00102
00104 unsigned max_nlines;
00105
00107 unsigned height, width;
00108
00110 Gan_Bool A_set;
00111
00114 Gan_Matrix23_f A, Ai;
00115
00117 Gan_LocalFeatureMap local_fmap;
00118
00120 Gan_Vector2_f *point;
00121
00123 unsigned npoints;
00124
00126 unsigned max_npoints;
00127
00129 Gan_Bool alloc;
00130 } Gan_LineFeatureMap;
00131
00132 Gan_LineFeatureMap *gan_line_feature_map_form ( Gan_LineFeatureMap *lmap,
00133 unsigned max_nlines );
00134 Gan_LineFeatureMap *gan_line_feature_map_copy ( Gan_LineFeatureMap *lmap );
00135 void gan_line_feature_map_free ( Gan_LineFeatureMap *lmap );
00136 Gan_Bool gan_line_feature_map_clear ( Gan_LineFeatureMap *lmap,
00137 unsigned height, unsigned width,
00138 Gan_Matrix23_f *A,
00139 Gan_LocalFeatureMapParams *lpms );
00140 Gan_LineFeature *gan_line_feature_add ( Gan_LineFeatureMap *lmap,
00141 float y1, float x1,
00142 float y2, float x2,
00143 Gan_SquMatrix22_f *N,
00144 int status, int index,
00145 float strength,
00146 Gan_Vector2_f *point,
00147 unsigned npoints );
00148 Gan_Bool gan_line_feature_map_postprocess ( Gan_LineFeatureMap *lmap );
00149
00160 Gan_LineFeatureMap *gan_line_feature_map_alloc ( unsigned max_nlines );
00161
00170 #ifdef __cplusplus
00171 }
00172 #endif
00173
00174 #endif