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 sRGB 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

TODO

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.4.1.dev0.tar.gz (73.2 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.4.1.dev0-py3-none-any.whl (48.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for deltacamera-0.4.1.dev0.tar.gz
Algorithm Hash digest
SHA256 b81f65d83450b31d2f9d9cdaa5152fab1efb1dbf45248b04ddfa68c443c1cec9
MD5 19389374b8b2f3d9dd8b2cafaeae002a
BLAKE2b-256 e7df9a07131eda877177b4c90ff6c9b3842f272ac5397a64c11652cec8930977

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for deltacamera-0.4.1.dev0-py3-none-any.whl
Algorithm Hash digest
SHA256 a1cfeda323f31e876bfd04f05514c5a990501a225e7106f93aa77841e55532af
MD5 10ae196b3c8fe863d4eda0e1ac5f0ad0
BLAKE2b-256 51c4e9e2f5a09d9233f672f21130068ea712f294653bb7c3ed2eb3b6c4798bc6

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