Python OpenCV:在3D空间中旋转/移动2D图像,保存相机视图的2D图像
我想拥有一个python函数(使用openCV和numpy),该函数拍摄
- 2D映像(高度x width uint8 numpy array = openCV灰度映像)
- 有关图像相对于相机的位置(例如,它是位于它的起源)笛卡尔坐标系)
- 如何在3D空间中转动图像
,并返回
- 相机看到
我为什么需要的2D灰度图像: 我正在尝试在真实的照片中找到一个带有图案的2D矩形形状对象,并想知道(我知道它的大小)相对于相机的位置。我的方法是(巧妙地)猜测位置/旋转,然后计算得分的合适程度。
I'd like to have a Python function (using OpenCV and Numpy) which takes
- a 2D image (height x width uint8 numpy array = OpenCV grayscale image)
- information on where the image is relative to the camera (let's say it's at the origin of a cartesian coordinate system)
- how the image is turned in 3D space
and returns
- a 2D grayscale image of what the camera sees
Why I need this:
I'm trying to find a 2D-rectangle-shaped object with a pattern on it in a real photo and want to know (I know how big it is) it's position relative to the camera. My approach is to (smartly) guess the position/rotation and then compute a score for how well it fits.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论