GithubHelp home page GithubHelp logo

feekia / pcl.js Goto Github PK

View Code? Open in Web Editor NEW

This project forked from luoxuhai/pcl.js

0.0 0.0 0.0 38.96 MB

☁️ ⚡ Point Cloud Library (PCL) for browser, powered by WebAssembly|在浏览器运行的点云库 (PCL),由 WebAssembly 提供支持。

Home Page: https://pcljs.org

License: MIT License

Shell 0.84% JavaScript 10.15% C++ 38.22% TypeScript 44.38% CMake 2.09% Dockerfile 4.32%

pcl.js's Introduction

title=

Point Cloud Library (PCL) for browser, powered by WebAssembly.

Tests npm version Bundle Size License: MIT Downloads jsDelivr Rate this package DeepScan

English | 简体中文

Overview

pcl.js is a Point Cloud Library (PCL) that runs in the browser, powered by Emscripten and WebAssembly. Point Cloud Library (PCL) is a standalone, large scale, open project for 2D/3D image and point cloud processing.

Featured Demos

Features

  • Provides an API similar to PCL(C++), easy to use
  • Supports all modern browsers, will improve Nodejs support
  • Written in TypeScript, with predictable static typing
  • And many, many more! 🚀

Resources

Environment Support

Edge
Edge
Firefox
Firefox
Chrome
Chrome
Safari
Safari
Opera
Opera
16+ 52+ 57+ 11+ 44+

Bundle Size

pcl.js version: latest

Source Link Size
pcl.js https://cdn.jsdelivr.net/npm/pcl.js/dist/pcl.js ~34k gzip’d
pcl-core.wasm https://cdn.jsdelivr.net/npm/pcl.js/dist/pcl-core.wasm ~360k gzip’d

Installation

NPM

# NPM
npm install pcl.js

# Yarn
yarn add pcl.js

CDN

<!-- Development -->
<script src="https://cdn.jsdelivr.net/npm/pcl.js/dist/pcl.js"><script>

<!-- Production -->
<script src="https://cdn.jsdelivr.net/npm/pcl.js/dist/pcl.min.js"><script>

Usage

NPM

import * as PCL from 'pcl.js';

async function main() {
  // Initialization
  const pcl = await PCL.init({
    /**
     * Recommend, optional configuration, custom WebAssembly file link.
     * @default js file dir + pcl-core.wasm
     */
    url: 'https://cdn.jsdelivr.net/npm/pcl.js/dist/pcl-core.wasm',
    // You can also pass an ArrayBuffer of WebAssembly files.
    // arrayBuffer: ArrayBuffer
  });

  // ...
}

main();

CDN

<script>
async function main() {
  // Initialization, PCL is a global object.
  const pcl = await PCL.init();
  // ...
}

main();
</script>

Basic Usage Example

// TypeScript

import * as PCL from 'pcl.js';

async function main() {
  const pcl = await PCL.init({
    url: 'https://cdn.jsdelivr.net/npm/pcl.js/dist/pcl-core.wasm',
  });

  // Get PCD file
  const data = await fetch('https://cdn.jsdelivr.net/gh/luoxuhai/pcl.js@master/data/rops_tutorial/points.pcd').then(res => res.arrayBuffer());
  // Load PCD file data, return point cloud object
  const cloud = pcl.io.loadPCDData<PCL.PointXYZ>(data, PCL.PointXYZ);

  // Filtering a PointCloud using a PassThrough filter
  // See: https://pcl.readthedocs.io/projects/tutorials/en/master/passthrough.html#passthrough
  const pass = new pcl.filters.PassThrough<PCL.PointXYZ>(PCL.PointXYZ);
  pass.setInputCloud(cloud);
  pass.setFilterFieldName('z');
  pass.setFilterLimits(0.0, 1.0);
  const cloudFiltered = pass.filter();

  // Save filtered point cloud objects as PCD files, the content is ArrayBuffer
  const cloudFilteredData = pcl.io.savePCDDataASCII(cloudFiltered);
}

main();

Changelog

The changelog is regularly updated to reflect what's changed in each new release.

Roadmap

Checkout the full roadmap here.

Online Development

Use Gitpod, a free online dev environment for GitHub.

Open in Gitpod

Contributing

pcl.js has adopted the Contributor Covenant as its Code of Conduct, and we expect project participants to adhere to it. Please read the full text so that you can understand what actions will and will not be tolerated.

Please make sure to read the Contributing Guide before making a pull request.

Thank you to all the people who already contributed to pcl.js!

Contributors

License

This project is licensed under the terms of the MIT license.

pcl.js's People

Contributors

luoxuhai avatar semantic-release-bot avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.