Panoramic image projection and blending using Gnomonic and other spherical projections.
Project description
PanorAi: Spherical Image Processing & Projection
PanorAi is a framework for working with spherical (equirectangular) images, enabling efficient transformation into Gnomonic projections and back to equirectangular format. It provides flexible samplers and blenders to optimize projection and reconstruction processes.
🚀 Quick Start
Installation
pip install panorai
1️⃣ Load an Equirectangular Image
Convert an image to an EquirectangularImage object.
from panorai import PanoraiData
eq_image = PanoraiData.from_file("path/to/image.png", data_type="equirectangular")
📌 Core Functions
2️⃣ Convert to Gnomonic Projection
Extract a rectilinear (Gnomonic) face from the equirectangular image.
face = eq_image.to_gnomonic(lat=45, lon=90, fov=60)
face.show()
3️⃣ Convert Back to Equirectangular
Reproject a gnomonic face back to equirectangular.
eq_reprojected = face.to_equirectangular(eq_shape=(512, 1024))
eq_reprojected.show()
🛠️ Advanced Usage
4️⃣ Convert to Multiple Gnomonic Faces
Use sampling strategies (e.g., "cube", "fibonacci") to extract multiple faces.
face_set = eq_image.to_gnomonic_face_set(fov=60, sampling_method="cube")
face_set[0].show() # View first face
5️⃣ Reconstruct Using a Blender
Back-project multiple faces using different blending methods ("closest", "average").
eq_reconstructed = face_set.to_equirectangular(eq_shape=(512, 1024), blender_name="closest")
eq_reconstructed.show()
🔧 Configuring Samplers & Blenders
You can fine-tune sampling & blending strategies using ConfigManager.
Set Custom Sampler
from panorai.pipelines.sampler.config import SamplerConfig
sampler_config = SamplerConfig(n_points=5)
Select Blender
from panorai.pipelines.blender.registry import BlenderRegistry
blender = BlenderRegistry.get("average") # Options: "closest", "average", etc.
⚡ End-to-End Workflow with PanoraiPipeline
For streamlined processing, use the PanoraiPipeline.
from panorai.pipelines.panorai_pipeline import PanoraiPipeline
pipeline = PanoraiPipeline(sampler_name="cube", blender_name="average")
# Forward projection (Equirectangular → Gnomonic Faces)
faces = pipeline.forward_pass(data=eq_image.data, fov=85, lat=0, lon=0)
# Back-projection (Faces → Equirectangular)
eq_final = pipeline.backward_pass(data=faces, eq_shape=(512, 1024))
eq_final.show()
📌 Summary
| Feature | Function |
|---|---|
| Load Image | PanoraiData.from_file() |
| Convert to Gnomonic | to_gnomonic(lat, lon, fov) |
| Convert to Face Set | to_gnomonic_face_set(fov, sampling_method) |
| Convert Back to EQ | to_equirectangular(eq_shape, blender_name) |
| Use Samplers & Blenders | ConfigManager, BlenderRegistry |
| Pipeline Processing | PanoraiPipeline.forward_pass(), backward_pass() |
📚 Next Steps
- Experiment with different samplers (
"cube","fibonacci"). - Try blenders (
"closest","average") for optimal reconstructions. - Use Torch tensors for deep learning integration.
🔗 PanorAi Documentation (Link to full API reference)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file panorai-2.0.26.tar.gz.
File metadata
- Download URL: panorai-2.0.26.tar.gz
- Upload date:
- Size: 57.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d20fae92a969acd819a885c4b7391a06aea545aa91d234cc2427100484e45ad
|
|
| MD5 |
63414829fdcb06a830f23b6464483ad2
|
|
| BLAKE2b-256 |
dd209ac0ba9138353ef0261b509045f128ef84ec8467ef3008ed1c75c69b11be
|
Provenance
The following attestation bundles were made for panorai-2.0.26.tar.gz:
Publisher:
python-publish.yml on RobinsonGarcia/PanorAi
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
panorai-2.0.26.tar.gz -
Subject digest:
9d20fae92a969acd819a885c4b7391a06aea545aa91d234cc2427100484e45ad - Sigstore transparency entry: 191766431
- Sigstore integration time:
-
Permalink:
RobinsonGarcia/PanorAi@d109ed9c9bb5d782c0465864f8663cd0f94de937 -
Branch / Tag:
refs/tags/v2.0.26 - Owner: https://github.com/RobinsonGarcia
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@d109ed9c9bb5d782c0465864f8663cd0f94de937 -
Trigger Event:
push
-
Statement type:
File details
Details for the file panorai-2.0.26-py3-none-any.whl.
File metadata
- Download URL: panorai-2.0.26-py3-none-any.whl
- Upload date:
- Size: 84.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3624214aef5171f6246e60b5f3d7b0a897a819b5151a852bda537ad41650641f
|
|
| MD5 |
21903c9677ae53511f69315c3351ee95
|
|
| BLAKE2b-256 |
d668a86a7e55ef63497283b536c99f2d5a2ef3a3c7a5cd28db812db1327e173a
|
Provenance
The following attestation bundles were made for panorai-2.0.26-py3-none-any.whl:
Publisher:
python-publish.yml on RobinsonGarcia/PanorAi
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
panorai-2.0.26-py3-none-any.whl -
Subject digest:
3624214aef5171f6246e60b5f3d7b0a897a819b5151a852bda537ad41650641f - Sigstore transparency entry: 191766435
- Sigstore integration time:
-
Permalink:
RobinsonGarcia/PanorAi@d109ed9c9bb5d782c0465864f8663cd0f94de937 -
Branch / Tag:
refs/tags/v2.0.26 - Owner: https://github.com/RobinsonGarcia
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@d109ed9c9bb5d782c0465864f8663cd0f94de937 -
Trigger Event:
push
-
Statement type: