| 108 | } |
| 109 | |
| 110 | void GrorPre::grorPreparation(pcl::PointCloud<pcl::PointXYZ>::Ptr origin_cloudS, pcl::PointCloud<pcl::PointXYZ>::Ptr origin_cloudT,pcl::PointCloud<pcl::PointXYZ>::Ptr cloudS, pcl::PointCloud<pcl::PointXYZ>::Ptr cloudT, pcl::PointCloud<pcl::PointXYZ>::Ptr issS, pcl::PointCloud<pcl::PointXYZ>::Ptr issT, pcl::CorrespondencesPtr corr,double resolution) |
| 111 | { |
| 112 | int max_corr = 5;// neighbor number in descriptor searching |
| 113 | auto t = std::chrono::system_clock::now(); |
| 114 | /*=============down sample point cloud by voxel grid filter=================*/ |
| 115 | std::cout << "/*voxel grid sampling......" << resolution << std::endl; |
| 116 | GrorPre::voxelGridFilter(origin_cloudS, cloudS, resolution); |
| 117 | GrorPre::voxelGridFilter(origin_cloudT, cloudT, resolution); |
| 118 | |
| 119 | auto t1 = std::chrono::system_clock::now(); |
| 120 | std::cout << "/*Down!: time consumption of cloud down sample : " << double(std::chrono::duration_cast<std::chrono::milliseconds>(t1 - t).count()) / 1000.0 << std::endl; |
| 121 | std::cout << "/*=================================================*/" << std::endl; |
| 122 | |
| 123 | /*=========================extract iss key points===========================*/ |
| 124 | std::cout << "/*extracting ISS keypoints......" << std::endl; |
| 125 | pcl::PointIndicesPtr iss_IdxS(new pcl::PointIndices); |
| 126 | pcl::PointIndicesPtr iss_IdxT(new pcl::PointIndices); |
| 127 | GrorPre::issKeyPointExtration(cloudS, issS, iss_IdxS, resolution); |
| 128 | GrorPre::issKeyPointExtration(cloudT, issT, iss_IdxT, resolution); |
| 129 | auto t2 = std::chrono::system_clock::now(); |
| 130 | std::cout << "/*Down!: time consumption of iss key point extraction: " << double(std::chrono::duration_cast<std::chrono::milliseconds>(t2 - t1).count()) / 1000.0 << std::endl; |
| 131 | std::cout << "/*=================================================*/" << std::endl; |
| 132 | |
| 133 | |
| 134 | /*======================fpfh descriptor computation=========================*/ |
| 135 | std::cout << "/*fpfh descriptor computation......" << std::endl; |
| 136 | pcl::PointCloud<pcl::FPFHSignature33>::Ptr fpfhS(new pcl::PointCloud<pcl::FPFHSignature33>()); |
| 137 | pcl::PointCloud<pcl::FPFHSignature33>::Ptr fpfhT(new pcl::PointCloud<pcl::FPFHSignature33>()); |
| 138 | GrorPre::fpfhComputation(cloudS, resolution, iss_IdxS, fpfhS); |
| 139 | GrorPre::fpfhComputation(cloudT, resolution, iss_IdxT, fpfhT); |
| 140 | auto t3 = std::chrono::system_clock::now(); |
| 141 | std::cout << "/*Down!: time consumption of fpfh descriptor computation: " << double(std::chrono::duration_cast<std::chrono::milliseconds>(t3 - t2).count()) / 1000.0 << std::endl; |
| 142 | std::cout << "/*size of issS = " << issS->size() << "; size of issT = " << issT->size() << std::endl; |
| 143 | std::cout << "/*=================================================*/" << std::endl; |
| 144 | |
| 145 | /*========================correspondences matching=========================*/ |
| 146 | std::cout << "/*matching correspondences..." << std::endl; |
| 147 | std::vector<int> corr_NOS, corr_NOT; |
| 148 | GrorPre::correspondenceSearching(fpfhS, fpfhT, *corr, max_corr, corr_NOS, corr_NOT); |
| 149 | auto t4 = std::chrono::system_clock::now(); |
| 150 | std::cout << "/*Down!: time consumption of matching correspondences: " << double(std::chrono::duration_cast<std::chrono::milliseconds>(t4 - t3).count()) / 1000.0 << std::endl; |
| 151 | std::cout << "/*number of correspondences= " << corr->size() << std::endl; |
| 152 | std::cout << "/*=================================================*/" << std::endl; |
| 153 | } |
| 154 | |
| 155 | void GrorPre::grorPreparation(pcl::PointCloud<pcl::PointXYZ>::Ptr origin_cloudS, pcl::PointCloud<pcl::PointXYZ>::Ptr origin_cloudT, pcl::PointCloud<pcl::PointXYZ>::Ptr cloudS, pcl::PointCloud<pcl::PointXYZ>::Ptr cloudT, pcl::PointCloud<pcl::PointXYZ>::Ptr issS, pcl::PointCloud<pcl::PointXYZ>::Ptr issT, Eigen::Vector3f ¢erS, Eigen::Vector3f ¢erT, pcl::CorrespondencesPtr corr, double resolution) |
| 156 | { |
nothing calls this directly
no outgoing calls
no test coverage detected