opencv - OpenCV 透视变换(无标记 AR)
问题描述
我目前正在将用 C++ 编写的无标记 AR 源代码翻译成 C#,但不知何故,我的输出总是偏离应有的重点。下图是我的输出:
红色圆圈应该是正确的目的地,但我得到了黑色圆圈。所以我想知道这里是否有人对可能导致此问题的原因有任何建议。
我不擅长用文字描述,所以我试着用这张图来描述:
视频实例:
https
://www.youtube.com/watch?v=3MaKHf3AIUU&feature=youtu.be
在此视频中:
- 左侧图像:显示的图像是从步骤 5 和步骤 6 中计算的 Homography Matrix 生成的。
- 右侧图像:显示的图像是从步骤 8 中计算的 Homography Matrix 生成的。
我将代码上传到 GitHub: https ://github.com/abc225313/MarkerLessDetector
设置标记和训练
PatternDetector.cs
→train(Pattern pattern)
PatternDetector.cs
→buildPatternFromImage(Mat image, Pattern pattern)
main
函数内输入图像特征提取
PatternDetector.cs
→bool extractFeatures (Mat image,ref KeyPoint[] keypoints, ref Mat descriptors)
特征匹配
PatternDetector.cs
→void getMatches (Mat queryDescriptors, ref DMatch[] matches)
查找单应性
PatternDetector.cs
→ 内static bool refineMatchesWithHomography
包装
PatternDetector.cs
→ 可以在里面找到findPattern()
计算单应性
PatternDetector.cs → calculated in function
查找模式()`透视变换
PatternDetector.cs
→ 内static bool refineMatchesWithHomography
解决方案
推荐阅读
- css - 是否可以在清晰度框架中垂直合并数据网格的单元格
- azure - 无法在 Azure 中创建 sendGrid 资源
- excel - 如何在 sub b 中使用 sub a 中的值
- caldav - DAViCal 电子邮件别名的忙/闲信息
- r - Knitr 需要几分钟才能处理 Rmd 文件
- ruby - 在 Ruby 中,为什么 `while true do i += 1 end` 不是线程安全的?
- selenium-webdriver - 如果在这种情况下toast消息动态变化,如何在appium中读取toast消息如何使用tess4j提取
- java - 使用所有父文件夹在 Java 中创建文件
- c++ - 如何从 main() 继续到第二个 main2()?
- falconframework - 猎鹰中的 ModuleNotFound 错误