opencv - SIFT 检测到的关键点数量非常少
问题描述
我有一个图像拼接代码,SIFT 用于检测关键点。当我使用从互联网下载的图像时,关键点的数量非常好。但是当我使用相机拍摄的图像时,关键点的数量非常糟糕。这是我检测关键点的代码。有什么问题?
> Ptr<SIFT> detector = SIFT::create(0,3,-1,5,2.6); //0,3,-1,5,0.6
> std::vector <KeyPoint> kp1, kp2;
> Mat descriptors1, descriptors2;
> detector -> detectAndCompute (imageA, noArray(), kp1, descriptors1);
> detector -> detectAndCompute (imageB, noArray(),kp2, descriptors2);
> //Ptr<DescriptorMatcher> matcher = BFMatcher::create();
> Ptr<DescriptorMatcher> matcher = DescriptorMatcher::create(DescriptorMatcher::FLANNBASED);
解决方案
推荐阅读
- tensorflow - 多个 MultiRNNCell 的行为?
- google-sheets - 用 FALSE 替换 0,用 TRUE 替换 1
- reactjs - 检测容器内 div 的点击
- c# - 什么存档文件格式有利于分布式处理期间的随机访问?
- rust - 方法 for_each 存在,但使用 StreamDeckSocket 时不满足 trait bound
- c++ - 删除构造函数和模板
- flutter - Flutter FadeIn/FadeOut animation together
- reactjs - 更新 redux 状态/提交表单时页面重新加载
- qt - 为什么不同的treeItems链接到相同的数据
- c++ - 使用变量定义数组大小和使用新运算符 c++ 有什么区别?