camera

base

class stardust.components.camera.camera.CameraType(value)[source]

Bases: Enum

An enumeration.

PinHole = 'PinHole'
Fisheye = 'Fisheye'
OmniDirectional = 'OmniDirectional'
classmethod camera_type_list()[source]
Return type:

list

class stardust.components.camera.camera.Camera(camera_type, heading=None, position=None, intrinsic=None, radial=None, tangential=None, fov=None, skew=0, projection=None, name=None)[source]

Bases: object

camera object

Args:
camera_type:

Pinholes, fish eyes, panoramic views

heading:

quaternion (x, y, z, w)

position:

offset (x, y, z)

intrinsic:

camera parameter (fx, fy, cx, cy) or (fx, fy, c, d, e, cx, cy)

radial:

radial distortion (k1…)

tangential:

tangential distortion (p1…)

fov:

camera range (angle system)

projection:

panoramic camera parameters (p0…)

Returns:

Camera inatance

Examples:
cam = Camera(
    'PinHole',
    heading=(0.4351436321314605, -0.4677553765588058, 0.5492505771794342, -0.5386824023335351),
    position=(1.5601294, -0.37986112, 1.3333596),
    intrinsic=(1846.008599353862, 1857.930995475229, 1948.09353722228, 1078.768188621484),
    radial=(0, 0, 0, 0),
    tangential=(0, 0)
)
property rotated_vector

Extract the x, y, and z components of the rotated vector

property cam2lidar_rt: matrix

Camera rt matrix relative to radar

property intrinsic_matrix: ndarray | None

Internal parameter matrix of pinhole and fisheye cameras

get_pixel_coordinate(point_in_cam)[source]

Convert point cloud points to pixel coordinates

Return type:

tuple

Args:
point_in_cam: (x, y, z)

The coordinates of points in the camera coordinate system

static gen_camera(camera)[source]

generate the Camera obj

Args:
camera: Dict

camera data

Returns:

obj: Camera