Jafar
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
sift.h
Go to the documentation of this file.
00001 
00020 #ifndef SIFT_H
00021 #define SIFT_H
00022 
00023 #include <cxcore.h> // opencv
00024 
00025 /******************************** Structures *********************************/
00026 
00028 struct detection_data
00029 {
00030   int r;
00031   int c;
00032   int octv;
00033   int intvl;
00034   double subintvl;
00035   double scl_octv;
00036 };
00037 
00038 struct feature;
00039 
00040 
00041 /******************************* Defs and macros *****************************/
00042 
00044 #define SIFT_INTVLS 3
00045 
00047 #define SIFT_SIGMA 1.6
00048 
00050 #define SIFT_CONTR_THR 0.04
00051 
00053 #define SIFT_CURV_THR 10
00054 
00056 #define SIFT_IMG_DBL 1
00057 
00059 #define SIFT_DESCR_WIDTH 4
00060 
00062 #define SIFT_DESCR_HIST_BINS 8
00063 
00064 /* assumed gaussian blur for input image */
00065 #define SIFT_INIT_SIGMA 0.5
00066 
00067 /* width of border in which to ignore keypoints */
00068 #define SIFT_IMG_BORDER 5
00069 
00070 /* maximum steps of keypoint interpolation before failure */
00071 #define SIFT_MAX_INTERP_STEPS 5
00072 
00073 /* default number of bins in histogram for orientation assignment */
00074 #define SIFT_ORI_HIST_BINS 36
00075 
00076 /* determines gaussian sigma for orientation assignment */
00077 #define SIFT_ORI_SIG_FCTR 1.5
00078 
00079 /* determines the radius of the region used in orientation assignment */
00080 #define SIFT_ORI_RADIUS 3.0 * SIFT_ORI_SIG_FCTR
00081 
00082 /* number of passes of orientation histogram smoothing */
00083 #define SIFT_ORI_SMOOTH_PASSES 2
00084 
00085 /* orientation magnitude relative to max that results in new feature */
00086 #define SIFT_ORI_PEAK_RATIO 0.8
00087 
00088 /* determines the size of a single descriptor orientation histogram */
00089 #define SIFT_DESCR_SCL_FCTR 3.0
00090 
00091 /* threshold on magnitude of elements of descriptor vector */
00092 #define SIFT_DESCR_MAG_THR 0.2
00093 
00094 /* factor used to convert floating-point descriptor to unsigned char */
00095 #define SIFT_INT_DESCR_FCTR 512.0
00096 
00097 /* returns a feature's detection data */
00098 #define feat_detection_data(f) ( (struct detection_data*)(f->feature_data) )
00099 
00100 
00101 /*************************** Function Prototypes *****************************/
00102 
00113 extern int sift_features( IplImage* img, struct feature** feat );
00114 
00115 
00116 
00142 extern int _sift_features( IplImage* img, struct feature** feat, int intvls,
00143          double sigma, double contr_thr, int curv_thr,
00144          int img_dbl, int descr_width, int descr_hist_bins );
00145 
00146 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Wed Oct 15 2014 00:37:27 for Jafar by doxygen 1.7.6.1
LAAS-CNRS