tudelft3d / City3D

Large-scale LoD2 Building Reconstruction from Airborne LiDAR Point Clouds
https://github.com/tudelft3d/City3D
GNU General Public License v3.0
223 stars 36 forks source link

'degenerate face detected' mean job failed? #4

Closed dhdbtkd closed 1 year ago

dhdbtkd commented 1 year ago

First of all, I would like to thank the developer for sharing the excellent codes. There is no problem processing the sample data. However, there is a problem with processing my custom data. Buildings in modern cities are the target. There has been no response since the log "degenerate face detected" came out, and no results have been generated after several hours. The program is in the Freeze(No response) state. Here is the sample data I am testing. My point cloud is generated from photogrammetry using DJI UAV Phantom4 Pro. Point cloud resolution is 0.4m Can anyone help why this is happening?

image

sample_pc.zip

yidahuang commented 1 year ago

Thanks for your feedback. Firstly, "degenerate face detected" is fine. During the hypothesis process, there might be some small and thin faces, we will detect and delete these faces. I notice that your input data is a photogrammetry point cloud, while our method is mainly designed for Airborne Lidar point clouds. However, it is still possible to generate the building result after tunning some parameters, the result is like this. image

This is how I tune the parameters for your input data, it may not be the optimal one. Considering that the height map generated by your data is noisier, the threshold for canny edge detection and edge regularization should be larger, so method/ reconstruction.cpp line559 int low_threshold = (2.0) 255 / (max_height - ht); --> int low_threshold = (3.0) 255 / (max_height - ht); method/otr2_edge_simplify.cpp line195 dbscan.Run(&point_data, 4, 1.2f, 1, dist_fun); -->dbscan.Run(&point_data, 4, 1.5f, 1, dist_fun);

Also for planar shape detection, the number should be set to 80, and the density should be set to 0.3 image

Btw, I find the coordinate of your data is really large, I suggest you translating the data firstly to avoid potential floating point issues.

dhdbtkd commented 1 year ago

Wow~~ Hi, yidahuang. Thank you for your fast answer. Your answer is very kind and sooo~ professional. So I understand why there is a problem with my data. As you said, I think the point cloud created from aerial photography will be more noisy or the edge will be unclear. Your tip would be very helpful. I wll also try that. (about method/otr2_edge_simplify.cppline195 and method/reconstruction.cppline559). Once again, thank you for sharing the great code.