deltacamera#
Deltacamera: Camera calibration manipulation and image warping for computer vision.
This library provides coordinate transformations between world, camera, and image spaces with support for Brown-Conrady and Kannala-Brandt (fisheye) lens distortion models.
Example
>>> from deltacamera import Camera
>>> cam = Camera(intrinsic_matrix=[[500, 0, 320], [0, 500, 240], [0, 0, 1]])
>>> cam.world_to_image([[1, 2, 3]])
Submodules#
Classes#
Pinhole camera with extrinsic and intrinsic calibration with optional distortions. |
|
Brown-Conrady distortion model. |
|
Kannala-Brandt fisheye distortion model. |
|
Base class for lens distortion models. |
Functions#
|
Create an intrinsic matrix from a field of view and image shape. |
|
Transform 3D points from one camera's coordinate frame to another's. |
|
Compute the sub-box of new_box that would contain valid pixels when reprojecting. |
|
Estimate camera FOV from two orthogonal vanishing points. |
|
Decodes an 8-bit sRGB image to linear 16-bit. |
|
Encodes a linear 16-bit image to 8-bit sRGB. |
|
Reprojects a bounding box from one camera to another. |
|
Reprojects a bounding box from one camera to another using its corners. |
|
Reprojects a bounding box from one camera to another using its inscribed ellipse. |
|
Reprojects a bounding box from one camera to another using its side midpoints. |
|
Reproject a depth map from old_camera to new_camera. |
|
Transform an image captured with old_camera to look like it was captured by |
|
Like reproject_image, but assumes there are no lens distortions. |
|
Reproject an RGB image and depth map together, sharing intermediate computation. |
|
Reproject 2D image points from old_camera to new_camera. |
|
Reproject a binary mask from one camera view to another. |
|
Reproject an RLE-encoded mask from one camera view to another. |
|
Get the valid region mask for a camera with lens distortion. |
|
Get the valid region mask when reprojecting between two cameras. |