pc2image
R2026bSyntax
Description
creates an image, im = pc2image(ptCloud,resolution)im, by projecting the point cloud
ptCloud onto the XY-plane and dividing that plane
into square cells whose side length is resolution. Each pixel
represents one cell and stores the maximum Z-value (elevation) of the
points within that cell. Empty cells have a value of 0.
creates an image, im = pc2image(ptCloud,xres,yres)im, by projecting the point cloud
ptCloud onto the XY-plane and dividing that plane
into rectangular cells whose side lengths are xres along the
X-axis and yres along the
Y-axis. Each pixel represents one cell and stores the maximum
Z-value (elevation) of the points within that cell. Empty cells have a
value of 0.
specifies the point cloud property used to fill each pixel in the output image, in addition
to any combination of input arguments from previous syntaxes. You cannot specify the
im = pc2image(___,fillProperty)fillProperty and customFillFcn arguments in the
same function call.
specifies a custom function for assigning the value of each pixel in the output image. Use
this syntax to compute pixel values with your own function instead of specifying a
predefined fill property. You cannot specify the im = pc2image(___,customFillFcn)fillProperty and
customFillFcn arguments in the same function call.
[
additionally returns a 2-D spatial reference
object. Use of
this syntax requires Image Processing Toolbox™.im,indices,spatialRef2D] = pc2image(___)
Examples
Input Arguments
Output Arguments
Version History
Introduced in R2026b



