cvtColor(image,gray_image,CV_BGR2GRAY); //转灰度 要引用头文件opencv/opencv.hpp
cv::resize(cur_img, cur_resize, cv::Size(), 0.5, 0.5); //改变尺寸
//显示匹配图像
//#include <opencv2/features2d/features2d.hpp>
std::vector<cv::KeyPoint> kpts_1(match_num);
std::vector<cv::KeyPoint> kpts_2(match_num);
std::vector<cv::DMatch> matches(match_num);
cv::drawMatches(img_1, kpts_1, img_2, kpts_2, matches, img_match);
cv::imshow("match_result", img_match);
//画特征点
cv::drawKeypoints(img_1, kpts_1, img_kpt, cv::Scalar(0, 0, 255));
cv::imshow("img_kpt", img_kpt);