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
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
2017 年 8 月 29 日
What is the problem? There must be some reason you are asking a question.
回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Kinect For Windows Sensor についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!