How to track the indexes of a PoinCloud object after downsampling?

1 view (last 30 days)
Is it possible to track the index of the PoinCloud object after downsampling?
ptCloudOut = pcdownsample(ptCloudIn,'random',0.1)
I want to downsample an Mx3 data using pcdownsample(), let's say the index of each point before downsampling is the number of the row.
ptCloudIn has 1000 rows (M=1000), ptCloudOut has 100 rows.

Accepted Answer

Prashik Shende
Prashik Shende on 16 Dec 2020
Using pcdownsample you cannot track index you have to follow different approch
lets say if you save all the indices in one variable and in another variable you can select some indices and only select those indices from ptCloudIn you can select.
Like in following code in downsampled variable we can save the indices that you want to track and select those indices from original point cloud
downsampled = [1:5:ptCloudIn.Count]';
ptCloudOut = select(ptCloudIn,downsampled);
figure
pcshow(ptCloudOut)

More Answers (0)

Categories

Find more on 3-D Scene Control in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!