zhangxy0517 / 3D-Registration-with-Maximal-Cliques

Source code of CVPR 2023 paper
MIT License
421 stars 45 forks source link

bad_alloc() #29

Closed JzHuai0108 closed 10 months ago

JzHuai0108 commented 10 months ago

Dear authors,

Thank you for the open source. We are using it to register two large point clouds, each about 1 million points. The demo program is changed to load two custom point clouds from files. Here is the log.

[pcl::VoxelGrid::applyFilter] Leaf size is too small for the input dataset. Integer indices would overflow.[pcl::VoxelGrid::applyFilter] Leaf size is too small for the input dataset. Integer indices would overflow.Computing FPFH feature...
Feature matching...
Start registration.
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc

How do we fix it?

zhangxy0517 commented 10 months ago

From the logs, there is an issue with the downsampling parameter settings. Having too many points generates a massive number of correspondences, leading to memory allocation failures. You can try setting downsample to be equal to 5*resolution.

JzHuai0108 commented 10 months ago

This indeed prevents the bad alloc. Thank you.