SIFT:第一步使用OpenCV构建DOG金字塔

main函数


#include<opencv2/opencv.hpp>  

#include"PC_SIFT.h"

using namespace std;
using namespace cv;

int main(int argc,char*argv[])
{
	struct feature *feat;
	int n;
	Mat img1=cv::imread("E://corner.jpg",-1);
	if(!img1.data)
		{cout<<"Error!No such file!"<<endl;
			return -1;
	     }

	cv::namedWindow("test1",CV_WINDOW_AUTOSIZE);
	imshow("test1",img1);
	
	n=pc_sift_features(img1, &feat);

    cv::waitKey(0);
	
	return 0;

}


CPP文件

#include<opencv2/opencv.hpp> 
#include<math.h>

#include "PC_SIFT.h"

using namespace std;
using namespace cv;

Size Wsize(5,5);  // the size of gaussain smooth kernel

/*************************Static Function Feclaration**************************/ 
static int _sift_features( Mat, struct feature**, int ,double , double , int ,int , int );
static Mat create_init_img( Mat, double );
static void build_gauss_pyr( Mat,vector<Mat>&, int,int, double );
static Mat downsample( Mat);
static void build_dog_pyr(vector<Mat>&dog_pyr,vector<Mat>&gauss_pyr, int octvs, int intvls );



/************************Main function pc_sift_features************************/
/*we skipped the first ocatve */
int pc_sift_features(Mat img,struct feature
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值