pointcloud-3d

1.0.3 • Public • Published

pointcloud-3d

Reduce 3d point clouds using random subsampling or voxel grid sampling

Reduce point cloud by subsampling

import { reduceSampling } from 'pointcloud-3d'

const data = [
    [0.1, 0.2, 0.3],
    [0.3, 0.2, 0.1],
    [0.2, 0.1, 0.3],
    [0.1, 0.2, 0.3],
    [0.3, 0.2, 0.1],
    [0.2, 0.1, 0.3]
]

const reduced = reduceSampling(data, 3)

Reduce point cloud by voxel grid sampling

import { reduceVoxel } from 'pointcloud-3d'

const data = [
    [0.1, 0.2, 0.3],
    [0.3, 0.2, 0.1],
    [0.2, 0.1, 0.3],
    [0.1, 0.2, 0.3],
    [0.3, 0.2, 0.1],
    [0.2, 0.1, 0.3]
]

const reduced = reduceVoxel(data, 0.1)

Package Sidebar

Install

npm i pointcloud-3d

Weekly Downloads

7

Version

1.0.3

License

ISC

Unpacked Size

11.3 kB

Total Files

4

Last publish

Collaborators

  • chongma