diff --git a/raillabel/format/intrinsics_pinhole.py b/raillabel/format/intrinsics_pinhole.py index 380df11..6979371 100644 --- a/raillabel/format/intrinsics_pinhole.py +++ b/raillabel/format/intrinsics_pinhole.py @@ -10,30 +10,25 @@ @dataclass class IntrinsicsPinhole: - """Intrinsic calibration for a camera sensor. - - Parameters - ---------- - camera_matrix: tuple of float of length 12 - This is a 3x4 camera matrix which projects 3D homogeneous points (4x1) from a camera - coordinate system into the image plane (3x1). This is the usual K matrix for camera - projection as in OpenCV. It is extended from 3x3 to 3x4 to enable its direct utilisation to - project 4x1 homogeneous 3D points. The matrix is defined to follow the camera model: - x-to-right, y-down, z-forward. The following equation applies: - x_img = camera_matrix * X_ccs. - distortion: tuple of float of length 5 to 14 - This is the array 1xN radial and tangential distortion coefficients. - width_px: int - Width of the image frame in pixels. - height_px: int - Height of the image frame in pixels. + """Intrinsic calibration for a camera sensor.""" - """ + camera_matrix: tuple[ + float, float, float, float, float, float, float, float, float, float, float, float + ] + """This is a 3x4 camera matrix which projects 3D homogeneous points (4x1) from a camera + coordinate system into the image plane (3x1). This is the usual K matrix for camera projection as + in OpenCV. It is extended from 3x3 to 3x4 to enable its direct utilisation to project 4x1 + homogeneous 3D points. The matrix is defined to follow the camera model: x-to-right, y-down, + z-forward. The following equation applies: x_img = camera_matrix * X_ccs.""" + + distortion: tuple[float, float, float, float, float] + "This is the array 1x5 radial and tangential distortion coefficients." - camera_matrix: tuple[float, ...] - distortion: tuple[float, ...] width_px: int + "Width of the image frame in pixel." + height_px: int + "Height of the image frame in pixel." @classmethod def from_json(cls, json: JSONIntrinsicsPinhole) -> IntrinsicsPinhole: