ouster.sdk.viz.view_mode module¶
- class FieldViewMode(*args, **kwargs)[source]¶
Bases:
ProtocolLidarFrame field processor
View modes define the process of getting the key data for the frame and return number as well as checks the possibility of showing data in that mode, see enabled().
- property name: str¶
Name of the view mode
- property names: List[str]¶
Name of the view mode per return number
- enabled(ls, return_num=0)[source]¶
Checks the view mode availability for a frame and return number :rtype:
bool- Parameters:
ls (LidarFrame)
return_num (int)
- Return type:
bool
- class ImageMode(*args, **kwargs)[source]¶
Bases:
FieldViewMode,ProtocolApplies the view mode key to the viz.Image
- set_image(img, ls, return_num=0)[source]¶
Prepares the key data and sets the image key to it. :rtype:
None- Parameters:
img (Image)
ls (LidarFrame)
return_num (int)
- Return type:
None
- class CloudMode(*args, **kwargs)[source]¶
Bases:
FieldViewMode,ProtocolApplies the view mode key to the viz.Cloud
- set_cloud_color(cloud, ls, *, return_num=0)[source]¶
Prepares the key data and sets the cloud key to it. :rtype:
None- Parameters:
cloud (Cloud)
ls (LidarFrame)
return_num (int)
- Return type:
None
- class ImageCloudMode(*args, **kwargs)[source]¶
Bases:
ImageMode,CloudMode,ProtocolApplies the view mode to viz.Cloud and viz.Image
- class RingMode(info)[source]¶
Bases:
CloudModeView mode to show laser ring.
- Parameters:
info (
SensorInfo) – sensor metadata
- property name: str¶
Name of the view mode
- property names: List[str]¶
Name of the view mode per return number
- set_cloud_color(cloud, ls, return_num=0)[source]¶
Prepares the key data and sets the cloud key to it. :rtype:
None- Parameters:
cloud (Cloud)
ls (LidarFrame)
return_num (int)
- Return type:
None
- enabled(ls, return_num=0)[source]¶
Checks the view mode availability for a frame and return number
- Parameters:
ls (LidarFrame)
return_num (int)
- class SensorMode(info, color)[source]¶
Bases:
CloudModeView mode to show sensor index.
- Parameters:
info (
SensorInfo) – sensor metadatacolor (Tuple[int, int, int])
- property name: str¶
Name of the view mode
- property names: List[str]¶
Name of the view mode per return number
- set_cloud_color(cloud, ls, return_num=0)[source]¶
Prepares the key data and sets the cloud key to it. :rtype:
None- Parameters:
cloud (Cloud)
ls (LidarFrame)
return_num (int)
- Return type:
None
- enabled(ls, return_num=0)[source]¶
Checks the view mode availability for a frame and return number
- Parameters:
ls (LidarFrame)
return_num (int)
- class TimestampMode(info)[source]¶
Bases:
CloudModeView mode to show column timestamp.
- Parameters:
info (
SensorInfo) – sensor metadata
- property name: str¶
Name of the view mode
- property names: List[str]¶
Name of the view mode per return number
- set_cloud_color(cloud, ls, return_num=0)[source]¶
Prepares the key data and sets the cloud key to it. :rtype:
None- Parameters:
cloud (Cloud)
ls (LidarFrame)
return_num (int)
- Return type:
None
- enabled(ls, return_num=0)[source]¶
Checks the view mode availability for a frame and return number
- Parameters:
ls (LidarFrame)
return_num (int)
- class SimpleMode(field, *, info=None, prefix='', suffix='', use_ae=True, use_buc=False, scale=None)[source]¶
Bases:
ImageCloudModeBasic view mode with AutoExposure and BeamUniformityCorrector
Handles single and dual returns frames.
When AutoExposure is enabled its state updates only for return_num=0 but applies for both returns.
- Parameters:
info (
Optional[SensorInfo]) – sensor metadata used mainly for destaggering herefield (
str) – name of field to process, second return is handled automaticallyprefix (
Optional[str]) – name prefixsuffix (
Optional[str]) – name suffixuse_ae (
bool) – if True, use AutoExposure for the fielduse_buc (
bool) – if True, use BeamUniformityCorrector for the fieldscale (
Optional[float]) – if use_ae is false and this is set, use this to scale the values for display
- property name: str¶
Name of the view mode
- property names: List[str]¶
Name of the view mode per return number
- set_image(img, ls, return_num=0)[source]¶
Prepares the key data and sets the image key to it. :rtype:
None- Parameters:
img (Image)
ls (LidarFrame)
return_num (int)
- Return type:
None
- set_cloud_color(cloud, ls, return_num=0)[source]¶
Prepares the key data and sets the cloud key to it. :rtype:
None- Parameters:
cloud (Cloud)
ls (LidarFrame)
return_num (int)
- Return type:
None
- enabled(ls, return_num=0)[source]¶
Checks the view mode availability for a frame and return number
- Parameters:
ls (LidarFrame)
return_num (int)
- class RGBMode(field, *, info=None)[source]¶
Bases:
ImageCloudModeRGB view mode
- Parameters:
info (
Optional[SensorInfo]) – sensor metadata used mainly for destaggering herefield (
str) – channel field to process
- property name: str¶
Name of the view mode
- property names: List[str]¶
Name of the view mode per return number
- set_image(img, ls, return_num=0)[source]¶
Prepares the key data and sets the image key to it. :rtype:
None- Parameters:
img (Image)
ls (LidarFrame)
return_num (int)
- Return type:
None
- set_cloud_color(cloud, ls, return_num=0)[source]¶
Prepares the key data and sets the cloud key to it. :rtype:
None- Parameters:
cloud (Cloud)
ls (LidarFrame)
return_num (int)
- Return type:
None
- enabled(ls, return_num=0)[source]¶
Checks the view mode availability for a frame and return number
- Parameters:
ls (LidarFrame)
return_num (int)
- class HDRRGBMode(field, info)[source]¶
Bases:
ImageCloudModeRGB view mode using LocalToneMapper.
- Parameters:
field (str)
info (SensorInfo)
- property name: str¶
Name of the view mode
- property names: List[str]¶
Name of the view mode per return number
- set_image(img, ls, return_num=0)[source]¶
Prepares the key data and sets the image key to it. :rtype:
None- Parameters:
img (Image)
ls (LidarFrame)
return_num (int)
- Return type:
None
- set_cloud_color(cloud, ls, return_num=0)[source]¶
Prepares the key data and sets the cloud key to it. :rtype:
None- Parameters:
cloud (Cloud)
ls (LidarFrame)
return_num (int)
- Return type:
None
- enabled(ls, return_num=0)[source]¶
Checks the view mode availability for a frame and return number :rtype:
bool- Parameters:
ls (LidarFrame)
return_num (int)
- Return type:
bool
- class NormalsMode(field, *, info=None)[source]¶
Bases:
ImageCloudModeNormals value remap [-1, 1] -> [0, 1]
- Parameters:
field (str)
info (SensorInfo | None)
- property name: str¶
Name of the view mode
- property names: List[str]¶
Name of the view mode per return number
- set_image(img, ls, return_num=0)[source]¶
Prepares the key data and sets the image key to it. :rtype:
None- Parameters:
img (Image)
ls (LidarFrame)
return_num (int)
- Return type:
None
- set_cloud_color(cloud, ls, return_num=0)[source]¶
Prepares the key data and sets the cloud key to it. :rtype:
None- Parameters:
cloud (Cloud)
ls (LidarFrame)
return_num (int)
- Return type:
None
- enabled(ls, return_num=0)[source]¶
Checks the view mode availability for a frame and return number
- Parameters:
ls (LidarFrame)
return_num (int)
- class ReflMode(*, info=None)[source]¶
Bases:
SimpleMode,ImageCloudModePrepares image/cloud data for REFLECTIVITY channel
- Parameters:
info (
Optional[SensorInfo]) – sensor metadata used mainly for destaggering herefield – name of field to process, second return is handled automatically
prefix – name prefix
suffix – name suffix
use_ae – if True, use AutoExposure for the field
use_buc – if True, use BeamUniformityCorrector for the field
scale – if use_ae is false and this is set, use this to scale the values for display
- is_norm_reflectivity_mode(mode)[source]¶
Checks whether the image/cloud mode is a normalized REFLECTIVITY mode
- Return type:
bool- Parameters:
mode (FieldViewMode)
- LidarFrameVizMode¶
Field view mode types
alias of
ImageCloudMode|ImageMode|CloudMode