I was trying to implement aerial semantic segmentation but I am facing issue in blocekPointCloud sentence of bpc = blockedPointCloud(fs,blocksize);
2 次查看(过去 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 .
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1031600/image.png)
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!