I was trying to implement aerial semantic segmentation but I am facing issue in blocekPointCloud sentence of bpc = blockedPointCloud(fs,blocksize);
1 回表示 (過去 30 日間)
古いコメントを表示
dataFolder = fullfile(tempdir,'DALES');
trainDataFolder = fullfile(dataFolder,'dales_las','train');
testDataFolder = fullfile(dataFolder,'dales_las','test');
lasReader = lasFileReader(fullfile(trainDataFolder,'5080_54435.las'));
[pc,attr] = readPointCloud(lasReader,'Attributes','Classification');
labels = attr.Classification;
% Select only labeled data.
pc = select(pc,labels~=0);
labels = labels(labels~=0);
classNames = [
"ground"
"vegetation"
"cars"
"trucks"
"powerlines"
"fences"
"poles"
"buildings"
];
figure;
ax = pcshow(pc.Location,labels);
helperLabelColorbar(ax,classNames);
title("Point Cloud with Overlaid Semantic Labels");
blocksize = [51 51 Inf];
fs = matlab.io.datastore.FileSet(trainDataFolder);
bpc = blockedPointCloud(fs,blocksize);
numClasses = numel(classNames);
[weights,maxLabel,maxWeight] = helperCalculateClassWeights(fs,numClasses);
ldsTrain = blockedPointCloudDatastore(bpc);
labelIDs = 1 : numClasses;
ptcld = preview(ldsTrain);
figure;
pcshow(ptcld.Location);
title("Cropped Point Cloud");
ABOVE IS THE CODE AND FOLLOWING ARE THE ERRORS .KINDLY HELP TO ME RESOVE THIS ISSUE BECAUSE ITS NOT DISPLAYING THE DESIRED OUTPUT WHICH IS CROPPED POINT CLOUD .
1 件のコメント
Vamsi Krishna Bandaru
2023 年 8 月 24 日
I am not an expert, but from my understanding its reading a windows shortcut file, namely 'train - Shortcut.lnk' . remove that shortcut from the folder and try again
回答 (1 件)
Sanjana
2023 年 10 月 27 日
Hi Shailja,
I understand that you are facing an issue with creating “blockedPointCloudObject”. As per the documentation, the Point Cloud data Sources provided to the “blockedPointCloudObject” should be of “.LAS ” or “.LAZ” format, so because of the presence of “.lnk” in the fileSet Object, you are facing the above issue. To resolve the issue, remove the “.lnk” file from the source files folder.
Please refer to the following documentation for further information,
Hope this helps!
Regards,
Sanjana
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!