How to find the corner points in a 3d point cloud?

49 Ansichten (letzte 30 Tage)
Ali
Ali am 15 Jul. 2020
I want to find the 4 corners in a given 3d point cloud as indicated in the image below.
Note: The point cloud shown below is of a trapezoid, any approach that works for other point clouds and shapes such as triangles and rectangles is a big plus ;-)
clc
clear
% close all
% input point cloud file gui
[FileName,PathName] = uigetfile({'*.pcd;*.ply;',...
'Point Cloud Files (*.pcd,*.ply)';
'*.pcd','Point Cloud library files (*.pcd)'; ...
'*.ply','Polygon Mesh Point Cloud files (*.ply)';
'*.*', 'All Files (*.*)'}, ...
'Select a Point Cloud File');
ptCloud=pcread([PathName,FileName]);
points = ptCloud.Location;
x = points(:,1);
y = points(:,2);
z = points(:,3);
figure('Name','Point Cloud Preview');
pcshow(ptCloud);
title('Point Cloud Preview');
colormap white
hold on

Antworten (1)

Sri Harsha Kondapalli
Sri Harsha Kondapalli am 15 Jul. 2020
3 things I can suggest
  1. Fit a 3D plane to the 3D point cloud using least squares and project the points into 2D
  2. Then follow RANSAC algorithm to find the edges and find the corners
  3. Or use polygon generalization algorithm for finding the edges and estimating the corners
https://gis.stackexchange.com/questions/22895/finding-minimum-area-rectangle-for-given-points http://resources.esri.com/help/9.3/arcgisengine/java/gp_toolref/data_management_toolbox/generalizing_polygon_features.htm

Community Treasure Hunt

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

Start Hunting!

Translated by