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.7.0.tar.gz (147.5 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.7.0-py3-none-any.whl (86.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for deltacamera-0.7.0.tar.gz
Algorithm Hash digest
SHA256 fb9a6b9e31c5269e26b8777ddecbc5d8c74e19fd29385c441a386e65fe85b7d4
MD5 b7aafc4498a42c3270990d7fa25ff8aa
BLAKE2b-256 0216d7eac6542928dc82776217013a83eb2dce54e7824150368e00adf1b03efd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: deltacamera-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 86.1 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.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 03b220bbb7d5ede08f95af1bf87438332873e8a4e56fafb4108d1aea1936d3b7
MD5 7ca37ffeda1410af1096cec7d6f853d4
BLAKE2b-256 c83b6d51d40fc5b39a77e263c354380245bbf58fb63ba99b9e18eca59bb15790

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