00001
00020 #ifndef SIFT_H
00021 #define SIFT_H
00022
00023 #include "cxcore.h"
00024
00025
00026
00027
00028
00030 struct detection_data
00031 {
00032 int r;
00033 int c;
00034 int octv;
00035 int intvl;
00036 double subintvl;
00037 double scl_octv;
00038 };
00039
00040 struct feature;
00041
00042
00043
00044
00046 #define SIFT_INTVLS 3
00047
00049 #define SIFT_SIGMA 1.6
00050
00052 #define SIFT_CONTR_THR 0.04
00053
00055 #define SIFT_CURV_THR 10
00056
00058 #define SIFT_IMG_DBL 1
00059
00061 #define SIFT_DESCR_WIDTH 4
00062
00064 #define SIFT_DESCR_HIST_BINS 8
00065
00066
00067 #define SIFT_INIT_SIGMA 0.5
00068
00069
00070 #define SIFT_IMG_BORDER 5
00071
00072
00073 #define SIFT_MAX_INTERP_STEPS 5
00074
00075
00076 #define SIFT_ORI_HIST_BINS 36
00077
00078
00079 #define SIFT_ORI_SIG_FCTR 1.5
00080
00081
00082 #define SIFT_ORI_RADIUS 3.0 * SIFT_ORI_SIG_FCTR
00083
00084
00085 #define SIFT_ORI_SMOOTH_PASSES 2
00086
00087
00088 #define SIFT_ORI_PEAK_RATIO 0.8
00089
00090
00091 #define SIFT_DESCR_SCL_FCTR 3.0
00092
00093
00094 #define SIFT_DESCR_MAG_THR 0.2
00095
00096
00097 #define SIFT_INT_DESCR_FCTR 512.0
00098
00099
00100 #define feat_detection_data(f) ( (struct detection_data*)(f->feature_data) )
00101
00102
00103
00104
00115 extern int sift_features( IplImage* img, struct feature** feat );
00116
00117
00118
00144 extern int _sift_features( IplImage* img, struct feature** feat, int intvls,
00145 double sigma, double contr_thr, int curv_thr,
00146 int img_dbl, int descr_width, int descr_hist_bins );
00147
00148
00149 #endif