int x = p.x; int y = p.y; int z = p.z; std::unordered_map<int, int> countMap6; for (const auto& edge : result) { if (edge.src.x == x && edge.src.y == y && edge.src.z == z) countMap6[edge.src]++; if (edge.tgt.x == x && edge.tgt.y == y && edge.tgt.z == z) countMap6[edge.tgt]++; } int begin = 0; for (const auto& pair1 : countMap6) { if (pair1.second >= 3) { std::cout << "该点坐标: " << pair1.first << " 出现 " << pair1.second << " 次" << std::endl; //cout << cloud->points[pair.first] << endl; pcl::PointXYZ point3 = cloud->points[pair1.first]; }

改写下列代码为判断点已知点pxyz在result中出现的次数stdunordered_mapint int countMap6;			for const auto& edge result							countMap6edgesrc++;				countMap6edgetgt++;						int begin = 0;			for const auto& pair1 countMap6

原文地址: http://www.cveoy.top/t/topic/hQXR 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录