How to find distance between two points in a point cloud?

10 ビュー (過去 30 日間)
Ajith Kumar Rajendra
Ajith Kumar Rajendra 2021 年 1 月 2 日
コメント済み: Image Analyst 2021 年 1 月 5 日
I have a point cloud obtained from kinect in matlab. I need to find distance between any two points of my interest. If possible how do I select the points and find distance between them, please help me.

採用された回答

Image Analyst
Image Analyst 2021 年 1 月 2 日
Use sqrt().
First convert x and y to cm or m or whatever units your depth image are in (VERY IMPORTANT).
Then just do
z1 = depthImage(y1, x1);
z2 = depthImage(y2, x2);
distance = sqrt((x1-x2)^2 + (y1-y2)^2 + (z1-z2)^2)
  2 件のコメント
Ajith Kumar Rajendra
Ajith Kumar Rajendra 2021 年 1 月 4 日
Thanks, I was able to find the distance. I would like to ask you if there's a way to select the points using user interface, for example like selecting points through user click in normal plots using improfile. Is there any way to select points like that in point cloud when viewing through pcplayer?
Image Analyst
Image Analyst 2021 年 1 月 5 日
I don't know of any convenient way to select data points in a 3-D scatter plot. Sorry. There probably is though. Call tech support.

サインインしてコメントする。

その他の回答 (0 件)

製品


リリース

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by