symforce.cam.camera module#
- class Camera(calibration, image_size=None)[source]#
Bases:
object
Camera with a given camera calibration and an optionally specified image size (width, height).
If the image size is specified, we use it to check whether pixels (either given or computed by projection of 3D points into the image frame) are in the image frame and thus valid/invalid.
- CameraT = ~CameraT#
- pixel_from_camera_point(point, epsilon=0.0)[source]#
Project a 3D point in the camera frame into 2D pixel coordinates.
- camera_ray_from_pixel(pixel, epsilon=0.0, normalize=False)[source]#
Backproject a 2D pixel coordinate into a 3D ray in the camera frame.
NOTE: If image_size is specified and the given pixel is out of bounds, is_valid will be set to zero.
- has_camera_ray_from_pixel()[source]#
Returns True if self has implemented the method camera_ray_from_pixel, and False otherwise.
- Return type: