Skip to main content

Manipulate camera calibration parameters and warp images for computer vision tasks.

Project description

DeltaCamera

This is a computer vision / image processing library for changing camera calibration models, coordinate transformations, and image warping/undistortion to account for camera modifications and lens distortion.

Main use cases

  • Convert coordinates between world, camera and image space, handing lens distortion models according to the 14-parameter extended Brown–Conrady and the 4-parameter Kannala–Brandt fisheye models.
  • Reproject image points and entire images between different camera calibration settings (e.g., rotate the camera or change lens distortion).
  • Modify cameras with intuitive methods such as camera.zoomed, camera.rotated, camera.image_resized, camera.turned_towards, etc.

Benefits

  • Speed: The critical functions are accelerated with Numba and intermediate computations are cached for high performance.
  • Accuracy: We use a more accurate inversion of Brown–Conrady compared to OpenCV. OpenCV uses only fixed-point iteration, we use Newton's method in addition to that.
  • Tracking of pixel validity: When warping images, we keep track of which pixels in the output image are valid (i.e., map to valid pixels in the input image), taking into account also the valid region of the lens distortion model (outside of which distortion folds back on itself, and would cause artifacts if not detected). The valid region can be obtained as a Shapely polygon, an RLEMaskLib mask or as NaNs in the return values. This feature is missing from OpenCV.
  • Linear color interpolation: When warping images, we use linear interpolation in linear color space (gamma corrected), which avoids artifacts when warping images with strong contrast.
  • Anti-aliasing: When warping images, we use supersampling to avoid aliasing artifacts when downsampling parts of the image.

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.

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.4.dev0.tar.gz (106.4 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.4.dev0-py3-none-any.whl (55.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: deltacamera-0.5.4.dev0.tar.gz
  • Upload date:
  • Size: 106.4 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.4.dev0.tar.gz
Algorithm Hash digest
SHA256 e28a61613e031ffb4b1eef35dbcfc3d47841a1177ec5f1e830ad4195b23c438c
MD5 0c67d1ca5b9485c07ce3178e3d6d416b
BLAKE2b-256 17145ea462f050dd1ca7729c53c86439fc2f084dfb1107a07e47956847dc6bff

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for deltacamera-0.5.4.dev0-py3-none-any.whl
Algorithm Hash digest
SHA256 2a1c32872c0466e2e57ab8c0be329c59d797168772e5d9b9812fc35cf776a3e1
MD5 c305f23d598edf3fa24b3f92ec9a07e0
BLAKE2b-256 5aa8b5a4651d0d83ad07e096a7a96537a19c6d99d1cc3781978bef50847d2c9b

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