00001 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00025 
00026 
00027 
00028 
00029 #ifndef _GAN_CORNER_FEATURE_H
00030 #define _GAN_CORNER_FEATURE_H
00031 
00032 #include <gandalf/common/misc_defs.h>
00033 #include <gandalf/vision/camera.h>
00034 #include <gandalf/vision/cameraf.h>
00035 #include <gandalf/vision/local_feature.h>
00036 #include <gandalf/image/pixel.h>
00037 #include <gandalf/linalg/2x3matrixf.h>
00038 
00039 #ifdef __cplusplus
00040 extern "C" {
00041 #endif
00042 
00056 typedef struct Gan_CornerFeature
00057 {
00059    unsigned short r, c;
00060 
00063    Gan_Vector2_f p;
00064 
00066    Gan_Vector2_f pu;
00067 
00069    float strength;
00070 
00072    Gan_SquMatrix22_f N;
00073 
00075    Gan_SquMatrix22_f Ni;
00076 
00078    int status;
00079 
00081    int index;
00082 } Gan_CornerFeature;
00083 
00087 typedef struct Gan_CornerFeatureMap
00088 {
00090    unsigned ncorners;
00091 
00093    Gan_CornerFeature *corner;
00094 
00096    unsigned max_ncorners;
00097 
00099    unsigned height, width;
00100 
00102    Gan_Bool A_set;
00103 
00106    Gan_Matrix23_f A, Ai;
00107 
00110    Gan_Camera_f camera;
00111 
00113    Gan_LocalFeatureMap local_fmap;
00114 
00116    Gan_Bool alloc;
00117 } Gan_CornerFeatureMap;
00118 
00119  Gan_CornerFeatureMap *gan_corner_feature_map_form ( Gan_CornerFeatureMap *cmap,
00120                                                     unsigned max_ncorners );
00121  void gan_corner_feature_map_free ( Gan_CornerFeatureMap *cmap );
00122  Gan_Bool gan_corner_feature_map_clear ( Gan_CornerFeatureMap *cmap,
00123                                         unsigned height, unsigned width,
00124                                         Gan_Matrix23_f *A, Gan_Camera *camera,
00125                                         Gan_LocalFeatureMapParams *lpms );
00126  Gan_CornerFeature *gan_corner_feature_add ( Gan_CornerFeatureMap *cmap,
00127                                             unsigned r, unsigned c,
00128                                             float rf, float cf,
00129                                             Gan_SquMatrix22_f *N,
00130                                             int status, int index,
00131                                             float strength );
00132  Gan_Bool gan_corner_feature_map_postprocess ( Gan_CornerFeatureMap *cmap );
00133 
00144  Gan_CornerFeatureMap *gan_corner_feature_map_alloc ( unsigned max_ncorners );
00145 
00154 #ifdef __cplusplus
00155 }
00156 #endif
00157 
00158 #endif