symforce.cam.equirectangular_camera_cal module

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

Bases: CameraCal

Equirectangular camera model with parameters [fx, fy, cx, cy]. (fx, fy) representing focal length; (cx, cy) representing principal point.

Parameters:
  • focal_length (Sequence[float]) –

  • principal_point (Sequence[float]) –

  • distortion_coeffs (Sequence[float]) –

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:

(x, y) coordinate in pixels if valid is_valid: 1 if the operation is within bounds else 0

Return type:

pixel

Parameters:
  • point (Matrix31) –

  • epsilon (float) –

camera_ray_from_pixel(pixel, epsilon=0.0)[source]

Backproject a 2D pixel coordinate into a 3D ray in the camera frame.

TODO(hayk): Add a normalize boolean argument? Like in cam.Camera

Returns:

The ray in the camera frame (NOT normalized) is_valid: 1 if the operation is within bounds else 0

Return type:

camera_ray

Parameters:
  • pixel (Matrix21) –

  • epsilon (float) –