PARP Research Group University of Murcia, Spain


examples/OpenCV/siftDetector/hess/xform.h

Go to the documentation of this file.
00001 
00009 #ifndef XFORM_H
00010 #define XFORM_H
00011 
00012 #include <cxcore.h>
00013 
00014 
00015 /********************************** Structures *******************************/
00016 
00017 struct feature;
00018 
00020 struct ransac_data
00021 {
00022   void* orig_feat_data;
00023   int sampled;
00024 };
00025 
00026 /******************************* Defs and macros *****************************/
00027 
00028 /* RANSAC error tolerance in pixels */
00029 #define RANSAC_ERR_TOL 3
00030 
00032 #define RANSAC_INLIER_FRAC_EST 0.25
00033 
00035 #define RANSAC_PROB_BAD_SUPP 0.10
00036 
00037 /* extracts a feature's RANSAC data */
00038 #define feat_ransac_data( feat ) ( (struct ransac_data*) (feat)->feature_data )
00039 
00040 
00054 typedef CvMat* (*ransac_xform_fn)( CvPoint2D64f* pts, CvPoint2D64f* mpts,
00055                                    int n );
00056 
00057 
00071 typedef double (*ransac_err_fn)( CvPoint2D64f pt, CvPoint2D64f mpt, CvMat* T );
00072 
00073 
00074 /***************************** Function Prototypes ***************************/
00075 
00076 
00114 extern CvMat* ransac_xform( struct feature* features, int n, int mtype,
00115                             ransac_xform_fn xform_fn, int m,
00116                             double p_badxform, ransac_err_fn err_fn,
00117                             double err_tol, struct feature*** inliers,
00118                             int* n_in );
00119 
00120 
00134 extern CvMat* lsq_homog( CvPoint2D64f* pts, CvPoint2D64f* mpts, int n );
00135 
00136 
00149 extern double homog_xfer_err( CvPoint2D64f pt, CvPoint2D64f mpt, CvMat* H );
00150 
00151 
00170 extern CvPoint2D64f persp_xform_pt( CvPoint2D64f pt, CvMat* T );
00171 
00172 
00173 #endif



QVision framework. PARP research group, copyright 2007, 2008.