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:
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]

camera_ray_from_pixel(pixel, epsilon=0.0)[source]

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

Returns:
  • camera_ray – The ray in the camera frame (NOT normalized)

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

Parameters:
Return type:

Tuple[Matrix31, float]