00001
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef _GAN_LOCAL_FEATURE_H
00030 #define _GAN_LOCAL_FEATURE_H
00031
00032 #include <gandalf/common/misc_defs.h>
00033 #include <gandalf/image/image_defs.h>
00034 #include <gandalf/linalg/2x3matrix.h>
00035
00036 #ifdef __cplusplus
00037 extern "C" {
00038 #endif
00039
00053 typedef struct Gan_LocalFeatureMap
00054 {
00056 unsigned yblocks, xblocks;
00057
00060 unsigned ystep, xstep;
00061
00063 unsigned bsize2;
00064
00066 Gan_Image nfeatures;
00067
00070 Gan_Image index;
00071
00073 Gan_Bool alloc;
00074 } Gan_LocalFeatureMap;
00075
00079 typedef struct Gan_LocalFeatureMapParams
00080 {
00083 unsigned ystep, xstep;
00084
00086 unsigned bsize;
00087 } Gan_LocalFeatureMapParams;
00088
00089 Gan_LocalFeatureMap *
00090 gan_local_feature_map_form ( Gan_LocalFeatureMap *pmap,
00091 unsigned height, unsigned width,
00092 Gan_LocalFeatureMapParams *pms );
00093 void gan_local_feature_map_free ( Gan_LocalFeatureMap *pmap );
00094 Gan_Bool gan_local_feature_map_clear ( Gan_LocalFeatureMap *pmap,
00095 unsigned height, unsigned width,
00096 Gan_LocalFeatureMapParams *pms );
00097 Gan_Bool gan_local_feature_point_add ( Gan_LocalFeatureMap *pmap,
00098 unsigned r, unsigned c,
00099 unsigned index );
00100 Gan_Bool gan_local_feature_line_add ( Gan_LocalFeatureMap *pmap,
00101 unsigned r1, unsigned c1,
00102 unsigned r2, unsigned c2,
00103 unsigned index );
00104 Gan_Bool gan_local_feature_map_set_indices ( Gan_LocalFeatureMap *pmap );
00105 Gan_Bool gan_local_feature_map_find_block ( Gan_LocalFeatureMap *pmap,
00106 double y, double x,
00107 Gan_Matrix23 *Ai,
00108 unsigned *cr, unsigned *cc );
00109
00127 Gan_LocalFeatureMap *
00128 gan_local_feature_map_alloc ( unsigned height, unsigned width,
00129 Gan_LocalFeatureMapParams *pms );
00130
00139 #ifdef __cplusplus
00140 }
00141 #endif
00142
00143 #endif