orthographic_projector
Purpose
A Python package with a Rust extension for generating six orthographic RGB projections and occupancy maps from a colored point cloud. It supports depth-based filtering and occupancy-based cropping. These projections form the input to the point cloud quality assessment method described in the associated publication.
The PyPI distribution is named orthographic-projector; the Python import is orthographic_projector.
Related projects
OpenCV provides the cropping and image export operations. Open3D is an optional point cloud reader used by the bundled example.
The Python interface and Rust projection implementation are maintained in this repository and built together through Maturin.
Requirements
- Python 3.10, 3.11, or 3.12 for the documented setup and wheel matrix; Python 3.11 or 3.12 is recommended.
- NumPy, OpenCV, and the other runtime dependencies declared in pyproject.toml.
- For source builds: uv, a current stable Rust toolchain, Cargo, a native linker/C compiler, and Git.
Projection runs on the CPU. No GPU is required.
Installation
From PyPI
pip install orthographic-projector
Compatible published wheels include the Rust extension.
From source
git clone https://github.com/arthurhscarvalho/orthographic_projector.git
cd orthographic_projector
uv sync --locked --python 3.12
uv creates .venv/, builds an editable installation through Maturin, and installs the development tools. uv.lock records the resolved dependencies. Use uv run without activating the environment.
After changing the Rust extension, rebuild it:
uv run --locked maturin develop --release
To build a release wheel:
uv run --locked maturin build --release --out dist
Usage
import numpy as np
import orthographic_projector as op
points = np.load("points.npy") # XYZ coordinates, shape (N, 3).
colors = np.load("colors.npy") # RGB values, shape (N, 3).
images, occupancy_maps = op.generate_projections(
points,
colors,
precision=8,
filtering=2,
crop=False,
verbose=False,
)
print(images.shape) # (6, 256, 256, 3)
print(occupancy_maps.shape) # (6, 256, 256)
cropped_images, cropped_maps = op.apply_cropping(images, occupancy_maps)
print(len(cropped_images)) # 6; each view can have a different height and width.
| Argument | Description |
|---|---|
points |
A nonempty, nondegenerate XYZ array of shape (N, 3), converted to float64. Supply finite coordinates with spatial variation. |
colors |
An RGB array matching the coordinate shape. Supply values in [0, 1] or [0, 255]; the backend receives uint8. |
precision |
Required resolution exponent. Each uncropped image has height and width 2**precision. Larger values increase memory and processing costs. |
filtering |
Nonnegative neighborhood radius for depth-based filtering; defaults to 2. Set 0 to disable filtering. Keep the radius smaller than half the image dimension. |
crop |
Crop each view to its occupied bounding rectangle; defaults to False. |
verbose |
Print preprocessing and projection information; defaults to True. |
Preprocessing shifts negative coordinates and rescales the point cloud to the projection grid.
| Output | Shape and dtype |
|---|---|
| Uncropped RGB images | (6, 2**precision, 2**precision, 3), uint64, with values in [0, 255]. |
| Uncropped occupancy maps | (6, 2**precision, 2**precision), float64, with 1 for occupied pixels and 0 for background. |
| Cropped RGB images | A list of six uint8 arrays of shape (H_i, W_i, 3). |
| Cropped occupancy maps | A list of six uint8 arrays of shape (H_i, W_i), with values 0 or 1. |
The six views correspond to the minimum- and maximum-depth projections along the X, Y, and Z axes, in that order. Unoccupied RGB pixels are white. Passing crop=True to generate_projections applies the same cropping operation as apply_cropping.
Bundled PLY example
The example script loads redandblack_vox10_1550.ply, generates six projections at resolution 1024 × 1024, crops them, and saves projection_0.png through projection_5.png in the repository root.
Install the optional example dependencies and run from the repository root:
uv sync --locked --python 3.12 --group examples
uv run --locked --group examples python examples/example_generate_projections.py
Change PC_PATH, precision, filtering, crop, and save in the script to use another cloud or configuration. OpenCV expects BGR images when saving; the script converts the RGB projections before writing them.
Publications
The first paper describes the associated quality assessment method. The second describes the projection approach on which the implementation is based. The third is the source reference for the example point cloud.
- Arthur H. S. Carvalho, Pedro G. Freitas, Mateus Gonçalves, Johann Homonnai, and Mylène C. Q. Farias. “Perception-Driven Point Cloud Quality Assessment Through Projections and Deep Structure Similarity.” 2024 IEEE 26th International Workshop on Multimedia Signal Processing (MMSP), pp. 1–6, 2024. DOI: 10.1109/MMSP61759.2024.10743953.
- Alireza Javaheri, Catarina Brites, Fernando Pereira, and João Ascenso. “Joint Geometry and Color Projection-Based Point Cloud Quality Metric.” IEEE Access, vol. 10, pp. 90481–90497, 2022. DOI: 10.1109/ACCESS.2022.3198995.
- Evangelos Alexiou, Irene Viola, Tomás M. Borges, Tiago A. Fonseca, Ricardo L. de Queiroz, and Touradj Ebrahimi. “A comprehensive study of the rate-distortion performance in MPEG point cloud compression.” APSIPA Transactions on Signal and Information Processing, vol. 8, article e27, 2019. DOI: 10.1017/ATSIP.2019.20.
@inproceedings{carvalho2024perception,
author = {Carvalho, Arthur H. S. and Freitas, Pedro G. and Gonçalves, Mateus and Homonnai, Johann and Farias, Mylène C. Q.},
title = {Perception-Driven Point Cloud Quality Assessment Through Projections and Deep Structure Similarity},
booktitle = {2024 IEEE 26th International Workshop on Multimedia Signal Processing (MMSP)},
pages = {1--6},
year = {2024},
doi = {10.1109/MMSP61759.2024.10743953}
}
@article{javaheri2022projection,
author = {Javaheri, Alireza and Brites, Catarina and Pereira, Fernando and Ascenso, João},
title = {Joint Geometry and Color Projection-Based Point Cloud Quality Metric},
journal = {IEEE Access},
volume = {10},
pages = {90481--90497},
year = {2022},
doi = {10.1109/ACCESS.2022.3198995}
}
@article{alexiou2019compression,
author = {Alexiou, Evangelos and Viola, Irene and Borges, Tomás M. and Fonseca, Tiago A. and de Queiroz, Ricardo L. and Ebrahimi, Touradj},
title = {A comprehensive study of the rate-distortion performance in {MPEG} point cloud compression},
journal = {APSIPA Transactions on Signal and Information Processing},
volume = {8},
pages = {e27},
year = {2019},
doi = {10.1017/ATSIP.2019.20}
}
License
Metadata
Release files for orthographic-projector 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
Total release size: 2.2 MB
Release files / orthographic_projector-0.2.2-cp312-cp312-win_amd64.whl
| Download URL | orthographic_projector-0.2.2-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 169.2 kB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
64722ae41ddc456d80ad6061ec794420701e24199cb253c14b60be741d6fdb7c
|
|
BLAKE2b-256 checksum How to use checksums |
e42e475d5c1727b64e602d2de0a0a0f9a7a7f18607f48cc917e8260f4a138002
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.17
|
Release files / orthographic_projector-0.2.2-cp312-cp312-manylinux_2_28_x86_64.whl
| Download URL | orthographic_projector-0.2.2-cp312-cp312-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 305.4 kB |
| Tags | CPython 3.12 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
fbb185efe8545a6497f51b57061122f449db767186556dc0356d3359f04bcfa9
|
|
BLAKE2b-256 checksum How to use checksums |
c4cc3cdceab217cf6d871b7a42dd14e642718fbfb9fff2bfab09a97d66cbaf79
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.17
|
Release files / orthographic_projector-0.2.2-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | orthographic_projector-0.2.2-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 261.6 kB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
cb576b39876b07728bfcb7ab8fb77f584187160f64b76c33e804862b2d40983a
|
|
BLAKE2b-256 checksum How to use checksums |
ae5cecc7c03c205316967eca98aa6fd53ed377e757e5d342e320ff7b9903e064
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.17
|
Release files / orthographic_projector-0.2.2-cp311-cp311-win_amd64.whl
| Download URL | orthographic_projector-0.2.2-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 170.2 kB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
fd76169325426f1fcc0136fb8c7deab379fd15ce34ef6f6d46506f7970d6870c
|
|
BLAKE2b-256 checksum How to use checksums |
09e919960324c70dc8044d4980014982f0cf049aaf4bb123227853e8c588a9ed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.17
|
Release files / orthographic_projector-0.2.2-cp311-cp311-manylinux_2_28_x86_64.whl
| Download URL | orthographic_projector-0.2.2-cp311-cp311-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 308.0 kB |
| Tags | CPython 3.11 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
aed1d961be0b5263a1826fee0fa1c331128dd3a0447579c18013cb9973f10c7d
|
|
BLAKE2b-256 checksum How to use checksums |
181faf7e8653344f687cfcd3f2fa0e32804722521c832bf17cad92900e581bdc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.17
|
Release files / orthographic_projector-0.2.2-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | orthographic_projector-0.2.2-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 264.8 kB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
e234d59ac7745612e89b7a1e6f2382579b58599a4919f1a3f1548ffe1feae879
|
|
BLAKE2b-256 checksum How to use checksums |
123b9c4ce1d63e0d371e9efb9ca48f6301ee53ea1f7cd228316c7e8d92bbe74b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.17
|
Release files / orthographic_projector-0.2.2-cp310-cp310-win_amd64.whl
| Download URL | orthographic_projector-0.2.2-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 169.7 kB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
f2d178dce1bfac0d6ca7316bf3622f3625d91a8acd2832f33ff81d638340bd0d
|
|
BLAKE2b-256 checksum How to use checksums |
a8930f5ac003c6ed0399db33e6927ed9683a7927b33d8d8fd676e37bf152b12a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.17
|
Release files / orthographic_projector-0.2.2-cp310-cp310-manylinux_2_28_x86_64.whl
| Download URL | orthographic_projector-0.2.2-cp310-cp310-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 307.3 kB |
| Tags | CPython 3.10 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
60dcf07582885cecb200077ce85d8a287ba559dbbbf6482de37b82956f0c8fea
|
|
BLAKE2b-256 checksum How to use checksums |
6360d7cdb54cea2ee5d000ebfa692b4cc091ec7ec6a89de6014e3dfa4fb703d4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.17
|
Release files / orthographic_projector-0.2.2-cp310-cp310-macosx_11_0_arm64.whl
| Download URL | orthographic_projector-0.2.2-cp310-cp310-macosx_11_0_arm64.whl |
|---|---|
| Size | 265.3 kB |
| Tags | CPython 3.10 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
83bbd99bc5264065fa0706026f1f8cdd7e021203ec4a3c64b6c533735ee5c70e
|
|
BLAKE2b-256 checksum How to use checksums |
08722ef0684b02e3853569141f9e2070812e0d96137b81e810b6799a655fc60d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.17
|
Security for orthographic-projector 0.2.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.