Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

deltacamera-0.5.2.dev0.tar.gz (106.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

deltacamera-0.5.2.dev0-py3-none-any.whl (55.8 kB view details)

Uploaded Python 3

File details

Details for the file deltacamera-0.5.2.dev0.tar.gz.

File metadata

  • Download URL: deltacamera-0.5.2.dev0.tar.gz
  • Upload date:
  • Size: 106.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for deltacamera-0.5.2.dev0.tar.gz
Algorithm Hash digest
SHA256 a65cd3832d3fe64eb3e05005141558fc75bf2f5f790b38d93ebce8a9d1a0f967
MD5 d1445686d3744707d47a0d91b3158838
BLAKE2b-256 5f58c3b6209bcceeb8e8e1aa9c3016e5f56ccd7eef7745a5d3425e7ac0f5700b

See more details on using hashes here.

File details

Details for the file deltacamera-0.5.2.dev0-py3-none-any.whl.

File metadata

File hashes

Hashes for deltacamera-0.5.2.dev0-py3-none-any.whl
Algorithm Hash digest
SHA256 169828a6eaa3ef1b8c92fdbe3062c502793dba19c7e077ca9e6e5fd43e654675
MD5 1dc46e8d176521dd1d9c4199c6680ba9
BLAKE2b-256 b15068a7031d87dc11e245b8569f61121c02f3ff998c77a9392b204e3cd042ba

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page