Segment each point cloud and add the features and point cloud segments to the map.
for n = 1:numel(ptCloudScans);
ptCloud = ptCloudScans(n);
% Segment and remove the ground plane.
groundPtsIdx = segmentGroundFromLidarData(ptCloud,'ElevationAngleDelta',11);
ptCloud = select(ptCloud,~groundPtsIdx,'OutputSize','full');
% Select cylindrical neighborhood.
dists = sqrt(ptCloud.Location(:,:,1).^2 + ptCloud.Location(:,:,2).^2);
cylinderIdx = dists <= outerCylinderRadius ...
& dists > innerCylinderRadius;
ptCloud = select(ptCloud,cylinderIdx,'OutputSize','full');
% Segment the point cloud.
[labels, numClusters] = segmentLidarData(ptCloud,distThreshold,angleThreshold,'NumClusterPoints',[50 5000]);
% Extract features from the point cloud.
[features,segments] = extractEigenFeatures(ptCloud,labels);
% Add the features and segments to the map.
sMap = addView(sMap,n,features,segments);
end
Original map of segments and features, specified as a pcmapsegmatch
object.
View identifier, specified as an integer. Each view identifiers is unique to a
specific view.
Eigenvalue-based features, specified as a vector of eigenFeature
objects. The function filters out features that already exist in the map are filtered
out as duplicates based on their centroid location and the distance specified by the
CentroidDistance property of the map.
You should extract new features from only a point cloud registered to the point
clouds of existing features
Point cloud segments, specified as a vector of pointCloud objects. To use the show object
function for visualization, you must specify this argument.
For improved performance, do not include segments in the map
with findPose and
updateMap
object functions. Alternatively, you can use the deleteSegments object function to remove the existing segments before
using findPose or
updateMap.
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window.
Web browsers do not support MATLAB commands.
Website auswählen
Wählen Sie eine Website aus, um übersetzte Inhalte (sofern verfügbar) sowie lokale Veranstaltungen und Angebote anzuzeigen. Auf der Grundlage Ihres Standorts empfehlen wir Ihnen die folgende Auswahl: .
Sie können auch eine Website aus der folgenden Liste auswählen:
So erhalten Sie die bestmögliche Leistung auf der Website
Wählen Sie für die bestmögliche Website-Leistung die Website für China (auf Chinesisch oder Englisch). Andere landesspezifische Websites von MathWorks sind für Besuche von Ihrem Standort aus nicht optimiert.