colmap / colmap

COLMAP - Structure-from-Motion and Multi-View Stereo
https://colmap.github.io/
Other
7.51k stars 1.5k forks source link

exported PLY file with error character encoding #2191

Closed juling12 closed 1 year ago

juling12 commented 1 year ago

I built colmap source code with ubuntu20.04LTS and CUDA 11.1 to do 3D renconstruction.

After I done sparse renconstruction, I exported .PLY file. However, there is some invalid characters in the exported PLY file. When I opened it with MeshLab, it looks a bit strange.

image

Then I done dense construction, also, anything else is ok except exporting .PLY file. Is there anyone can help me?

tsattler commented 1 year ago

The header of the ply files is in text format, but the rest is stored in binary format. If you open it in a text editor, it won't make sense.

I don't know what you mean by "When I opened it with MeshLab, it looks a bit strange."

juling12 commented 1 year ago

@tsattler Hi, thanks for your positive reply. I mean that when I open the exported ply file in MeshLab, it looks like very different from colmap viewer.

This is the reconstructioned scene in colmap viewer after doing dense resonstruction. It looks great. image

This is the scene using exported fused.ply opened with MeshLab. It looks a bit strange. image

Why is it, I am confused.

tsattler commented 1 year ago

It looks like the meshlab view is just upside down (likely because meshlab uses a different coordinate system than colmap). Have you rotated the scene?

juling12 commented 1 year ago

@tsattler yes, I have tried to rotated it to get a view that sames to the colmap viewer, but failed. So I wonder if the exported ply file has something wrong (Because I have used other ply file before, it can be opened by ubuntu gedit editor, and shows right valid character encoding.) By the way, have you ever exported ply file in ubuntu? it is right when it is opened with MeshLab?

juling12 commented 1 year ago

@tsattler I changed the point size, now it can see basic shape, but why is it showed very difference from the scene of the colmap viewer? image

tsattler commented 1 year ago

This looks very much like the same model as in Colmap. Note that Meshlab by default uses lighting. If you want to have the same colors, you will need to disable lighting in Meshlab. I never had any issues with models under Ubuntu.

juling12 commented 1 year ago

Thanks for your help! Now, I set the shading to None in the MeshLab, the color looks like much right than before, but the model looks like low resolution. If I import the ply file from colmap software, it looks very great. Maybe I can use colmap to import file rather than meshLab to view my model. 图片