Point Cloud Comparison to Detect Changes in Scene
Mostrar comentarios más antiguos
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 comentarios
Vaidyanathan Thiagarajan
el 29 de Ag. de 2017
Hello Michael,
Can you please elaborate on what is the issue you are facing in comparing the two point clouds?
Vaidyanathan
John D'Errico
el 29 de Ag. de 2017
What is the problem? There must be some reason you are asking a question.
Respuestas (0)
Categorías
Más información sobre Kinect For Windows Sensor en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!