フィルターのクリア

ICP apparently doesn't work!

3 ビュー (過去 30 日間)
Mostafa Asheghan
Mostafa Asheghan 2022 年 5 月 29 日
回答済み: Ayush Anand 2023 年 8 月 31 日
Hi.
I wrote this code to check icp:
*********
A=[0 0 0;0 0 1;0 1 0;0 1 1;1 0 0;1 0 1;1 1 0;1 1 1];
B=A+.5;
Apc=pointCloud(A);
Bpc=pointCloud(B);
[tf,Bpcicp]=pcregistericp(Bpc,Apc);
*****
I expected a unity Rotation and a 0.5 shift Translation in tf, but Bpcicp was found equal to Bpc. I cannot understand why Bpc is not shifted to A. Thanks.

回答 (1 件)

Ayush Anand
Ayush Anand 2023 年 8 月 31 日
Hi Mostafa,
I understand you want to test icp using the matrices A and B and how "pcregistericp" works with the corresponding point clouds; and are not getting the expected results. This is because "pcregistericp" expects both the point clouds to be of the same size. In your code, Apc and Bpc have different sizes as A and B have different sizes, hence the unexpected behavior.
You can resize the B matrix to match the dimensions of A before generating the point clouds, and keep the rest of the code as it is:
numPoints = size(A, 1);
B = B(1:numPoints, :);
This will result in Apc and Bpc having the same size and should give the expected results.
I hope this helps!

カテゴリ

Help Center および File ExchangePoint Cloud Processing についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by