%% Inspect Point Cloud Image
% Access and visualize the data inside a point cloud message.
% Create sample ROS messages and inspect a point cloud image. ptcloud is a sample ROS PointCloud2 message object.

exampleHelperROSLoadMessages
ptcloud

%
% Get RGB info and xyz-coordinates from the point cloud using readXYZ and readRGB.

xyz = readXYZ(ptcloud);
rgb = readRGB(ptcloud);

%
% Display the point cloud in a figure using scatter3.

scatter3(ptcloud)

% Copyright 2019 The MathWorks, Inc.