简体   繁体   English

如何从一系列 2d 图像中创建 3d 模型? 使用蟒蛇

[英]How to create a 3d model out of a series of 2d images? using python

So lets say I have a objects like a face.所以可以说我有一个像脸这样的物体。 I take multiple pictures of the face all at different angles and from far and close.我以不同的角度和远近拍摄了多张脸部照片。 I have a sort of idea of how to make a 3d model out of these pictures but don't know how to accomplish them.我对如何用这些图片制作 3d 模型有一种想法,但不知道如何完成它们。 My idea goes likes this.我的想法是这样的。

  1. First make code that gets the image object and gets rid of all background "noise".首先制作获取图像对象并消除所有背景“噪音”的代码。
  2. Second find what part of the 3d model the picture is about and place a tag on the image for where it should fit.其次,找到图片是关于 3d 模型的哪个部分,并在图像上放置一个标签,以表明它应该适合的位置。
  3. Third collect and overlap all the images together to create a 3d object.第三次收集所有图像并将其重叠在一起以创建一个 3d 对象。

Anyone have any idea how to accomplish any of these steps or any ideas how to create a 3d model out of a series of images?任何人都知道如何完成这些步骤或任何想法如何从一系列图像中创建 3d 模型? I use python 3.10.4.我使用 python 3.10.4。

It seems that you are asking if there are some Python modules that would help to implement a complete photogrammetry process.您似乎在问是否有一些 Python 模块可以帮助实现完整的摄影测量过程。

Please note that, even in the existing (and commercial ) photogrammetry solutions, the process is not always fully-automated, sometimes it require some manual tweaking & point cloud selection.请注意,即使在现有的(和商业的)摄影测量解决方案中,该过程并不总是完全自动化的,有时它需要一些手动调整和点云选择。

Anyway, to the best of my knowledge, what you asked requires to implement the following steps:无论如何,据我所知,您要求执行以下步骤:

  • detecting common features between the different photographs检测不同照片之间的共同特征
  • infer the position in space of the camera that took each photograph推断拍摄每张照片的相机在空间中的位置
  • generate a point cloud of the photographs based on their relative position in space and the common features根据照片在空间中的相对位置和共同特征生成照片的点云
  • convert the point cloud in a 3D mesh.将点云转换为 3D 网格。

Possibly, all of these steps can be implemented in Python but I'm not aware that such a "off-the-shelf" module does exist.可能,所有这些步骤都可以在 Python 中实现,但我不知道确实存在这样的“现成”模块。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM