Closed doublexxking closed 5 years ago
Are the point clouds roughly aligned initially? You can check this by visualizing them in open3d.
The point clouds is aligned. The PCL can give me correct results. And it is why the first iteration works fine but the second iteration always wrong.
I do not compile open3d but I change all to PCL to visualize the point cloud and check my results. After PCL, the two point clouds aligned very well..
*first*** count: 1076.000000 fitness: 1.000000 inlier rmse : 4.325136
*second*** count: 698.000000 fitness: 0.648699 inlier rmse : 78.470566
*third*** count: 0.000000
My model is in mm, so I set max_dist_diff = 100.0f;
I also attached two images, first one is before the ICP and the scond one is after the ICP
Can you paste some relevant codes? The bug is in the initial function of clouds and normals maybe.
After your hints, I find I actually got wrong normals. Thanks!!!
Hi @double344931987 . Do you have any sample code to run the ICP between a depth image form cuda_renderer in the repo and a random scene or between two random point clouds?
@meiqua In the get_normal() function in common.cpp, what units are following in and what do they signify :
int distance_threshold = 2000;
int difference_threshold = 5
Units: mm. distance_threshold: if depth is greater than this, normals are not calculated. difference_threshold: in the sliding window, if depth - center depth > threshold, depth at this pixel will not be considered for normal.
Hi. I used your code to implement my own data. I use PCL to read two point cloud from PCD files, one is Scene_nn scene; KDTree_cpu kdtree_cpu; scene.init_Scene_nn_cpu();
I also find normals from PCL and init KDTree in cup and push to GPU as init_Scene_nn_cuda does.
The other one is used by thrust::copy to get a device vector.
However, when I use cuda_icp::ICP_P2P_cuda to get results, I find the first iteration works fine, but it gives a crazy extrinsic (variable in ICP_P2P_cuda funtion). Thus, the second iteration cannot find a reasonable results and Ab[28] is 0 to return the function. The final result is the crazy extrinsic in first iteration.
I am not sure why it give me this results and I use your data works very good.
It is appreciate that you could give me some hints.
Thanks in advance.