Pcljava
A port of the Point Cloud Library (PCL) using Java Native Interface (JNI).
Install / Use
/learn @m0glan/PcljavaREADME
Point-Cloud Library Java
The goal of this project is to make Point-Cloud Library (PCL) data-structures and algorithms available in Java projects via the Java Native Interface (JNI). Currently supported operating systems are Windows and Linux (64bit architecture only).
Setup
Point-Cloud Library version 1.11.1 as well as all of its dependencies need to be installed in order to use pcljava; these dependencies do NOT come packed with the artifacts associated with this project.
- An all-in-one PCL installer exists for Windows; once the installation is complete, the following directories must be added to the
PATHenvironment variable:C:\Program Files\PCL 1.11.1\binC:\Program Files\PCL 1.11.1\3rdParty\VTK\binC:\Program Files\CMake\binC:\Program Files\PCL 1.11.1\3rdParty\Boost\libC:\Program Files\PCL 1.11.1\3rdParty\FLANN\binC:\Program Files\PCL 1.11.1\3rdParty\Qhull\binC:\Program Files\OpenNI2\Redist
- On Linux PCL can be built from source using this guide.
Usage
Project configuration
To include the pcljava library in your project, your pom.xml must have the following configuration:
<repositories>
<repository>
<id>github-pcljava</id>
<name>Point-Cloud Library JNI Port Packages</name>
<url>https://maven.pkg.github.com/vmoglan/pcljava</url>
</repository>
</repositories>
<dependency>
<groupId>com.github.vmoglan</groupId>
<artifactId>pcljava</artifactId>
<version><!-- e.g. 0.0.1-SNAPSHOT --></version>
</dependency>
In addition to that, the pom.xml file must be configured to unpack the native dependencies — see the <profiles> section in this example.
The native pcljava library must also be loaded in your project as such:
class Main {
static {
System.loadLibrary("pcljava");
}
}
Examples
- Instantiating a class for which memory is allocated in native code (i.e. a class extending
NativeObject):
PointCloud3d cloud = new PointCloud3d(); // creating Java instance
cloud.create(); // allocating memory in the native code
// perform operations on cloud
cloud.dispose(); // freeing the memory allocated in the native code
- Estimating the normal vectors of a three-dimensional point-cloud:
PointCloud3dReaderPly reader = new PointCloud3dReaderPly();
PointCloud3d cloud = reader.read("/path/to/cloud.ply");
NormalEstimation normalEstimation = new NormalEstimation(cloud, 0.03f);
NormalCloud normals = normalEstimation.compute();
cloud.dispose();
normals.dispose();
Related Skills
node-connect
344.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
96.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
344.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
344.1kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
