Point Cloud Comparison to Detect Changes in Scene

Hello, I am using Kinect with Matlab to extract point two point clouds. Once aligned the point clouds are compared for differences. The difference is found by finding the nearest neighbor and comparing it to a threshold distance. If the distance is greater than the threshold, the point will be stored in a different point cloud. Please see attached script:
function [PCDifference,Indices] = ComparePC(pc1,pc2) %Compares two aligned point clouds [pc1r,~]=removeInvalidPoints(pc1); [pc2r,~]=removeInvalidPoints(pc2); minDist = 0.5; x=0;
%for each point in pc1 find nearest neighbor distance - if greater then %threshold distance store point cloud in PCDifference for i =1:pc1r.Count point=pc1r.Location(i,:); [~,dist]=findNearestNeighbors(pc2r,point,1); if dist > minDist %Store point cloud in indices x=x+1; Indices(x,1)=i end end %plotting difference in point clouds PCDifference=select(pc1r,Indices); figure pcshow(PCDifference)

2 件のコメント

Vaidyanathan Thiagarajan
Vaidyanathan Thiagarajan 2017 年 8 月 29 日
Hello Michael,
Can you please elaborate on what is the issue you are facing in comparing the two point clouds?
Vaidyanathan
John D'Errico
John D'Errico 2017 年 8 月 29 日
What is the problem? There must be some reason you are asking a question.

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

回答 (0 件)

質問済み:

2017 年 8 月 27 日

コメント済み:

2017 年 8 月 29 日

Community Treasure Hunt

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

Start Hunting!

Translated by