isl-org / Open3D

Open3D: A Modern Library for 3D Data Processing
http://www.open3d.org
Other
10.93k stars 2.24k forks source link

Hello, normal redirection issue #306

Closed jingxa closed 6 years ago

jingxa commented 6 years ago

Hi, when i compute normals ,there are some problems about normal direction, but i maybe not find some methods like dealing normal orientation with minimum spanning tree.

Will this method be implemented in the future?

Thanks for your help!

syncle commented 6 years ago

Hi @jingxa

Make a consistent normal directions using minimum spanning tree seems interesting. However, there is a question whether those spatially consistent normals follow the true directions. I think it is ill-posed without prior knowledge.

Open3D doesn't have minimum spanning tree style implementation (I would be appreciate if you can contribute though), but it has efficient implementation about correcting normal directions given prior knolwedge. The knowledge includes camera center, or global reference directions.

Camera center can be center of laser scanner or RGBD camera. The normals should point to the direction of camera center as the point clouds were captured by that camera. Another prior knowledge is reference direction. It adjusts sign of normals to be an acute angle for the reference direction. Both of them worked for us when we meshing the large scale point clouds. See meshed models in tanksandtemples project.

You can check implementation of these ideas from here: /src/Tools/ConvertPointCloud.cpp. You can use these input arguments. https://github.com/IntelVCL/Open3D/blob/5bb9fb0bbed6b5dcc243476cf7535caf01c0f304/src/Tools/ConvertPointCloud.cpp#L62-L63

Hope this would be helpful!

qianyizh commented 6 years ago

MST is a good algorithm. I have used it before and it works quite reliably (it fails, but occasionally). I think the right timing to add MST is when we add mesh reconstruction #270

MST is actually a pre-requisite for a few mesh reconstruction algorithms. The input is an unstructured point cloud. The viewpoint trick does not work now.

jingxa commented 6 years ago

@syncle @qianyizh oh ,well ! thanks for your help ! I am looking forward to the next version! i try to implement mst according to cloudcompare, firstly creating weighted graph of nearest edge, secondly computing normal orientation with priority_queue, i think that spreading normal from one point is the best way. but My implementation is to choose the edge of the lowest weight , that causes bad results,i think that choosing Multiple points lead to error. i can't sovle this problem.

, so i want to find some idea from open3d, can your give me some idea?thanks!

qianyizh commented 6 years ago

I think the easiest way is to read the code of MST in either CloudCompare or MeshLab, and re-implement it. Should not be a very hard job, :)

jingxa commented 6 years ago

@qianyizh ,haha ,yeah ,in cloudcompare , it search the nearest points by octree, i use kd-tree in pcl, i think it is same, i just have problem about how to choose one point and impose the direction (outward or inward),that's my difficulties. and i don't find "mst" in meshlab, i will try to search it again in meshlab ,thank you!

qianyizh commented 6 years ago

Close as it is not currently in Open3D but will be part of #270