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.6.3.tar.gz (117.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.6.3-py3-none-any.whl (59.3 kB view details)

Uploaded Python 3

File details

Details for the file deltacamera-0.6.3.tar.gz.

File metadata

  • Download URL: deltacamera-0.6.3.tar.gz
  • Upload date:
  • Size: 117.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.6.3.tar.gz
Algorithm Hash digest
SHA256 8b4b592a75d749ed4f8ebe0a5a6e6cb7696627047411446916071053e255f5c4
MD5 85d0df201a4fb3614752c5e4e1431c80
BLAKE2b-256 9a76206f7ad7b822cb87d3e87c72fa1fb4cdc7b6e35993467833eb6ccff0e750

See more details on using hashes here.

File details

Details for the file deltacamera-0.6.3-py3-none-any.whl.

File metadata

  • Download URL: deltacamera-0.6.3-py3-none-any.whl
  • Upload date:
  • Size: 59.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for deltacamera-0.6.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3d0b06b36cfc8e7fbba47e270925786245355b2d0b4db2333909f8a8ce1af8ed
MD5 bad67499b29a267a0983d04c9681544b
BLAKE2b-256 dc0fa863b7a322f4153b490f8f5c7bdf768f2a0889adab6168fef8479e3097ce

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