abc bcd
abc bcd

Reputation: 131

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. 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.
  3. Third collect and overlap all the images together to create a 3d object.

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? I use python 3.10.4.

Upvotes: 2

Views: 7431

Answers (2)

JFCorleone
JFCorleone

Reputation: 753

There's this commercial solution called: Metashape from Agisoft, it has a python module you can use, but beware that it has its pitfalls (it threw segmentation fault for me at the end of processing which makes things... icky) and the support kind of ignores bigger problems and you can expect that they would ignore your ticket. Still, does the job quite well.

Upvotes: 0

Astrofra
Astrofra

Reputation: 321

It seems that you are asking if there are some Python modules that would help to implement a complete photogrammetry process.

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.

Possibly, all of these steps can be implemented in Python but I'm not aware that such a "off-the-shelf" module does exist.

Upvotes: 2

Related Questions