vc环境实现sift算子

时间:2018-04-19 17:40:04
【文件属性】:

文件名称:vc环境实现sift算子

文件大小:31KB

文件格式:CPP

更新时间:2018-04-19 17:40:04

sift

OpenCV的库文件 #pragma comment lib "cv" #pragma comment lib "highgui" #pragma comment lib "cxcore" gsl的库文件 #pragma comment lib "libgsl a" #include "minpq h" #include "sift h" #include "imgfeatures h" #include "kdtree h" #include "utils h" #include "xform h" #include <cv h> #include <cxcore h> #include <highgui h> #include <stdio h> #include <iostream h> the maximum number of keypoint NN candidates to check during BBF search #define KDTREE BBF MAX NN CHKS 200 threshold on squared ratio of distances between NN and 2nd NN #define NN SQ DIST RATIO THR 0 49 Globals char img1 file[] " 1 bmp"; 怎么VC下一个点就够了的 net下需要两个点 char img2 file[] " 2 bmp"; double imgzoom scale 0 7; 显示匹配结果图的缩放比例 IplImage img1 img2 stacked; other functions 鼠标响应函数(用于根据鼠键响应缩放匹配结果的窗口大小) void on mouse int event int x int y int flags void param ; typedef char va list; #define INTSIZEOF n sizeof n + sizeof int 1 & sizeof int 1 #define va start ap v ap va list &v + INTSIZEOF v #define va end ap ap va list 0 void fatal error char format { va list ap; fprintf stderr "Error: " ; va start ap format ; vfprintf stderr format ap ; va end ap ; fprintf stderr " n" ; abort ; } extern IplImage stack imgs IplImage img1 IplImage img2 { IplImage stacked cvCreateImage cvSize MAX img1 >width img2 >width img1 >height + img2 >height IPL DEPTH 8U 3 ; cvZero stacked ; cvSetImageROI stacked cvRect 0 0 img1 >width img1 >height ; cvAdd img1 stacked stacked NULL ; cvSetImageROI stacked cvRect 0 img1 >height img2 >width img2 >height ; cvAdd img2 stacked stacked NULL ; cvResetImageROI stacked ; return stacked; } int sift features IplImage img struct feature feat { return sift features img feat SIFT INTVLS SIFT SIGMA SIFT CONTR THR SIFT CURV THR SIFT IMG DBL SIFT DESCR WIDTH SIFT DESCR HIST BINS ; }"> OpenCV的库文件 #pragma comment lib "cv" #pragma comment lib "highgui" #pragma comment lib "cxcore" gsl的库文件 #pragma comment lib "libgsl a" #include "minpq h" #include "sift h" #include [更多]


网友评论