Closed QiaosiLi closed 4 months ago
I agree that your data might be similar to DALES, but the same parameters may still not apply. The complexity/runtime depends on the number of planes extracted from the point cloud. For the case in your snapshot, the building is more complex than most of the buildings in DALES. It takes very long to complete because (1) the building has complex structures; (2) there are many unnecessary planes extracted from the point cloud, e.g., some detailed structures.
It is hard to tell which parameter setting is best for you. But the general idea for improving the efficiency is to reduce the number of extracted planes (thus the number of variables in the optimization problem will be greatly reduced). This could be achieved by the following strategies:
for extremely complex buildings, decompose them into a few parts and reconstruct each part separately.
Hope these ideas help.
Thank you very much for your reply. I think the 3 strategies make sense. I did read your paper closely to understand the framework of city3D, however, as I am not an expert or developer in CV and C++, it is a bit difficult to figure out how to use more demanding conditions for region growing, and what are the other parameters that can avoid detecting unnecessary minor/smaller planes. Could you suggest the specific file and parameters we can tune in your code, such as issue 4 and issue 18 replied by @yidahuang Thanks again.
First, grab the new code (I've removed some unnecessary parameters).
Some parameters are hard-coded in the City3D code in different files.
The most important one controls the number of points per planar region, which can be found here. You can increase it to keep planes having numbers of points larger than the specified number.
Internally the "detect(...)" function calls CGAL::Shape_detection::Region_growing::detect(...)
.
Some other related parameters are related to CGAL functions, which can be tuned here. These parameters are explained in the CGAL documentation.
Update:
I indeed fixed a bug that may cause an infinite loop.
The algorithm still tried to extract roofs even if the min_support had already been decreased to 0.
Thanks a lot for the help and update.
We get some problems in installing dependencies and city3d in windows with VS2022. I guess the VS2022 doesn't connect to vcpkg as the same way before, so I still stick with the previous code and gcal version. Just would like to share some parameter tuning results.
Here is the building points:
Here are the parameters I used to test the same building. Method_global.cpp: double number_region_growing = 80 point_set_region_growing.cpp: const FT search_sphere_radius = FT(50) / FT(100); const FT max_distance_to_plane = FT(15) / FT(100); const FT max_accepted_angle = FT(20);
The output model has fewer faces (but still a lot of faces) and can keep the main feature of the rooftop. But the parameter won’t always work for other large buildings, so still need to try different parameters.
Method_global.cpp: double number_region_growing = 120 point_set_region_growing.cpp: const FT search_sphere_radius = FT(25) / FT(100); const FT max_distance_to_plane = FT(15) / FT(100); const FT max_accepted_angle = FT(20); Fewer faces but lose features of rooftop
The result already looks quite good (some parts are hard to observe due to the per-face coloring). To explore for better parameters, it is worth to further look into the individual planar regions to better understand the effect of each parameter (and tests these using a variety of buildings of different styles). But anyway, it is still remains unknown what the optimal parameters are that work well for all models. One can always find an example to fail an reconstruction algorithm.
We've never tested our code with vckpkg.
I believe this issue can be closed. Please feel free to post followup questions.
Thanks for providing code and support on this work but sorry to trouble you.
If we try it in GUI, I set also number as 80 or 100, density is 0.3. We usually use command-line program in loop but I am not sure how to set number and density in code. It took nearly one day to construct the building. As shown below, I found there are too many faces in the model.![image](https://github.com/tudelft3d/City3D/assets/140426435/f2026dd2-81a2-4a74-b91c-e4d91ba70a24)
I think our data is similar to DALES dataset you used in the experiment, could you share with us the parameter used for large building modelling in DALES data? Alternatively, do you have any suggestions for our case as we have plenty of such large buildings?