I was trying to implement aerial semantic segmentation but I am facing issue in blocekPointCloud sentence of bpc = blockedPointCloud(fs,blocksize);
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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 comentario
Vamsi Krishna Bandaru
el 24 de Ag. de 2023
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
Respuestas (1)
Sanjana
el 27 de Oct. de 2023
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 comentarios
Ver también
Categorías
Más información sobre Point Cloud Processing en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!