/RegARD

Registration based on Architectural Reflection Detection (RegARD) is a free and fast library for building layout registration from point sets, i.e., points sampled from point clouds or floor plans.

Primary LanguageC++

About RegARD

The Registration based on Architectural Reflection Detection (RegARD) is a free and fast library for building layout registration from point sets, i.e., points sampled from point clouds or floor plans.

How to cite

Wu, Y., Shang J., and Xue F.*. RegARD: Symmetry-based Coarse Registration of Smartphone’s Colorful Point Clouds with CAD Drawings for Low-cost Digital Twin Buildings. (under review)

How does it work

First, RegARD detects the innate architectural reflection symmetries based on ODAS for the globally optimal rotation constants and proposes an initial alignment based on the symmetry axes. Then, RegARD applies advanced derivative-free optimization (DFO) algorithms to optimize the other degrees of freedom (5-DoF), i.e., translation and scaling.

Why RegARD is fast for building layout registration

The 5-DoF registration for building layouts is challenging due to the omnipresent self-similarities inside buildings. RegARD separates the 5-DoF problem into two subproblems: i.e., one for determining the possible rotations and the other for optimizing the translation and scaling. This indicating we only optimize 4 DoF based on highly accurate rotation, which significantly improves the registration efficiency.

Dependencies

Codes have only been tested on Ubuntu 18.04 and 20.04. The following guidelines are mainly for Ubuntu. Welcome any other contributions or experiments on the other platform :)

  • nlopt Installation for both C++ and Python is required.
  • libcmaes
  • open3d
  • numpy
  • odas We provided a simplified odas for RegARD in the "odas-RegARD" fold. The libodas.so can be built from the source of odas-RegARD and then be imported by the ard.py. Or if the local locations and versions of the dependencies of odas are the same as those of odas-RegARD, you can use the complied libodas.so directly.
  • Python version: 3.8

Registration

Note that the two point sets for registration are sampled from the CAD drawing and the 2D projected point cloud respectively. So, the code and args named the data as 'fp' and 'pc' or 'as-designed' and 'as-built'.

  • Detect the architectural reflection axes (the ard part)

Run the ard with:

python3 ard.py --fp <fp-pcd> --pc <pc-pcd> --fitness <threshold of fitness>

If both fitnesses of 'fp' and 'pc' are less than the threshold, then we suggest using the 4-DoF transformation optimization. You can copy the outputted parameters of the symmetric axes '--fp_r <fp_r> --fp_theta <fp_theta> --pc_r <pc_r> --pc_theta <pc_theta>' and pass to the reg.py.

Otherwise, we suggest using the 5-DoF transformation optimization.

  • Registration (the reg part)

Run the 4-DoF registration with:

python3 reg.py --fp <fp-pcd> --pc <pc-pcd> --reg_fig <reg-fig> --ard_fig <ard-fig> --fp_r <fp_r> --fp_theta <fp_theta> --pc_r <pc_r> --pc_theta <pc_theta>

Or run the 5-DoF registration with:

python3 reg.py --fp <fp-pcd> --pc <pc-pcd> --reg_fig <reg-fig>

Graphic results will be saved in and (if applicable).

  • Graphic example

Before registration

After registration

Authors' Contacts

License

LGPL-3.0

Acknowledgements

This work was supported by the Research Grant Council (RGC) of Hong Kong SAR (Nos. 17200218, 27200520).