segmentGro​undFromLid​arData for pcd file

2 ビュー (過去 30 日間)
Ahmed Iftekhar
Ahmed Iftekhar 2020 年 5 月 4 日
コメント済み: Pavan Kumar B N 2021 年 6 月 16 日
Hello,
I want to preprocess some lidar data in .pcd format. I tried "segmentGroundFromLidarData" algorithm to segment the groud but this code is written for .pcap format. In pcd fromat it has (m by n matrics size) on the other hand, pcap file has (m by n by 3 matrics) size.
Any thought of how to format pcd file into pcap file? or any other matlab libraries to deal with pcd file?
SIncerely,
Ahmed

回答 (1 件)

Mahesh Taparia
Mahesh Taparia 2020 年 5 月 11 日
Hi
The input of the function segmentGroundFromLidarData will be a point cloud. You mentioned that your file is having mxn array. Are you using only intensity matrix as input? But the point cloud data will be in structure format and that structure will be the input to the function. For more information, you can refer to this example in documentation page.
  3 件のコメント
Mahesh Taparia
Mahesh Taparia 2020 年 5 月 12 日
It seems you are having an unorganised point cloud data. You can use pcfitplane function, refer to this documentation. You can refer to this question which is already answered in the community.
Pavan Kumar B N
Pavan Kumar B N 2021 年 6 月 16 日
%% for PCAP files
veloReader = velodyneFileReader('file.pcap','VLP16');
ptCloudObj = readFrame(veloReader,44);
%% for PCD Files you use pcread
ptCloudObj = pcread('file.pcd');
ptCloudSegGround = pcdSegmentGround(ptCloudObj);
figure
pcshow(ptFilCloud)
hold on
plot(ptCloudSegGround)
function [model] = pcdSegmentGround(ptCloudSrc)
disp(size(ptCloudSrc.Location))
% Use pcfitplane
maxDistance = 0.2;
referenceVector = [0 0 1];
model = pcfitplane(ptCloudSrc, maxDistance, referenceVector)
end

サインインしてコメントする。

カテゴリ

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