Visualize Point Cloud Using Color and Camera Views
Lidar Viewer provides various colors and camera view options to analyze point cloud data. From the Data Browser pane, select the point cloud that you want to visualize. For information on how to open the Lidar Viewer app and import data, see Import, View, and Export Point Cloud.
Color Controls
You can control the color of the displayed point cloud by using the options in the Color section of the app toolstrip:
Assign a colormap to use for rendering the point cloud as one of:
X
— Color the points based on the x-coordinate values of the input point cloud. The color changes as the distance between points increases.Y
— Color the points based on the y-coordinate values of the input point cloud. The color changes as the distance between points increases.Z
— Color the points based on the z-coordinate values of the input point cloud. The color changes as the distance between points increases."Intensity"
— Use theIntensity
values of the input point cloud to color the points. The color changes as the intensity value of points increases."Single Color"
— One color is used to render the point cloud."Radial Distance"
— Color the point cloud based on radial distance. The color changes as the distance between points and the ego vehicle increases.
When you select , the app opens the Customize
Color dialog box where you can select linear, logarithmic,
exponential, or sigmoid variation. When you select
Linear
, the color variation is linear along the axis you
select for the Color Source of the point cloud.
You can also modify the color variation by using the color bar.
Choose the color profile for the point cloud data from one of these options. Click
the restore arrow, to reset the selection to
Parula
.
Solid Color
Red to Blue
Parula
Jet
Spring
Hot
Color
For more details, see colormap
.
Note
The app displays the Color
option only when the
input point cloud has color information.
Select the background color for the point cloud display.
Camera Controls
The app provides various predefined camera angles for viewing the point cloud data. You can also save and organize views.
Note
A Windows® OS machine must have WebGL™ 2 support for graphics rendering.
Orthographic projection of the point cloud
Perspective projection of the point cloud
To visualize point cloud data in a 2-D plane, click Planar Views and select a 2-D plane from these options:
XY View
— View the xy-axes of a point cloud. This is the top view of the scene, and line of sight is along the z-axis.YX View
— View the yx-axes of a point cloud. This view is the mirror image of theXY View
with respect to the y-axis.YZ View
— View the yz-axes of a point cloud. This is the front view of the scene, and line of sight is along the x-axis.ZY View
— View the yz-axes of a point cloud. This view is the mirror image of theYZ View
with respect to the z-axis.XZ View
— View the xz-axes of a point cloud. This is a side view of the scene, and line of sight is along the y-axis.ZX View
— View the zx-axes of a point cloud. This view is the mirror image of theXZ View
with respect to the z-axis.
Select Orbital
or First
person
navigation controls. These controls describe the behavior
of the observer or first person, represented as the camera,
with respect to the object to visualize or orbital, represented
as the target.
Orbital
— Camera target is fixed. Only the camera position can change.First person
— Both the camera position and the target position can change.Note
The app enables first-person navigation for the perspective camera projection only.
This table lists the mouse interactions for the Orbital
and First person
camera controls:
Interaction | Orbital | First person |
---|---|---|
Rotate | Rotate the object around the observer. | Observer rotates (looks around the scene). |
Pan | Pan the object with respect to the observer. | Observer moves through the scene in the left, right, up, or down direction. |
Zoom | Zoom object toward or away from observer (makes the object appear larger or smaller). | Observer moves in the forward or backward direction. |
This table shows the orbital keyboard shortcuts:
Behavior | Keyboard shortcut |
---|---|
Rotate by Z-axis | Left and right arrows |
Rotate by X-axis | Up and down arrows |
Rotate by Y-axis | Q and E |
This table shows the first-person keyboard shortcuts:
Behavior | Keyboard Shortcut |
---|---|
Move forward | W — Forward S — Backward |
Move left or right | A — Left D — Right |
Move up or down | R — Up F — Down |
Look around the scene (pitch/yaw rotation of camera) | Up arrow — Pitch up Down arrow — Pitch down Left arrow — Yaw left Right arrow — Yaw right |
Roll the scene (roll rotation of camera) | Q — Clockwise roll E — Counter-clockwise roll |
The app enables you to rotate a point cloud for orbital navigation. Select any
point as the center of rotation. When the Rotate Around Point
is disabled, the center of rotation is the axes center. The Rotate Around
Point mode can only be used with the
Orbital
Navigation mode.
View from a high angle above a point cloud.
View the point cloud from a fixed distance behind the ego vehicle (actor). You can specify the ego direction by using the drop down.
View a point cloud from the perspective of the ego vehicle. You can specify the ego direction by using the drop down.
To save a view, click Save View > Save Camera View, specify a name for the view, and click OK. You can return to the saved view at any time by clicking Save View and then select the view from the Saved camera view names list, which appears after a view is saved. To delete or rename saved views, click Save View > Organize Camera Views.
Tip
You can adjust the point cloud view by using the x-, y-, z-axes at the bottom left corner of the visualization pane.
Size
Adjust the display size of the points by specifying the Point Size. For the first-person navigation using perspective projection, you can enlarge the points for better visualization. When you select Magnify Points, you can attenuate the size of the points based on the camera position. If the camera is positioned closer to the points, the points appear bigger than when the camera is far away. The Magnify Points option applies only for the perspective camera projection and the first person controls.
Segment
The app provides options to hide the ground and to view point cloud clusters.
Select Hide Ground to remove ground points from the point cloud. This enables the Ground Settings option. Click Ground Settings to open a dialog box in which you can select from these ground removal algorithms and specify their parameters.
Segment ground SMRF
(default) — Segment the ground points using thesegmentGroundSMRF
function.Fit ground plane
— Fit and filter the ground plane using thepcfitplane
function.Range-based floodfill
— Remove ground points using thesegmentGroundFromLidarData
function. The app enables this option for only organized point clouds.
To visualize the segmented ground and nonground planes on the point cloud, select View Ground Data.
Select View Cluster to view point cloud clusters. This enables the Cluster Settings option. Click Cluster Settings to open a dialog box in which you can select from these cluster-based coloring algorithms.
Select
Range-based clustering
to cluster point cloud data using thesegmentLidarData
function.Select
Distance-based clustering
to cluster point cloud data using thepcsegdist
function.Select
k-means clustering
to perform k-means clustering on the points.
You can specify the algorithm parameters in the dialog box, and visualize the output point cloud clusters.
See Also
Apps
Topics
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: United States.
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)