Fisheye MEI Camera¶
Fisheye MEI Metadata¶
- class py123d.datatypes.FisheyeMEICameraMetadata[source]¶
Metadata for a fisheye MEI camera.
Public Data Attributes:
camera_modelThe projection model of this camera.
camera_nameThe name of the fisheye MEI camera, according to the dataset naming convention.
camera_idThe ID of the fisheye MEI camera.
mirror_parameterThe mirror parameter of the fisheye MEI camera.
distortionThe distortion parameters of the fisheye MEI camera, if available.
projectionThe projection parameters of the fisheye MEI camera, if available.
widthThe width of the fisheye MEI camera image in pixels.
heightThe height of the fisheye MEI camera image in pixels.
camera_to_imu_se3The static extrinsic pose of the fisheye MEI camera.
Inherited from
BaseCameraMetadatacamera_modelThe projection model of the camera.
camera_idThe camera ID, unique within a sensor rig.
camera_nameThe camera name, according to the dataset naming convention.
camera_to_imu_se3The static extrinsic pose of the camera relative to the IMU frame.
widthThe width of the camera image in pixels.
heightThe height of the camera image in pixels.
channel_typeThe channel type of the camera image.
modality_typeReturns the type of the modality that this metadata describes.
modality_idReturns the camera ID as the modality ID.
aspect_ratioThe aspect ratio (width / height) of the camera.
Inherited from
BaseModalityMetadatamodality_typeReturns the type of the modality that this metadata describes.
modality_idOptional identifier for the modality, e.g. sensor ID for sensor modalities.
modality_keyReturns a unique key for this modality, combining type and id if applicable.
Public Methods:
from_dict(data_dict)Create a
FisheyeMEICameraMetadatainstance from a dictionary.to_dict()Converts the
FisheyeMEICameraMetadatainstance to a Python dictionary.project_to_image(points_cam)Project 3D points in camera frame to image pixel coordinates using the fisheye MEI model.
cam2image(points_3d)camera coordinate to image plane
Inherited from
BaseCameraMetadataproject_to_image(points_cam)Project 3D points in camera frame to image pixel coordinates.
Inherited from
BaseMetadatato_dict()Serialize the metadata instance to a plain Python dictionary.
from_dict(data_dict)Construct a metadata instance from a plain Python dictionary.
Private Methods:
Inherited from
BaseCameraMetadata_compute_in_fov_mask(pixel_coords, depth[, eps])Compute a boolean mask for points in front of the camera and within image bounds.
- classmethod from_dict(data_dict)[source]¶
Create a
FisheyeMEICameraMetadatainstance from a dictionary.- Parameters:
data_dict (
Dict[str,Any]) – Dictionary containing camera metadata.- Return type:
- Returns:
A new instance of
FisheyeMEICameraMetadata.
- property camera_model: CameraModel¶
The projection model of this camera.
- property camera_name: str¶
The name of the fisheye MEI camera, according to the dataset naming convention.
- property channel_type: CameraChannelType¶
The channel type of the camera image. Defaults to RGB.
- property distortion: FisheyeMEIDistortion | None¶
The distortion parameters of the fisheye MEI camera, if available.
- property modality_key: str¶
Returns a unique key for this modality, combining type and id if applicable.
- property modality_type: ModalityType¶
Returns the type of the modality that this metadata describes.
The channel type drives the modality: a
CameraChannelType.SEMANTICcamera is a per-pixel semantic segmentation stream (ModalityType.CAMERA_SEMANTIC), aCameraChannelType.INSTANCEcamera a per-pixel panoptic/instance stream (ModalityType.CAMERA_INSTANCE), and aCameraChannelType.DEPTHcamera a per-pixel metric depth stream (ModalityType.CAMERA_DEPTH), each written to its own Arrow file so it sits alongside — and never collides with — the RGB camera that shares itscamera_id. All other channel types are regularModalityType.CAMERA.
- property projection: FisheyeMEIProjection | None¶
The projection parameters of the fisheye MEI camera, if available.
- to_dict()[source]¶
Converts the
FisheyeMEICameraMetadatainstance to a Python dictionary.
- project_to_image(points_cam)[source]¶
Project 3D points in camera frame to image pixel coordinates using the fisheye MEI model.
Delegates to
cam2image()and wraps the result in the unified interface.- Parameters:
points_cam (
ndarray[tuple[Any,...],dtype[float64]]) – (N, 3) array of 3D points in the camera coordinate frame.- Return type:
Tuple[ndarray[tuple[Any,...],dtype[float64]],ndarray[tuple[Any,...],dtype[bool]],ndarray[tuple[Any,...],dtype[float64]]]- Returns:
A tuple of (pixel_coords (N,2), in_fov_mask (N,), depth (N,)).
- Raises:
ValueError – If mirror_parameter is not set.
Fisheye MEI Distortion¶
- class py123d.datatypes.FisheyeMEIDistortion[source]¶
Public Data Attributes:
arrayUnderlying NumPy array of distortion parameters, indexed by
FisheyeMEIDistortionIndex.k1Radial distortion coefficient k1.
k2Radial distortion coefficient k2.
p1Tangential distortion coefficient p1.
p2Tangential distortion coefficient p2.
Inherited from
ArrayMixinarrayThe array representation of the geometric entity.
shapeReturn the shape of the array.
Public Methods:
from_array(array[, copy])Creates a
FisheyeMEIDistortioninstance from a NumPy array,Inherited from
ArrayMixinfrom_array(array[, copy])Create an instance from a NumPy array.
from_list(values)Create an instance from a list of values.
tolist()Convert the array to a Python list.
to_list()Convert the array to a Python list.
copy()Return a copy of the object with a copied array.
- classmethod from_array(array, copy=True)[source]¶
- Creates a
FisheyeMEIDistortioninstance from a NumPy array, indexing according to
FisheyeMEIDistortionIndex.
- Parameters:
- Return type:
- Returns:
A new instance of
FisheyeMEIDistortion.
- Creates a
Fisheye MEI Projection¶
- class py123d.datatypes.FisheyeMEIProjection[source]¶
Fisheye MEI projection parameters.
Public Data Attributes:
arrayUnderlying NumPy array of projection parameters, indexed by
FisheyeMEIProjectionIndex.gamma1Generalized focal length gamma1.
gamma2Generalized focal length gamma2.
u0Principal point x-coordinate.
v0Principal point y-coordinate.
Inherited from
ArrayMixinarrayThe array representation of the geometric entity.
shapeReturn the shape of the array.
Public Methods:
from_array(array[, copy])Intializes a
FisheyeMEIProjectionfrom a NumPy array,Inherited from
ArrayMixinfrom_array(array[, copy])Create an instance from a NumPy array.
from_list(values)Create an instance from a list of values.
tolist()Convert the array to a Python list.
to_list()Convert the array to a Python list.
copy()Return a copy of the object with a copied array.
- classmethod from_array(array, copy=True)[source]¶
- Intializes a
FisheyeMEIProjectionfrom a NumPy array, indexing according to
FisheyeMEIProjectionIndex.
- Parameters:
- Return type:
- Returns:
A new instance of
FisheyeMEIProjection.
- Intializes a