图片特征匹配仿射变换
admin
2024-03-02 09:35:33

                         图片特征匹配仿射变换

class ImageFeature {
public:void BFMatch_demo(Mat& image, Mat& image2);};//  ImageFeature   ScanToPointCloud2Converter
//todo 图片匹配
void ScanToPointCloud2Converter::BFMatch_demo(Mat& image1, Mat& image2) {// 1 初始化特征点和描述子,ORBstd::vector keypoints1, keypoints2;Mat descriptors1, descriptors2;Ptr orb = ORB::create();// 2 提取 Oriented FAST 特征点orb->detect(image1, keypoints1);orb->detect(image2, keypoints2);// 3 根据角点位置计算 BRIEF 描述子orb->compute(image1, keypoints1, descriptors1);orb->compute(image2, keypoints2, descriptors2);// 4 对两幅图像中的BRIEF描述子进行匹配,使用 Hamming 距离vector matches;BFMatcher bfmatcher(NORM_HAMMING);bfmatcher.match(descriptors1, descriptors2, matches);// 5 匹配对筛选double min_dist = 1000, max_dist = 0;// 找出所有匹配之间的最大值和最小值for (int i =

相关内容

热门资讯

蛟河游船好去处,宴宾园活鱼馆美... 在蛟河游玩,游船是领略湖光山色的绝佳方式,而游玩之后,一顿美味的餐食更是不可或缺。宴宾园活鱼馆就是这...
必去的景点有免费WiFi、三级... 在旅游的世界里,寻找那些拥有独特魅力且设施完备的景点是每一位旅行者的心愿。今天,我们要为大家介绍一个...