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.


Class: pointCloud

Find points within ROI


indices = findPointsInROI(ptCloud,roi)


indices = findPointsInROI(ptCloud,roi) returns the points within a region of interest.

Input Arguments

expand all

Point cloud, specified as a pointCloud object.

Region of interest, specified as a 3-by-2 matrix. The format defining the region of interest cuboid matrix is [xmin, xmax; ymin, ymax; zmin, zmax].

Output Arguments

expand all

Linear indices to stored points, returned as a column vector. The indices vector contains the stored points in the ptCloud object.


expand all

Create a point cloud object with randomly generated points.

ptCloudA = pointCloud(100*rand(1000,3,'single'));

Define a cuboid.

roi = [0,50;0,inf;0,inf];

Find all the points within the cuboid.

indices = findPointsInROI(ptCloudA, roi);
ptCloudB = select(ptCloudA,indices);

Display points within the ROI.

hold on;
hold off;


Muja, M. and David G. Lowe. "Fast Approximate Nearest Neighbors with Automatic Algorithm Configuration". In VISAPP International Conference on Computer Vision Theory and Applications. 2009. pp. 331–340.

Introduced in R2015a