alicevision / Meshroom

3D Reconstruction Software
http://alicevision.org
Other
11.2k stars 1.09k forks source link

Would this work with depth maps rendered via known camera positions? #399

Closed Amir-Arsalan closed 5 years ago

Amir-Arsalan commented 5 years ago

I have a set of depth map renderings of an object. I get these renderings using Blender and I want to project them back to get the 3D reconstruction of the underlying 3D shape. My camera positions are fixed and known. I wonder, can I use your package to get reconstruct the underlying 3D shape using these depth maps?

fabiencastan commented 5 years ago

Hi, It will be easier in the coming release, as the file formats have been unified around the SfMData (in json or Alembic). So in this new version, you will be able to create a simple json file with the camera poses and internal calibration. Then create EXR depth maps with the corresponding filename and you should be able to put that directly in input of the Meshing node.

I would recommend to launch a simple reconstruction with few images to see the json file format. In output of the StructureFromMotion node you will see a file named "cameras.sfm" (corresponding to the parameter outputViewsAndPoses).

Best,

alexisperret commented 5 years ago

Hi, @Amir-Arsalan did you manage to get a result ? @fabiencastan I followed your instructions but I am stuck. I can't just to put directly depth maps into the meshing node because it requires both depth maps and depth maps filtered. I would need either to create similarity maps in order to put data in the DepthMapFilter node or simulate the result of this node ? Is there a way to skip this node ? Furthermore, this node seems to use the "structure" part of sfm, which we don't have using full positions from 3d software.

Thank you

fabiencastan commented 5 years ago

DepthMapFilter is optional, you can connect the DepthMap node directly to the Meshing node. For you use case, I would still recommend to use a DepthMapFilter, to filter unstable depth values before Meshing.

What is the error if you start with a DepthMapFilter node?

alexisperret commented 5 years ago

I already tried to skip mesh filtering, but Meshroom explicitly asks for the 2 folders. I tried using directly AliceVision with the same result. (Using Meshroom 2019.10 and AliceVision 2.1.0) meshing_error_without_filter

If I start with a DepthMapFilter node, the error is just that I don't have similarity maps. I created some "fake" similarity maps with a constant value, and most of the time the filter node don't raise errors but gives black results on only half of the pictures. I also had an error after reading all pictures (just "function Terminate() was called") meshing_error_without_simMap

Maybe with a better understanding of how the similarty maps are created, I could do my own, and launch the process from here ?

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.