Documentation

PCSHOW

图3-D点云

描述

example

pcshow(ptCloud)displays points using the locations and colors stored in the point cloud object.

pcshow(xyzPoints)displays points specified by thexyzPoints矩阵。

pcshow(xyzPoints,颜色)显示在xyzPoints矩阵,带有颜色颜色

pcshow(xyzPoints,颜色Map)显示在xyzPoints矩阵,带有颜色颜色Map

pcshow(文件名)显示存储在指定的文件中的点云文件名

pcshow(___,姓名,Value)uses additional options specified by one or more姓名,Value配对参数,使用前面的任何语法。

ax= pcshow(___)returns the plot axes.

例子

collapse all

Generate a sphere consisting of 600-by-600 faces.

numFaces = 600; [x,y,z] = sphere(numFaces);

Plot the sphere using the default color map.

数字;pcshow([x(:),y(:),z(:)));标题('Sphere with Default Color Map');xlabel('X');ylabel('Y');zlabel('Z');

Load and display an image for texture mapping.

I = im2double(imread('visionteam1.jpg')); imshow(I);

调整并翻转图像以映射坐标。

J = flipud(imresize(I,size(x)));

Plot the sphere with the color texture.

pcshow([x(x(:),y(:),z(:)],rephape(j,[],3));标题(“带有颜色纹理的球”);xlabel('X');ylabel('Y');zlabel('Z');

Input Arguments

collapse all

Point cloud, specified as aPointCloud目的。该对象包含位置,强度和RGB颜色以呈现点云。

点云属性 Color Rendering Result
地点只要 将Z值映射到当前颜色图中的颜色值。
地点andIntensity 将强度映射到当前颜色图中的颜色值。
地点andColor Use provided color.
地点,Intensity, andColor Use provided color.

Point cloud filename, specified as a character vector or a scalar string. The file must be supported bypcreadPCSHOWcallspcread要从文件中读取点云,但不会将数据存储在MATLAB中®工作区。

Point cloudx,y, andz位置, specified as either anM-by-3或anM-经过-N-经过-3 numeric matrix. ThexyzPointsnumeric matrix containsMorM-经过-N[x,y,z]点。这zvalues in the matrix, which generally corresponds to depth or elevation, determine the color of each point. When you do not specify theC输入颜色,函数映射zvalue to a color in the current colormap.

Point cloud color of points, specified as one of:

您可以为所有点指定相同的颜色或每个点的不同颜色。当您设置时C单身的or双倍的,RGB值在[0,1]之间。当您设置时CUINT8,值介于[0,255]之间。

Points Input Color Selection 有效值C
xyzPoints Same color for all points ColorSpec (Color Specification)颜色角色向量or a 1-by-3 RGB vector

每个点的不同颜色 M-by-3矩阵或M-经过-N-by-3矩阵,包含每个点的RGB值。

Point cloud color of points, specified as one of:

  • M-经过-1 vector

  • M-经过-Nmatrix

Points Input Color Selection 有效值C
xyzPoints 每个点的不同颜色 Vector orM-经过-N矩阵。矩阵必须包含线性映射到当前颜色的值颜色map

姓名-Value Pair Arguments

Specify optional comma-separated pairs of姓名,Value参数。姓名is the argument name andValueis the corresponding value.姓名must appear inside quotes. You can specify several name and value pair arguments in any order asNAME1,Value1,...,Namen,Valuen

例子:'垂直线索','向上'sets the vertical axis direction to up.

标记的直径, specified as the comma-separated pair consisting of '标记'和一个积极的标量。该值指定点标记的近似直径。MATLAB图形将单元定义为点。大于六的标记尺寸可以降低渲染性能。

Vertical axis, specified as the comma-separated pair consisting of '垂直' and'X','Y', 或者'Z'。当您重新加载一个保存的图形时,图上的任何动作将垂直轴重置为z-轴。

Vertical axis direction, specified as the comma-separated pair consisting of '垂直线索' and'向上'or'Down'。当您重新加载一个保存的图形时,该图上的任何动作都将方向重置向上方向。

输出轴,指定为逗号分隔对,由'父母' 和图形对象that displays the point cloud visualization.

Note

您无法设置'的价值父母' to auiaxesobject (created using theuiaxes功能)。

输出参数

collapse all

情节轴,返回图形对象。

You can set the default center of rotation for the point cloud viewer to rotate around the axes center or around a point. Set the default behavior from theComputer Vision Toolbox Preferences

尖端

  • 为了提高性能,PCSHOWautomatically downsamples the rendered point cloud during interaction with the figure. The downsampling occurs only for rendering the point cloud and does not affect the saved points.

  • 观点数据或修改颜色说play values, hover over the axes toolbar and select one of the following options.

    Feature 描述
    Datatip

    点击数据提示到view the data point values for any point in the point cloud figure. For a normal point cloud, the数据提示显示x,y,zvalues. Additional data properties for the depth image and lidar are:

    点云数据 数据值属性
    深度图像(RGB-D传感器) Color, row, column
    Lidar 强度,范围,方位角,高程角,行,柱

    Background color

    点击旋转and then right-click in the figure for background options.

    结肠值

    点击旋转and then right-click in the figure for colormap options. You can modify colornap values for the coordinate and range values available, depending on the type of point cloud displayed.

    看法

    点击旋转要将点云图的视角更改为xz,ZX,Yz,zy,xy, 或者theYX飞机。点击Restore View重置视角。

  • PCPLAYERsupports the'OpenGL'option for the渲染器数字仅属性。

Introduced in R2015b