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

48 ビュー (過去 30 日間)
Ali
Ali 2020 年 7 月 15 日
回答済み: Sri Harsha Kondapalli 2020 年 7 月 15 日
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

回答 (1 件)

Sri Harsha Kondapalli
Sri Harsha Kondapalli 2020 年 7 月 15 日
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

カテゴリ

Help Center および File ExchangePoint Cloud Processing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by