Skip to content

Commit

Permalink
docs: move IntrinsicsPinhole field docs below fields
Browse files Browse the repository at this point in the history
  • Loading branch information
tklockau committed Nov 4, 2024
1 parent e385f0e commit e877c07
Showing 1 changed file with 15 additions and 20 deletions.
35 changes: 15 additions & 20 deletions raillabel/format/intrinsics_pinhole.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit e877c07

Please sign in to comment.