concatenate
Description
Examples
Combine Set of Point Clouds and Point Attributes
Create a lasFileReader
object and read point cloud data and the associated classification point attributes from a LAZ file.
pcfile1 = fullfile(toolboxdir("lidar"),"lidardata", ... "las","aerialLidarData.laz"); lasReader1 = lasFileReader(pcfile1); [ptCloud1,ptAttr1] = readPointCloud(lasReader1,Attributes="Classification");
Create another lasFileReader
object and read point cloud data and the associated classification point attributes from a LAS file.
pcfile2 = fullfile(toolboxdir("lidar"),"lidardata", ... "las","aerialLidarData2.las"); lasReader2 = lasFileReader(pcfile2); [ptCloud2,ptAttr2] = readPointCloud(lasReader2,Attributes="Classification");
Concatenate the data from the two point clouds into a single point cloud. Then, concatenate their lidar point attributes.
ptCloudOut = pccat([ptCloud1; ptCloud2]); ptAttrOut = concatenate([ptAttr1; ptAttr2]);
Display the concatenated point clouds. Specify the color based on the concatenated classification attributes.
pcshow(ptCloudOut.Location,ptAttrOut.Classification);
Input Arguments
ptAttrs
— Lidar point attributes
array of lidarPointAttributes
objects
Lidar point attributes, specified as an array of lidarPointAttributes
objects.
Output Arguments
ptAttrOut
— Concatenated lidar point attributes
lidarPointAttributes
object
Concatenated lidar point attributes, returned as a
lidarPointAttributes
object.
Note
If any property of an input lidarPointAttributes
object
contains an empty array, then the function does not concatenate that property and
returns an empty array for that property in the concatenated output. For example, if
some input lidarPointAttributes
objects have values for the
Classification
property, but another one has an empty array,
then the function returns an empty array for the Classification
property of ptAttrOut
.
Version History
Introduced in R2024a
See Also
Functions
Objects
MATLAB Command
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.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)