Python OpenCV:在3D空间中旋转/移动2D图像,保存相机视图的2D图像

发布于 2025-02-05 23:40:22 字数 316 浏览 2 评论 0原文

我想拥有一个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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文