Skip to main content

Introduction

Point-viz is a light-weight, out-of-box point cloud visualizer working in browser, it is built on Three.js and has python API. Bounding box (bbox) visualization is supported and here is an example. Point-viz does not need Internet connection to work (but the installation needs, of course), and it has been tested on Chrome and Safari with both python 2 and 3. The main motivation of this visualizer is to allow user to visualize point cloud data from remote server easily .

Tested Environment

  • python==3.7
  • numpy==1.18.5
  • Browsers: Google Chrome, Safari, Firefox

Usage

To install point-viz, simply run: pip install point-viz, and that's all.

Below is the template of its python API:

# Import package.
from point_viz import PointvizConverter

# Initialize and setup output directory.
Converter = PointvizConverter(home)
# Pass data and create html files.
Converter.compile(task_name, coors, default_rgb, intensity, bbox_params, bbox_color)

Below is a more specific (partial) example that is demonstrated on KITTI dataset.



save_viz_path = /path/to/save/visualization/

Converter = PointvizConverter(save_viz_path)

...

# note the pts_inputs are in z-up system
# which in kittidataset, it should be in 
# velodyne coordinates
pts_inputs = kitti_dataset.get_sample(1)

...

gt_bbox_params_list = []

# the labels are in z-up system
# which in kittidataset, it should be in 
# velodyne coordinates
for obj in kitti_dataset.get_labels(1):
    bbox_params_list = [obj.l, # along y axis
                        obj.h, # along z axis
                        obj.w, # along x axis
                        obj.y,
                        obj.z,
                        obj.x,
                        obj.ry] 
                        # in l, h, w, y, z, x
                        # since the coordinate system in three.js is y-up
    gt_bbox_params_list.append(bbox_params_list)

# if you want to generate visualizations for multiple samples
# you have to call this function compile in a loop
Converter.compile("sample_{}".format(1), coors=pts_input[:,:3],         intensity=pts_input[:,[1,2,0]], bbox_params=gt_bbox_params_list)

In the example above you find the following directory architectures being generated:

  • /path/to/save/visualization/
    • data
      • sample_1_bbox.csv (if bbox_params is not None during compilation)
      • sample_1_pc.bin (numpy binary files that contains x, y, z, r, g, b)
      • ... (more if you compile multiple times)
    • html
      • sample_1.html
      • ... (more if you compile multiple times)
    • src
      • containing the dependencies that html requires

In your remote server, cd /path/to/save/visualization/. Then run python3 -m http.server 8000.

To access the visualization locally, go to the url http://<ip_address_of_the_remote_server>:8000

Variables Explanation

The * means optional.

home: The directory where to put output html files, must be given.
task_name*: string, name of the output html file (can be overwritten if the name already exists; default value is "default").
coors*: 2-D float array, the x, y and z coordinates of each point in the point cloud.
default_rgb*: 2-D float/int array of the same length as coors, the R, G and B colors of each point. If not provided, the RGB will be automatically calculated based on intensity (if given) or point coordinates (when intensity is also missing).
intensity*: 1-D float array of the same length as coors, the intensity of each point. It only takes effect when default_rgb is not given.
bbox_params*: 2-D list, the geometry parameters of each bbox. Attributes of each row should be arranged as follows:

Attribute # Description
0 Length (float, dimension along x-axis)
1 Height (float, dimension along y-axis)
2 Width (float, dimension along z-axis)
3 X coordinate of bbox centroid (float)
4 Y coordinate of bbox centroid (float)
5 Z coordinate of bbox centroid (float)
6 Horizontal rotation regarding the +x-axis in radians (float)
7* Color of the bbox (string, optional; X11 color name is supported, default is "Magenta")
8* Label text of the bbox (string, optional)

bbox_color*: boolean, default is True. If the color of bbox is missing while the label text is given, then bbox_color has to be explicitly set to False.

Metadata

Release files for point-viz 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for point-viz 1.0.2
File Size Uploaded
point-viz-1.0.2.tar.gz 714.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for point-viz 1.0.2
File Interpreter ABI Platform
point_viz-1.0.2-py2-none-any.whl Python 2 none any Details

Total release size: 1.4 MB

Release files / point-viz-1.0.2.tar.gz

Download URL point-viz-1.0.2.tar.gz
Size 714.1 kB
Tags Source
SHA-256 checksum
How to use checksums
377ac0e915a8d4d54ad08f26a2afcc7960402a995852bffb6f528cb79c96730c
BLAKE2b-256 checksum
How to use checksums
3cb20880f9a823ef417080ab6e74be006cc16f5b95f172cc65d8db1007cd8392
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.6.1 requests/2.25.1 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/2.7.16

Release files / point_viz-1.0.2-py2-none-any.whl

Download URL point_viz-1.0.2-py2-none-any.whl
Size 719.4 kB
Tags Python 2
SHA-256 checksum
How to use checksums
defdc03f612d1a30f2d5a6555091a605c9f2655c63f8e153cd32f4f6d918e16f
BLAKE2b-256 checksum
How to use checksums
3dadd8e61167d0680f8084efcd333766030781dfd82427aae0d75ef8ce121acd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.6.1 requests/2.25.1 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/2.7.16

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.1.12

2 release files

0.1.11

2 release files

0.1.10

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

1 release file

0.1.0

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page