Main Page | Modules | Class List | File List | Class Members | File Members

line_feature.h

Go to the documentation of this file.
00001 
00014 /* This library is free software; you can redistribute it and/or
00015    modify it under the terms of the GNU Lesser General Public
00016    License as published by the Free Software Foundation; either
00017    version 2.1 of the License, or (at your option) any later version.
00018 
00019    This library is distributed in the hope that it will be useful,
00020    but WITHOUT ANY WARRANTY; without even the implied warranty of
00021    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00022    Lesser General Public License for more details.
00023 
00024    You should have received a copy of the GNU Lesser General Public
00025    License along with this library; if not, write to the Free Software
00026    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
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 /* #ifndef _GAN_LINE_FEATURE_H */

Generated on Fri Mar 17 12:44:47 2006 by  doxygen 1.3.9.1