Mesh in Cloud compare and python script

Feel free to ask any question here
Post Reply
mashal
Posts: 10
Joined: Thu Feb 06, 2020 10:09 am

Mesh in Cloud compare and python script

Post by mashal »

I have been trying to compare the result of Poisson Reconstruction algorithm in cloudcompare and open3d. Im attaching the images. is there any way to improve the result in open3d?
Attachments
cloudcompare_mesh.png
cloudcompare_mesh.png (466.55 KiB) Viewed 12101 times
mesh_open3d.png
mesh_open3d.png (416.87 KiB) Viewed 12101 times
daniel
Site Admin
Posts: 7717
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Mesh in Cloud compare and python script

Post by daniel »

Yes you have to generate the "density" scalar field and then remove the triangles corresponding to low density areas.

See https://www.cloudcompare.org/doc/wiki/i ... n_(plugin) (last section, about "Using the output density").
Daniel, CloudCompare admin
mashal
Posts: 10
Joined: Thu Feb 06, 2020 10:09 am

Re: Mesh in Cloud compare and python script

Post by mashal »

thanks daniel for reply. I can successfully improve the result in cloudcompare. now the thing is If you have a closer look on both the images that I attached the mesh through cloudcompare is very sharp but the one through open3d library of python is not very good. The algorithm to generate the mesh in both the cases is same "Poisson reconstruction". Do you have any idea how can I achieve the same result in open3d?
daniel
Site Admin
Posts: 7717
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Mesh in Cloud compare and python script

Post by daniel »

Oh sorry, I missed the real question ;)

Well, is it the same version of the algorithm? We use the most recent one (well, depending on the version of CC of course): http://www.cs.jhu.edu/~misha/Code/Poiss ... sion12.00/

And have you used the same parameters? Even the advanced ones?
Daniel, CloudCompare admin
mashal
Posts: 10
Joined: Thu Feb 06, 2020 10:09 am

Re: Mesh in Cloud compare and python script

Post by mashal »

I used the following paramters
mesh, densities = o3d.geometry.TriangleMesh.create_from_point_cloud_poisson(pcd, depth=10, width=0, scale=1.1, linear_fit=True)

I changed some of these paramters but I failed to found the options like setting boundary as free , neumann and Dirichlet.
I also was not able to find the setting for getting the output as density etc etc
do you know how can set these with open3D?
mashal
Posts: 10
Joined: Thu Feb 06, 2020 10:09 am

Re: Mesh in Cloud compare and python script

Post by mashal »

or could you tell which language and libraries you are using to build this software?
;) I know that could be a bit nosy question to ask :D
mashal
Posts: 10
Joined: Thu Feb 06, 2020 10:09 am

Re: Mesh in Cloud compare and python script

Post by mashal »

I dig into source code of possion recon on github and on the inspection of source code I found
The default options of Poisson recon in open3D are
sample per node 1.5
full depth 5
point weight 2
Boundary Neuman


and in Cloud compare

I use the options
samples per Node 1.5
full depth 5
point weight 4.06
Boundary Neuman // change it too to match

only difference is the point weight so I changed the point weight in cloud compare as I dnt know how can I change it in python (I search for the source code in site package of python but found no source code). but there was no much difference on resulting mesh in cloud compare.
daniel
Site Admin
Posts: 7717
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Mesh in Cloud compare and python script

Post by daniel »

One thing that might be misleading here is also the way colors are interpolated inside the triangles? They look a little bit funky in the open3D capture... What I mean is that maybe the mesh structure is the same, but the colors are either not interpolated correctly, or not displayed properly?
Daniel, CloudCompare admin
mashal
Posts: 10
Joined: Thu Feb 06, 2020 10:09 am

Re: Mesh in Cloud compare and python script

Post by mashal »

you might be right about the color interpolation.
But what I found out is in open3d the normal computation does not follow the orientation of normal. so by setting everything the same I computed the normal (unchecking the orientation through the spanning it) in CC and was able to replicate the result like open3D.
Post Reply