其他分享
首页 > 其他分享> > 11月开发总结

11月开发总结

作者:互联网

11.12

头文件中不要加任何命名空间,会存在很多重定义问题

11.13 surf特征点提取写法


cv::Ptr<cv::xfeatures2d::SurfFeatureDetector> surfDetector = cv::xfeatures2d::SurfFeatureDetector::create(10);

surfDetector->detect(center_img, tmp_center);

surfDetector->detect(Best_img_i, tmp_image);

cv::Ptr<cv::xfeatures2d::SurfDescriptorExtractor> detector = cv::xfeatures2d::SurfDescriptorExtractor::create();

detector->detect(image1, tmp_center, descriptor_center);

detector->detect(image2, tmp_image, descriptor_image);

和下面的写法不能混淆

cv::Ptr<cv::xfeatures2d::SURF> detector = cv::xfeatures2d::SURF::create(10, 4, 3, true, true);

std::vector<cv::KeyPoint> keypoints1, keypoints2;

cv::Mat src_vector, temp_vector;//用来存放特征点的描述向量

//找到特征点并计算特征描述子(向量)
detector->detectAndCompute(img1, cv::Mat(), keypoints1, src_vector);

detector->detectAndCompute(img2, cv::Mat(), keypoints2, temp_vector);

标签:11,总结,vector,detect,开发,detector,tmp,cv,center
来源: https://blog.csdn.net/qq_43493858/article/details/121283002