Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

removeInvalidPoints

Class: pointCloud

Remove invalid points

Syntax

[ptCloudOut,indices]= removeInvalidPoints(ptCloud)

Description

[ptCloudOut,indices]= removeInvalidPoints(ptCloud) removes points with Inf or NaN coordinates from point cloud and provides indices of valid points.

Input Arguments

expand all

Point cloud, specified as a pointCloud object.

Output Arguments

expand all

Point cloud, returned as a pointCloud object with Inf or NaN coordinates removed.

Note

After calling this function, an organized point cloud (M-by-N-by-3) becomes an unorganized (X-by-3) point cloud.

Indices of valid points in the point cloud, specified as a vector.

Examples

expand all

Create a point cloud object.

   ptCloud = pointCloud(nan(100,3))
ptCloud = 
  pointCloud with properties:

     Location: [100x3 double]
        Color: []
       Normal: []
    Intensity: []
        Count: 100
      XLimits: [0x2 double]
      YLimits: [0x2 double]
      ZLimits: [0x2 double]

% Remove invalid points.
   ptCloud = removeInvalidPoints(ptCloud)
ptCloud = 
  pointCloud with properties:

     Location: [0x3 double]
        Color: []
       Normal: []
    Intensity: []
        Count: 0
      XLimits: [0x2 double]
      YLimits: [0x2 double]
      ZLimits: [0x2 double]

Introduced in R2015a