【问题标题】:Point cloud decimation in matlabmatlab中的点云抽取
【发布时间】:2016-08-09 20:01:17
【问题描述】:

我在 matlab 中创建了 10 个点云,但每个云中有不同数量的点。我想将它抽取到相同的点数。 matlab 中是否有任何函数可以将点云重新采样/抽取到固定的点数(例如:到 1000 个点)?

如果您有任何帮助和建议,我将不胜感激 :)

【问题讨论】:

    标签: matlab image-processing point mesh


    【解决方案1】:

    假设您的云点存储为矩阵,您将有 10 个矩阵,每个矩阵具有不同的行数(或者您可能只有一个存储矩阵的单元格)。 (我们称它们为 PointCloud1、PointCloud2 ... PointCloud10)

    如果你想随机取每个矩阵的 1000 个点(假设最小的矩阵至少有 1000 个点),我建议使用 randperm 生成索引的随机排列,然后取前 1000 个索引。

    使用 PointCloud1 的示例:

    [nrows, ncols] = size(PointCloud1);
    idx = randperm(nrows);
    
    sub_PC1 = PointCloud1(idx(1:1000),:);
    

    这里的sub_PC1PointCloud1 的1000 个随机行的子样本。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-09-04
      • 2016-03-27
      • 1970-01-01
      • 1970-01-01
      • 2015-08-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多