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 .
![](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!