Skip to main content

A package for applying image transformations to the camera intrinsics.

Project description

Camera Intrinsics

A small package that supports applying image transformations, e.g. cropping or resizing, to the camera intrinsics.

Intrinsics

Camera intrinsics are python dicts with the keys height, width, fx, fy, cx, cy, options.

Example

import camera_intrinsics as cam

intr = cam.intrinsics(width=128, height=96, fx=128.0, fy=128.0, cx=63.5, cy=47.5)  # Make sure to be clear about half_pixel_centers! Read the doc below.
print(intr)
>>> {'height': 96, 'width': 128, 'fx': 128.0, 'fy': 128.0, 'cx': 63.5, 'cy': 47.5, 'options': ''}

Options

The options string is the join of the single options with a semincolon ,. The available options are listed below.

Pixel Coordinate Convention

There are mainly two conventions for the pixel coordinates. The preferred one within this package uses (0,0) as the coordinate for the top-left pixel and its options string is "". The other convention uses (.5, .5) as the coordinate for the top-left pixel and its options string is "half_pixel_centers" . Be careful to select the right convention when creating the intrinsics. Here is a list of toolboxes and their conventions

  • No half_pixel_centers: DSO (link), MATLAb Calibration Toolbox (link), Berkeley Automation (link)
  • half_pixel_centers: COLMAP (link), FastMVSNet (link)

Methods

Currently the following methods are supported:

  • intrinsics: Make intrinsics
  • crop: Crop intrinsics
  • resize: Resize intrinsics

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

camera_intrinsics-0.0.1.tar.gz (3.8 kB view hashes)

Uploaded Source

Built Distribution

camera_intrinsics-0.0.1-py3-none-any.whl (5.1 kB view hashes)

Uploaded Python 3

Supported by

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