- Fit a 3D plane to the 3D point cloud using least squares and project the points into 2D
- Then follow RANSAC algorithm to find the edges and find the corners
- Or use polygon generalization algorithm for finding the edges and estimating the corners
How to find the corner points in a 3d point cloud?
31 次查看(过去 30 天)
显示 更早的评论
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
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/332321/image.jpeg)
0 个评论
回答(1 个)
Sri Harsha Kondapalli
2020-7-15
3 things I can suggest
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
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Point Cloud Processing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!