symforce.cam.orthographic_camera_cal module

class OrthographicCameraCal(focal_length, principal_point, distortion_coeffs=())[source]

Bases: CameraCal

Orthographic camera model with four parameters [fx, fy, cx, cy].

It would be possible to define orthographic cameras with only two parameters [fx, fy] but we keep the [cx, cy] parameters for consistency with the CameraCal interface.

The orthographic camera model can be thought of as a special case of the LinearCameraCal model, where (x,y,z) in the camera frame projects to pixel (x * fx + cx, y * fy + cy). The z-coordinate of the point is ignored in the projection, except that only points with positive z-coordinates are considered valid.

Because this is a noncentral camera model, the camera_ray_from_pixel function is not implemented.

Parameters:
NUM_DISTORTION_COEFFS = 0
pixel_from_camera_point(point, epsilon=0.0)[source]

Project a 3D point in the camera frame into 2D pixel coordinates.

Returns:
  • pixel – (x, y) coordinate in pixels if valid

  • is_valid – 1 if the operation is within bounds else 0

Parameters:
Return type:

Tuple[Matrix21, float]