All Projects → jiangwei221 → obj2pcd

jiangwei221 / obj2pcd

Licence: other
Simple point cloud sampler for obj file

Programming Languages

C++
36643 projects - #6 most used programming language
objective c
16641 projects - #2 most used programming language
c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to obj2pcd

3D-Reconstruction-With-RGBD
a 3D-Reconstruction demo done with Kinect
Stars: ✭ 16 (-15.79%)
Mutual labels:  pcl
merbridge
Use eBPF to speed up your Service Mesh like crossing an Einstein-Rosen Bridge.
Stars: ✭ 469 (+2368.42%)
Mutual labels:  mesh
vyatta-cjdns
A cjdns package for Ubiquiti EdgeOS and VyOS, allowing cjdns to be used on EdgeRouters
Stars: ✭ 39 (+105.26%)
Mutual labels:  mesh
meshname
Meshname, a universal naming system for all IPv6-based mesh networks, including CJDNS and Yggdrasil
Stars: ✭ 65 (+242.11%)
Mutual labels:  mesh
particle-cookbook
A collection of programming snippets, tips, and tricks for developing with Particle IoT devices
Stars: ✭ 20 (+5.26%)
Mutual labels:  mesh
pcl-edge-detection
Edge-detection application with PointCloud Library
Stars: ✭ 32 (+68.42%)
Mutual labels:  pcl
classy blocks
Python classes for easier creation of OpenFOAM's blockMesh dictionaries.
Stars: ✭ 53 (+178.95%)
Mutual labels:  mesh
XamarinClipboardPlugin
Cross Platform Clipboard access for Xamarin
Stars: ✭ 24 (+26.32%)
Mutual labels:  pcl
IrregularGradient
Create animated irregular gradients in SwiftUI.
Stars: ✭ 127 (+568.42%)
Mutual labels:  mesh
persee-depth-image-server
Stream openni2 depth images over the network
Stars: ✭ 21 (+10.53%)
Mutual labels:  pcl
Py BL MeshSkeletonization
Mesh Skeleton Extraction Using Laplacian Contraction
Stars: ✭ 32 (+68.42%)
Mutual labels:  mesh
intersection-wasm
Mesh-Mesh and Triangle-Triangle Intersection tests based on the algorithm by Tomas Akenine-Möller
Stars: ✭ 17 (-10.53%)
Mutual labels:  mesh
GA SLAM
🚀 SLAM for autonomous planetary rovers with global localization
Stars: ✭ 40 (+110.53%)
Mutual labels:  pcl
pcl localization ros2
ROS2 package of 3D LIDAR-based Localization using PCL (Not SLAM)
Stars: ✭ 74 (+289.47%)
Mutual labels:  pcl
fastai sparse
3D augmentation and transforms of 2D/3D sparse data, such as 3D triangle meshes or point clouds in Euclidean space. Extension of the Fast.ai library to train Sub-manifold Sparse Convolution Networks
Stars: ✭ 46 (+142.11%)
Mutual labels:  mesh
XH5For
XDMF parallel partitioned mesh I/O on top of HDF5
Stars: ✭ 23 (+21.05%)
Mutual labels:  mesh
jismesh
Utilities for the Japanese regional grid square system defined in Japanese Industrial Standards (JIS X 0410 地域メッシュ).
Stars: ✭ 33 (+73.68%)
Mutual labels:  mesh
IoT-Developer-Boot-Camp
Quickly get started with Silicon Labs IoT product.
Stars: ✭ 104 (+447.37%)
Mutual labels:  mesh
dem2mesh
Quickly generate 2.5D meshes from elevation models.
Stars: ✭ 53 (+178.95%)
Mutual labels:  mesh
PortableLibraryProfiles
A simple desktop app to enumerate all PCL profiles for all frameworks installed on the local machine.
Stars: ✭ 36 (+89.47%)
Mutual labels:  pcl

obj2pcd

Simple point cloud sampler for obj files.

Introduction

obj2pcd is a simple c++ program to sample a obj mesh to its point cloud representation.

It depends on GLM and PCL libraries. GML is provided in this repo, but you need to install PCL on your own. For Mac user, you can use brew install pcl to get the library.

Some converter on the web directly convert the mesh vertices into a point cloud. It works for fine meshes, but not good for coarse meshes.

In this implementation, we sample the point cloud on the surface of a triangle, not the 3 vertices.

Here is a visualization of the sampling of a cube consists of 12 traingles.

cube-vis

Build

cd build

cmake ..

make

Usage

./obj2pcd ../models/monkey_v.obj ../output/monkey.pcd -sample_density 2000

This command will sample the monkey_v.obj file (only vertex) into a pcd file, 2000 is the sample density. You can adjust the density.

There are two optional argvs. One is normal_flag, you need the interpolated normals in PCD or not, default is on. One is flip_flag, you need to flip the normal direction or not, default is off.

Note

Because I'm using a very simple model loader from opengl-tutorial, it can only handle the obj file with triangles, no quadrilateral support.

If you want to sample an obj mesh exported by Blender, make sure you triangulate it before you export.

convertall.py

convertall.py is a simple python script to convert all the obj files under one folder into PCD.

usage: convertall.py [-h] [--normals NORMALS] [--flip FLIP]
                     models_dir output_dir sample_density

positional arguments:
  models_dir         models dir
  output_dir         output dir
  sample_density     sample density

optional arguments:
  -h, --help         show this help message and exit
  --normals NORMALS  interpolate normals or not
  --flip FLIP        flip the normals or not

Sample usage: python3 convertall.py ./models ./output 200 --normals 1 where 200 is the sample density.

TO-DO

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].