kitcar_utils.camera package
Submodules
kitcar_utils.camera.camera_specs module
Classes:
|
Camera specifications usually defined in kitcar-ros. |
- class CameraSpecs(focal_length_x: float, focal_length_y: float, optical_center_x: float, optical_center_y: float, r11: float, r12: float, r13: float, r21: float, r22: float, r23: float, r31: float, r32: float, r33: float, t1: float, t2: float, t3: float, capture_size: ~typing.Dict[str, float] = <factory>, capture_format: str = 'R8G8B8', clip: ~typing.Dict[str, float] = <factory>, output_size: ~typing.Dict[str, float] = <factory>, update_rate: float = 60, image_topic: str = '/simulation/sensors/raw/camera', info_topic: str = '/simulation/sensors/camera/info')[source]
Bases:
InitOptionsCamera specifications usually defined in kitcar-ros.
With this class, the real calibration is used to create the simulated camera model.
This way the camera specifications and calibration are very similar. The calibrations are still not exactly the same and therefore a separate calibration file is loaded!
There are, however, some nuances:
Instead of considering the complete calibration matrix, only the pitch angle is used to rotate the camera model around the y axis in simulation.
The real camera crops the image before publishing the image. This is reflected in the different
capture_sizeandoutput_size.
Attributes:
Rotation matrix of the camera.
Translation vector from vehicle to camera.
Matrix M.
Matrix A.
Matrix P.
Matrix H.
Translation vector to the camera in vehicle coordinates.
Translation vector to the camera in vehicle coordinates.
Vector of roll, pitch, yaw angles of the camera's pose.
Methods:
simplify()Create a simplified calibration from the real one.
save(file_path[, simplify, remove_clip, ...])Save to file.
- focal_length_x: float
- focal_length_y: float
- optical_center_x: float
- optical_center_y: float
- r11: float
- r12: float
- r13: float
- r21: float
- r22: float
- r23: float
- r31: float
- r32: float
- r33: float
- t1: float
- t2: float
- t3: float
- capture_size: Dict[str, float]
- capture_format: str = 'R8G8B8'
- clip: Dict[str, float]
- output_size: Dict[str, float]
- update_rate: float = 60
- image_topic: str = '/simulation/sensors/raw/camera'
- info_topic: str = '/simulation/sensors/camera/info'
- property R: matrix
Rotation matrix of the camera.
- Type:
np.matrix
- property t: matrix
Translation vector from vehicle to camera.
In camera coordinates.
- Type:
np.ndarray
- property M: matrix
Matrix M.
Transformation matrix from vehicle coordinates to camera coordinates.
- Type:
np.matrix
- property A: matrix
Matrix A.
Transformation matrix from camera coordinates to pixels.
- Type:
np.matrix
- property P: matrix
Matrix P.
Transformation matrix from vehicle coordinates to pixels.
- Type:
np.matrix
- property H: matrix
Matrix H.
Transformation matrix from ground vehicle coordinates to pixels.
- Type:
np.matrix
- property t_vehicle: ndarray
Translation vector to the camera in vehicle coordinates.
- Type:
np.ndarray
- property horizontal_fov: float