|View source on GitHub|
This module implements perspective camera functionalities.
The perspective camera model, also referred to as pinhole camera model, is defined using a focal length \((f_x, f_y)\) and a principal point \((c_x, c_y)\). The perspective camera model can be written as a calibration matrix
also referred to as the intrinsic parameter matrix. The camera focal length \((f_x, f_y)\), defined in pixels, is the physical focal length divided by the physical size of a camera pixel. The physical focal length is the distance between the camera center and the image plane. The principal point is the intersection of the camera axis with the image plane. The camera axis is the line perpendicular to the image plane starting at the optical center.
More details about perspective cameras can be found on this page.
intrinsics_from_matrix(...): Extracts intrinsic parameters from a calibration matrix.
matrix_from_intrinsics(...): Builds calibration matrix from intrinsic parameters.
project(...): Projects a 3d point onto the 2d camera plane.
ray(...): Computes the 3d ray for a 2d point (the z component of the ray is 1).
unproject(...): Unprojects a 2d point in 3d.