api.samples package

Submodules

api.samples.box_2d module

api.samples.box_3d module

api.samples.echo module

class api.samples.echo.Echo(index, datasource, virtual_raw=None, virtual_ts=None)

Bases: pioneer.das.api.samples.sample.Sample

Sample from a single data package provided by a LCAx sensor. See pioneer.common.clouds.to_echo_package() to create a similar data package from scratch.

__init__(index, datasource, virtual_raw=None, virtual_ts=None)

virtual_raw and virtual_ts are meant for samples which dont exist in a physical datasource. For example interpolated samples, or samples derived from other samples.

amplitude_img(options='max_amplitude', dtype=<class 'numpy.float32'>, extrema=None)
property amplitudes
cache()
channel_index_to_image_coord(index)
clip_to_fov_mask(pts: numpy.ndarray) → numpy.ndarray
property data
distance_img(options='min_distance', dtype=<class 'numpy.float32'>, extrema=None)
property distances
property flags
get_cloud(referential: str = None, ignore_orientation: bool = False, undistort: bool = False, reference_ts: int = -1, dtype: numpy.dtype = <class 'numpy.float64'>)
property h
image_coord_to_channel_index(row, col)
property indices
property mask
property masked
other_field_img(field, dtype=<class 'numpy.float32'>)
point_cloud(referential: str = None, ignore_orientation: bool = False, undistort: bool = False, reference_ts: int = -1, dtype: numpy.dtype = <class 'numpy.float64'>)

Compute a 3D point cloud from raw data

Parameters
  • referential – The target sensor referential or full datasource name

  • ignore_orientation – Ignore the source sensor orientation (default: {False})

  • undistort – Apply motion compensation to 3d points.

  • reference_ts – (only used if referential == ‘world’ and/or undistort == True), refer to compute_transform()’s documentation

  • dtype – the output numpy data type

quad_cloud(referential=None, ignore_orientation=False, undistort=False, reference_ts=-1, dtype=<class 'numpy.float64'>)

Compute a 3d surface cloud from raw data (quads made of 2 triangles)

Parameters
  • referential – The target sensor referential or full datasource name

  • ignore_orientation – Ignore the source sensor orientation (default: {False})

  • undistort – Apply motion compensation to 3d points.

  • reference_ts – (only used if referential == ‘world’ and/or undistort == True), refer to compute_transform()’s documentation

  • dtype – the output numpy data type

property raw
property specs
property timestamps
property v

api.samples.echo_xyzit module

class api.samples.echo_xyzit.EchoXYZIT(index, datasource, virtual_raw=None, virtual_ts=None)

Bases: pioneer.das.api.samples.xyzit.XYZIT

Similar data structure than XYZIT sample. However, this sub-class should be used instead if the sensor is a LCAx instance.

__init__(index, datasource, virtual_raw=None, virtual_ts=None)

virtual_raw and virtual_ts are meant for samples which dont exist in a physical datasource. For example interpolated samples, or samples derived from other samples.

point_cloud(referential=None, ignore_orientation=False, undistort=False, reference_ts=-1, dtype=<class 'numpy.float64'>)

Compute a 3D point cloud from raw data

Parameters
  • referential – The target sensor referential or full datasource name

  • ignore_orientation – Ignore the source sensor orientation (default: {False})

  • undistort – Apply motion compensation to 3d points.

  • reference_ts – (only used if referential == ‘world’ and/or undistort == True), refer to compute_transform()’s documentation

  • dtype – the output numpy data type

api.samples.fast_trace module

class api.samples.fast_trace.FastTrace(index, datasource, virtual_raw=None, virtual_ts=None)

Bases: pioneer.das.api.samples.trace.Trace

Derivation of Trace sample, for Pixell sensors. Two distinct sets of waveforms are contained in the raw data dictionnary, under the keys ‘high’ and ‘low’.

__init__(index, datasource, virtual_raw=None, virtual_ts=None)

virtual_raw and virtual_ts are meant for samples which dont exist in a physical datasource. For example interpolated samples, or samples derived from other samples.

property max_range
processed(trace_processing: Callable)
processed_array(trace_processing: Callable)
property raw
property raw_array

api.samples.image module

class api.samples.image.Image(index, datasource, virtual_raw=None, virtual_ts=None)

Bases: pioneer.das.api.samples.sample.Sample

RGB data from a single camera image

__init__(index, datasource, virtual_raw=None, virtual_ts=None)

virtual_raw and virtual_ts are meant for samples which dont exist in a physical datasource. For example interpolated samples, or samples derived from other samples.

property camera_matrix
property distortion_coeffs
project_pts(pts, mask_fov=False, output_mask=False, undistorted=False, margin=0)

projects 3D points from camera referential to the image plane.

Parameters
  • - (undistorted) –

  • -

  • -

  • -

  • margin (optionnal) – margin (in pixels) outside the image unaffected by the fov mask

projection_mask(pts, projection, margin=0)
raw_image()
property und_camera_matrix

the undistorted new camera matrix

undistort_image()

api.samples.image_cylinder module

class api.samples.image_cylinder.ImageCylinder(index, datasource, virtual_raw=None, virtual_ts=None)

Bases: pioneer.das.api.samples.image.Image

Image derivation that was transformed by a cylindrical projection

__init__(index, datasource, virtual_raw=None, virtual_ts=None)

virtual_raw and virtual_ts are meant for samples which dont exist in a physical datasource. For example interpolated samples, or samples derived from other samples.

project_pts(pts, mask_fov=False, output_mask=False, undistorted=False, margin=0)

project 3D in the 2D cylindrical referiencial

Parameters
  • pts – 3D point in the center camera referential (3xN)

  • mask_fov (optionnal) – removes points outside the fov

  • output_mask (optionnal) – if True, returns the mask applied to the points

  • undistorted (=False) – Does nothing in the case of ImageCylinder, as it is always undistorted

  • margin (optionnal) – margin (in pixels) outside the image unaffected by the fov mask

Returns

2D points in cylindrical image referential mask (optionnal): returned if output_mask is True

Return type

2xN

undistort_image()

api.samples.image_fisheye module

class api.samples.image_fisheye.ImageFisheye(index, datasource, virtual_raw=None, virtual_ts=None)

Bases: pioneer.das.api.samples.image.Image

A derivation the Image sample, to be used with fisheye lenses.

__init__(index, datasource, virtual_raw=None, virtual_ts=None)

virtual_raw and virtual_ts are meant for samples which dont exist in a physical datasource. For example interpolated samples, or samples derived from other samples.

project_pts(pts, mask_fov=False, output_mask=False, undistorted=False, margin=0)

projects 3D points from camera referential to the image plane.

Parameters
  • - (undistorted) –

  • -

  • -

  • -

  • margin (optionnal) – margin (in pixels) outside the image unaffected by the fov mask

undistort_image()

api.samples.lane module

api.samples.poly_2d module

api.samples.rpm module

class api.samples.rpm.RPM(index, datasource, virtual_raw=None, virtual_ts=None)

Bases: pioneer.das.api.samples.sample.Sample

Rotations per minute measured by wheel encoders (left and right channels)

__init__(index, datasource, virtual_raw=None, virtual_ts=None)

virtual_raw and virtual_ts are meant for samples which dont exist in a physical datasource. For example interpolated samples, or samples derived from other samples.

meters_per_second()

api.samples.sample module

class api.samples.sample.Sample(index, datasource, virtual_raw=None, virtual_ts=None)

Bases: object

LUT = {}
__init__(index, datasource, virtual_raw=None, virtual_ts=None)

virtual_raw and virtual_ts are meant for samples which dont exist in a physical datasource. For example interpolated samples, or samples derived from other samples.

compute_transform(referential_or_ds: str = None, ignore_orientation: bool = False, reference_ts: int = -1, dtype=<class 'numpy.float64'>) → numpy.ndarray

Compute the transform from this Sample sensor to another sensor referential.

By default the transform between the two sensors reference frames include the contribution from the orientation member. If ones wishes to ignore this contribution it can set the ignore_orientation parameter to True.

Parameters
  • referential_or_ds – The other sensor name or full datasource name, e.g. flir_tfc or flir_tfc_img (default: {None})

  • ignore_orientation – Ignore the source sensor orientation (default: {False})

  • reference_ts – (only used if referential_or_ds == ‘world’), the timestamp at which we want to ‘jump’ from EgomotionProvider’s referential (e.g. the IMU) to the to ‘world’ referential. Also note that the ‘world’ referential is actually EgomotionProdiver’s referential at some reference time ‘t’ (refer to your actual EgomotionProvider’s configuration, by default ‘t’ is EgomotionProvider’s initial timestamp). ‘world’ referential is thus commonly refered to as the ‘EgoZero’ referential

  • dtype – the output numpy data type

Returns

The [4, 4] transformation matrix

property extrinsics
property intrinsics
property label
property orientation
pretty_print()
property raw
property sensor_type
property time_of_issues
property timestamp
transform(pts: numpy.ndarray, referential_or_ds: str, ignore_orientation: bool = False, reference_ts: int = -1, reverse: bool = False, dtype=<class 'numpy.float64'>) → numpy.ndarray

Transform 3D points from this Sample sensor to another sensor referential.

Parameters
  • pts – The [N, 3] points to be transformed

  • referential_or_ds – The target sensor referential or full datasource name

  • ignore_orientation – Ignore the source sensor orientation (default: {False})

  • reference_ts – refer to compute_transform()’s doc (only used if referential_or_ds == ‘world’)

  • reverse – apply the reverse transformation

  • dtype – the output numpy data type

Returns

The transformed points

transform_image(image)
static transform_pts(matrix4x4, ptsNx3)
undistort_points(pts_Local_batches: list, timestamps: numpy.ndarray, reference_ts: int = -1, to_world: bool = False, dtype=<class 'numpy.float64'>)

Transform 3D points that have not been sampled simultaneously to their ‘correct’ place referential.

Parameters
  • pts_Local_batches – a list of arrays of [N, 3] points to be transformed

  • timestamps – the N timestamps (common for all point batches)

  • to_world – If ‘True’, leave undistorted points in ‘world’ referential, otherwise project them back to local referential

  • reference_ts – only used if to_world == False, let the use chose at what time undistorted points are projected back to the local referential (useful to compare points from different sensors in a common local referential)

  • dtype – the output numpy data type

Returns

The transformed points

api.samples.sample.warn_if_less_than_64bit(dtype: numpy.dtype)

api.samples.seg_2d module

api.samples.seg_2d_image module

api.samples.seg_3d module

api.samples.trace module

class api.samples.trace.Trace(index, datasource, virtual_raw=None, virtual_ts=None)

Bases: pioneer.das.api.samples.sample.Sample

Trace (or waveform) data from a single LCAx package

__init__(index, datasource, virtual_raw=None, virtual_ts=None)

virtual_raw and virtual_ts are meant for samples which dont exist in a physical datasource. For example interpolated samples, or samples derived from other samples.

property max_range
processed(trace_processing: Callable)
processed_array(trace_processing: Callable)
property raw
property raw_array
static saturation_flags(traces)
property specs
property timestamps

api.samples.xyvit module

class api.samples.xyvit.XYVIT(index, datasource, virtual_raw=None, virtual_ts=None)

Bases: pioneer.das.api.samples.xyzit.XYZIT

Point cloud in bird eye view plane provided by a radar sensor. For each data point, contains (x,y) coordinates, the relative radial velocity (v), the intensity (i) and a timestamp (t).

__init__(index, datasource, virtual_raw=None, virtual_ts=None)

virtual_raw and virtual_ts are meant for samples which dont exist in a physical datasource. For example interpolated samples, or samples derived from other samples.

point_cloud(referential=None, ignore_orientation=False, undistort=False, reference_ts=-1, dtype=<class 'numpy.float64'>)

Compute a 2D BEV point cloud from raw data

api.samples.xyzit module

class api.samples.xyzit.XYZIT(index, datasource, virtual_raw=None, virtual_ts=None)

Bases: pioneer.das.api.samples.sample.Sample

Point cloud provided by a mechanical lidar sensor. For each data point, contains (x,y,z) coordinates, the intensity (i) and a timestamp (t).

__init__(index, datasource, virtual_raw=None, virtual_ts=None)

virtual_raw and virtual_ts are meant for samples which dont exist in a physical datasource. For example interpolated samples, or samples derived from other samples.

property amplitudes
property distances
get_cloud(referential=None, ignore_orientation=False, undistort=False, reference_ts=-1, dtype=<class 'numpy.float64'>)
point_cloud(referential=None, ignore_orientation=False, undistort=False, reference_ts=-1, dtype=<class 'numpy.float64'>)

Compute a 3D point cloud from raw data

Parameters
  • referential – The target sensor referential or full datasource name

  • ignore_orientation – Ignore the source sensor orientation (default: {False})

  • undistort – Apply motion compensation to 3d points.

  • reference_ts – (only used if referential == ‘world’ and/or undistort == True), refer to compute_transform()’s documentation

  • dtype – the output numpy data type

property timestamps

Module contents