Open yzl96 opened 5 years ago
Yes, you use different points in the input cloud, but the transform is nevertheless the same, 0.7
along the x axis. Why would it be different?
@taketwo , I did use different points in the input cloud, but my output point cloud is fixed, my output cloud have 100 points, which are generated by add 0.7 to x axis from first 100 points of the input point cloud, if I set indices [0,99] of input point cloud, there is a transformation 0.7 in x axis between input cloud subset and output cloud, but if I set indices [100,199], there should no relation between input cloud subset and output cloud, my output point cloud is generate from the first 100 points of input cloud, it has no relation with the input cloud subset (indices from 100 to 199).
@taketwo , how can it be same, the setIndices function choose the subset of input point cloud to register with output cloud, I use different subset of input cloud, and output point cloud is fixed, why the transfomation is the same, the input of registration is different.
Hi, actually you may be right about this one. I had a brief look at the ICP code and it does not seem to pay attention to supplied indices indeed.
Marking this as stale due to 30 days of inactivity. It will be closed in 7 days if no further activity occurs.
I first generate 1000 random points to form the source point cloud: for (size_t i = 0; i < cloud_in->points.size (); ++i) { cloud_in->points[i].x = 1024 rand () / (RAND_MAX + 1.0f); cloud_in->points[i].y = 1024 rand () / (RAND_MAX + 1.0f); cloud_in->points[i].z = 1024 * rand () / (RAND_MAX + 1.0f); } and then form the target point cloud from the front 100 points of source point cloud , and add 0.7 to x for (size_t i = 0; i < cloud_out->points.size (); ++i) { cloud_out->points[i].x = cloud_in->points[i].x + 0.7f; cloud_out->points[i].y = cloud_in->points[i].y; cloud_out->points[i].z = cloud_in->points[i].z; } I try two times for the indices: boost::shared_ptr< std::vector > pr(new std::vector);
// first try
// for(int i=0; i<100; i+=1)
// pr->push_back(i);
// second try
for(int i=100; i<200; i+=1)
pr->push_back(i);
but the result transformation is the same, if the setIndices works, the result shouldn't be the same, because the points in source point cloud we use to registration is different.
Your Environment
Context
Expected Behavior
Current Behavior
Code to Reproduce
Possible Solution