Manipulate camera calibration parameters and warp images for computer vision tasks.
Project description
Deltacamera
Represent, manipulate and use camera calibration info in computer vision tasks.
Main features:
-
The library supports converting coordinates between world, camera and image space, handing lens distortion models according to the Brown–Conrady and Kannala–Brandt models.
-
Modify cameras with intuitive methods such as
camera.zoom,camera.rotate,camera.scale_output,camera.turn_towards, etc. -
Conversion between distorted and undistorted image spaces are also implemented in an efficient way using Numba and a more accurate inversion of Brown–Conrady distortion compared to OpenCV. We use Newton's method in addition to the standard fixed-point iteration. This library can also keep track of valid image regions after warping, inspired by Leotta et al., but extended to the full Brown-Conrady and Kannala-Brandt models.
-
This library also includes efficient implementations of image warping, with antialiasing support and interpolation in linear RGB color space. The warping maps can be cached for very fast repeated use (e.g., warp/undistort a video taken from a static camera to another calibration setup). This also supports partial caching of only the more expensive distortion part. This is useful when the rotation can change during a video, but the distortion parameters are fixed (e.g., turning the camera to keep the subject centered).
Installation
pip install deltacamera
It is recommended to then run the Numba precompilation step (takes around 1–2 minutes). This will make image warping and coordinate transformations fast already on first use.
python -m deltacamera.precompile
Documentation
Full documentation is available at deltacamera.readthedocs.io.
References
For the idea of computing the valid image region after distortion, see:
- Matthew J. Leotta, David Russell, Andrew Matrai, "On the Maximum Radius of Polynomial Lens Distortion", WACV 2022.
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 deltacamera-0.5.1.dev0.tar.gz.
File metadata
- Download URL: deltacamera-0.5.1.dev0.tar.gz
- Upload date:
- Size: 106.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
67e859f1368a1e6d10cfd82863013f7750630b98a02c43563444461186199085
|
|
| MD5 |
43f2201f8cb22971faa65eb2404e9843
|
|
| BLAKE2b-256 |
07affec5ceee227c3f0d3043530cee476e7fde46b3e6f0ced7fc7bad81ba71d8
|
File details
Details for the file deltacamera-0.5.1.dev0-py3-none-any.whl.
File metadata
- Download URL: deltacamera-0.5.1.dev0-py3-none-any.whl
- Upload date:
- Size: 55.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d64c8d23ac5dc4d01cd1ad68b47a341aa809db0143c8daf7062ef60624667eac
|
|
| MD5 |
d4b203d7caf0c7fe92f6992d184a5e13
|
|
| BLAKE2b-256 |
2d57f2a48a7b6a6687c3759dfa59ed52c3435c26e5fc2e30ec5895a3da3ff35b
|