alicevision / Meshroom

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

Export pointcloud #266

Closed Shadetail closed 3 years ago

Shadetail commented 5 years ago

My reconstruction looks good in the sparse point cloud preview in the viewport, but reconstructed mesh turns out totally broken. Is there any way to export dense (or even sparse) point cloud?

fabiencastan commented 5 years ago

Does the depth maps look correct? You can visualize them by looking at the EXR files in the output of the DepthMapFilter node.

Shadetail commented 5 years ago

I'm not 100% sure how they should look, here's 3 of them out of 94 (exposure adjusted): https://i.imgur.com/pZarybY.jpg corresponding photos from PrepareDenseScene folder: https://i.imgur.com/TUMobBg.jpg the last depth map appears strange I suppose.

robertguetzkow commented 5 years ago

The sparse point cloud is saved in ./MeshroomCache/StructureFromMotion/[hash]/cloud_and_poses.abc (or .ply if configured in the SfM node setting named "Inter File Extension"). I believe the dense point cloud is stored in ./MeshroomCache/Meshing/[hash]/denseReconstruction.bin, however I'm not sure if that binary format is anything that another software can read.

nmenu commented 5 years ago

I want to emphasis how important this is to be able to export the dense point cloud to a standard point cloud file format.

There are many cases you do not want to work with the mesh but with a dense point cloud. Web visualization with Potree for example, input to the point cloud to make analysis, build TIN terrain model, etc... in an enginerring application. This is a must if you could add this option , really a BIG improvement for usability. Thanks

dlivingstone commented 5 years ago

+1 for being able to export point clouds Is there format for the binary point cloud file detailed anywhere?

fabiencastan commented 5 years ago

You can use the vertices of the OBJ and you will get the same points than in the bin format. The bin format is only useful to get the visibility information of each vertex. In all case, you will not have color information (as this information is not stored), so it needs a processing step to compute it (as it's done at the end of the SfM to add colors to the Alembic sparse point cloud).

It's not in our roadmap, but as it's easy to do, we will probably add something for that.

nmenu commented 5 years ago

an ascii pts file, space separated, with X Y Z Intensity Red Green Blue would be great!, (set intensity to 0 as it is not defined...) x y z i R G B

Alternatively the .LAS file format specs is available here... but I guess it is more complex to implement ? http://www.asprs.org/a/society/committees/standards/LAS_1_4_r13.pdf

Great works guys !!!

mobarre commented 5 years ago

Actually, I just found out that .ply files can be exported just fine. It's just not obvious: Add a ConvertSfMFormat node to the output of the StructureFromMotion node, and if you really want to make it look pretty, add a Publish node right after. This allows me to open point clouds in meshlab (I do seem to lack normals though).

Does that help ?

TokyoWarfare commented 5 years ago

I also wish there was a Dense Point cloud option instead of Mesh, with the option to colorize the cloud.

hectorC commented 5 years ago

I also wish there was a Dense Point cloud option instead of Mesh, with the option to colorize the cloud.

Plus one here. I need to produce colorized point clouds instead of meshes.

cdosrunwild commented 5 years ago

I agree 100 percent

On Thu., Apr. 11, 2019, 8:08 p.m. Hector Centeno, notifications@github.com wrote:

I also wish there was a Dense Point cloud option instead of Mesh, with the option to colorize the cloud.

Plus one here. I need to produce colorized point clouds instead of meshes.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/alicevision/meshroom/issues/266#issuecomment-482379683, or mute the thread https://github.com/notifications/unsubscribe-auth/AnrSnSNIu7Lgt0n9e8WeDdhS9EsfuSjcks5vf85rgaJpZM4XHkrC .

natowi commented 5 years ago

Point cloud export https://github.com/alicevision/meshroom/pull/382

natowi commented 3 years ago

Now available with the 2020 release.