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

Source code of CVPR 2023 paper
MIT License
446 stars 52 forks source link

How to modify parameters when use lidar pointcloud #7

Open xiaoxueshengyao opened 1 year ago

xiaoxueshengyao commented 1 year ago

Thank you for your excellent work! I tried to use this algorithm for lidar point cloud of 16 scans. While I can not get correct transform. Should I modify some parameters for that. The picture is the transform result.

WXWorkCapture_16878557976169

zhangxy0517 commented 1 year ago

To test KITTI data by running ./MAC --demo command, you should modify the demo function in main.cpp:

    float downsample = 0.3; //larger value for sparse pointcloud
    Voxel_grid_downsample(src_cloud, new_src_cloud, downsample);
    Voxel_grid_downsample(des_cloud, new_des_cloud, downsample);
    vector<vector<float>> src_feature, des_feature;
    FPFH_descriptor(new_src_cloud, downsample*5, src_feature);
    FPFH_descriptor(new_des_cloud, downsample*5, des_feature);

    vector<Corre_3DMatch>raw_correspondence, correspondence;
    feature_matching(new_src_cloud, new_des_cloud, src_feature, des_feature, raw_correspondence);

    // randomly downsample correspondences
    vector<int>rand_idx;
    boost_rand(5000, 0, (int)raw_correspondence.size() - 1, 5000, rand_idx);
    for(int i = 0; i< 5000; i++){
        correspondence.push_back(raw_correspondence[rand_idx[i]]);
    }

    registration(src_cloud, des_cloud, correspondence, ov_lable, folderPath, resolution, 0.95); //FPFH 0.95 or 0.9
xiaoxueshengyao commented 1 year ago

Thanks for your reply. I tyied fix code like you suggested, and it is really useful for sparse lidar pointcoud. While it can not cover all of frame to frame registration. And I can not get correct result when I tried to use it for frame to map registration. Is it not applicable for that? Some bad results like this frame2map

zhangxy0517 commented 1 year ago

It seems that the frame point cloud is too sparse for FPFH to extract discriminative features. I think you may try some deep-learned methods mentioned in our paper to generate correspondences first, then feed the correspondences to MAC.

CHANdaFeng commented 1 year ago

Hello, may I ask how to modify the parameters according to the above operation and test two frames of 16 line LiDAR point clouds? One frame of point cloud has about 50000 points, but the calculation time is very long. Can you give some suggestions on how to modify the parameters。 The following are the results of terminal operation: ./MAC --demo Start registration. graph construction: 29.6819

coefficient computation: 368.68 340.93->min(340.93 1127.72 576.63) clique computation: 5.57187 clique selection: 32.3755 hypothesis generation & evaluation: 0.216686 14 : 1206 1133 1220.67

Untitled

zhangxy0517 commented 1 year ago

To test KITTI data by running ./MAC --demo command, you should modify the demo function in main.cpp:

    float downsample = 0.3; //larger value for sparse pointcloud
    Voxel_grid_downsample(src_cloud, new_src_cloud, downsample);
    Voxel_grid_downsample(des_cloud, new_des_cloud, downsample);
    vector<vector<float>> src_feature, des_feature;
    FPFH_descriptor(new_src_cloud, downsample*5, src_feature);
    FPFH_descriptor(new_des_cloud, downsample*5, des_feature);

    vector<Corre_3DMatch>raw_correspondence, correspondence;
    feature_matching(new_src_cloud, new_des_cloud, src_feature, des_feature, raw_correspondence);

    // randomly downsample correspondences
    vector<int>rand_idx;
    boost_rand(5000, 0, (int)raw_correspondence.size() - 1, 5000, rand_idx);
    for(int i = 0; i< 5000; i++){
        correspondence.push_back(raw_correspondence[rand_idx[i]]);
    }

    registration(src_cloud, des_cloud, correspondence, ov_lable, folderPath, resolution, 0.95); //FPFH 0.95 or 0.9

Please follow the above instructions. If the processing time is still significant, increase the parameter of the last line, for example, to 0.999

CHANdaFeng commented 1 year ago

Hello, my problem has been resolved,Thank you very much!