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.
This package is under development and not well tested nor stable.
Installation
pip install 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 intrinsicscrop
: Crop intrinsicsresize
: Resize intrinsics
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file camera_intrinsics-0.0.2.tar.gz
.
File metadata
- Download URL: camera_intrinsics-0.0.2.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1.post20200622 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cdc6cb83d4fc8170c582b31551f024447e9339ea50c3d47b90b90a070014806c |
|
MD5 | 469b7119f138698adc8bb334e756d628 |
|
BLAKE2b-256 | dfd29830137c4c2c95f5ebc59854b7ce4b10c22069460f005fdb7f85a48e5657 |
File details
Details for the file camera_intrinsics-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: camera_intrinsics-0.0.2-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1.post20200622 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac11cf7ecba7bb7e527a6dc4357df4290d5ad37324c8ecb2292f47ad3eee4d92 |
|
MD5 | 04d8f1a05f5bce57819955f4c4a8839a |
|
BLAKE2b-256 | dc522ede5e7bdcb804f13bbbd6ec4f63c1dea5dffecdd6854dba74b6a96651c6 |