Install & Compatibility
Where this runs
tested against v0.5.8 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 90.8MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 3.8s · import 0.000s · 87MB
90MB installed
● package 90MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
equi2pers
✓ from equilib import equi2pers
Common mistake is importing from equilib.numpy or equilib.torch directly.
Equi2Pers
✓ from equilib import Equi2Pers
Class-based API also available, same import path.
Converts an equirectangular image to a perspective (rectilinear) view. The rots and fovs are in degrees.
import numpy as np
from equilib import equi2pers
# Create a sample equirectangular image (height, width, channels)
equi_img = np.random.rand(512, 1024, 3).astype(np.float32)
# Parameters for perspective view
h_fov = 90 # horizontal field of view in degrees
v_fov = 60 # vertical field of view in degrees
yaw = 0 # rotation around y-axis
pitch = 0 # rotation around x-axis
roll = 0 # rotation around z-axis
height = 256
width = 256
# Generate perspective image
pers_img = equi2pers(
equi_img,
rots=[yaw, pitch, roll], # in degrees
fovs=[h_fov, v_fov], # in degrees
height=height,
width=width,
)
print(pers_img.shape) # (256, 256, 3)
Errors
Common errors & fixes
AttributeError: module 'equilib' has no attribute 'equi2pers'
The library version is too old (<0.2.0) or incorrectly installed.
fixUpgrade to the latest version: pip install --upgrade pyequilib
ModuleNotFoundError: No module named 'torch'
Attempting to use PyTorch-specific functions when PyTorch is not installed.
fixInstall PyTorch: pip install torch, or use numpy-only functions: from equilib.numpy import equi2pers
ValueError: Unknown input type: <class 'list'>
Functions expect numpy arrays or torch tensors, not lists.
fixConvert input to numpy array: np.array(your_list)
Upgrade
Version history
0.5.8latest on PyPI · released Jan 17, 2024
Audit
Dependencies
numpyrequiredCore dependency for array operations
torchoptionalOptional for PyTorch tensor support