项目作者: Tumiz

项目描述 :
Agent simulation in Jupyter
高级语言: JavaScript
项目地址: git://github.com/Tumiz/scenario.git
创建时间: 2020-04-09T14:41:08Z
项目社区:https://github.com/Tumiz/scenario

开源协议:GNU General Public License v3.0

下载


PY3D - 3D data analysis toolkit

Code | Docs

What is it?

py3d is a pure and lightweight Python library dedicated to 3D data structures and functions. It enables batch processing of 3D points, lines, planes, and 3D meshes. Moreover, it provides interactive visualization capabilities for these elements. It is advisable to use it in Jupyter for visualization purposes.

Main features

  • Supports the reading, writing, and visualization of multiple 3D data formats such as the popular PLY, NPY, CSV, PCD, and OBJ. Demos
  • Perform rotation, translation, and scaling operations on 3D geometries. Demos
  • Conversion among diverse rotation representations, Demos
    • Rotation matrix
    • Angle - axis
    • Quaternion
    • Euler angle
    • Rotation vector

How to install it?

  1. pip install py3d

How to use it?

Here are some small examples:

  1. Visualize a pcd file in jupyter
  1. import py3d
  2. pcd = py3d.read_pcd("binary.pcd")
  3. print("min", pcd.min())
  4. print("max", pcd.max())
  5. pcd.xyz.as_point(colormap=pcd.w)
  1. Visualize an image in jupyter
  1. import py3d
  2. py3d.image("./20220917214012.jpg")
  1. Visualize images with poses in jupyter
  1. import py3d
  2. py3d.render(
  3. py3d.image("797.jpg") @ py3d.Transform.from_translation([0, 100, 0]),
  4. py3d.image("971.jpg") @ py3d.Transform.from_rpy([0, 0.9, 0.2]) @ py3d.Transform.from_translation([-1000, 500, 0])
  5. )
  1. Convert euler angles to rotation matrix
  1. import py3d
  2. py3d.Transform.from_euler("xyz", [0.4, -0.2, 0])
  1. Visualize a 2d matrix
  1. import py3d
  2. py3d.Vector([
  3. [1,2,3],
  4. [4,5,6],
  5. [7,8,9]
  6. ]).as_image()

API reference

Vector
Vector3
Vector4
Transform
Rotation
Color
IO

Top