Skip to content

[feat] Create a filter to compute pointcloud volume

Tong Fu requested to merge feat/ComputeVolume into master


This MR creates a filter to compute the volume of a space formed by an input pointcloud and a plane.

The volume is estimated by doing integral of areas formed by scanlines and the plane.


  • a pointcloud
  • a plane


  • Rasterized pointcloud w.r.t input plane
  • Rasterized pointcloud display in xy plane direction
  • The estimated volume


  • Step 1: Get the input pointcloud and the plane.

    The plane is used to defined which part of volume would be calculated:


  • Step 2: Rasterize pointcloud into a 2D grid.

    The resolution is defined by Raster resolution. To simplify the calculate, we rotate input points onto XY-plan. So, the x, y coordinates of a points is used to place the point into the grid. Then we keep one point who has the max value of z in each bin of grid.

  • Step 3: Compute integral volume.

    To compute volume, we compute the area of each column of grid by following the scan direction. The we integrate the column areas as the estimated volume.



  • [double] Grid resolution: the size of a raster bin. The raster size depends on the pointcloud size and the raster resolution.
  • [enum] Scan direction: direction of the integral.
Edited by Tong Fu

Merge request reports