ouster.sdk.core.scan_ops module
- clip(scan, fields, lower, upper, invalid=0)[source]
Limits the values of the specified set of pixel fields to within the range [lower, upper]. Any value outside this range is replaced by the supplied invalid value (default is zero).
- Return type:
None
- filter_field(scan, field, lower, upper, invalid=0, filtered_fields=None)[source]
Filters scan pixel fields based on the values of another pixel field. Pixels whose filter field values fall in the range [lower, upper] are replaced by the supplied invalid value (default is zero).
Parameters: - scan: LidarScan - field: str; the pixel field to be used as the filter mask source - lower: float; lower bound - upper: float; upper bound - invalid: int; the invalid value to use default is 0 - filtered_fields: Optional[List[str]]; an optional list of fields to filter
- Return type:
None
- filter_uv(scan, coord_2d, lower, upper, invalid=0, filtered_fields=None)[source]
Filters the scan based on the specified image axis (‘u’ or ‘v’). Pixel values that fall within the specified index range [lower, upper) are replaced by the supplied invalid value (default is zero).
Parameters: - scan: LidarScan - coord_2d: str; image axis to filter (‘u’ rows, ‘v’ columns) - lower: Union[int, float]; lower bound if float it is assumed a percentage - upper: Union[int, float]; upper bound if float it is assumed a percentage - invalid: int; the invalid value to use default is 0 - filtered_fields: Optional[List[str]]; an optional list of fields to filter
- Return type:
None
- filter_xyz(scan, xyzlut, axis_idx, lower=-inf, upper=inf, invalid=0, filtered_fields=None, dewarp_points=False)[source]
Filters the scan based on spatial coordinates (X, Y, or Z). Points with coordinates inside the specified range [lower, upper] are replaced with the invalid value (default is zero).
Only PIXEL_FIELD types (spatial/image-like data such as RANGE, SIGNAL, REFLECTIVITY) are filtered. Non-spatial fields (IMU, GNSS position, etc.) are preserved.
Parameters: - scan: LidarScan - xyzlut: Callable[[Union[LidarScan, np.ndarray]], np.ndarray] - axis_idx: int; spatial axis to filter (0=X, 1=Y, 2=Z) - lower: float; lower bound - upper: float; upper bound - invalid: int; the invalid value to use (default is 0) - filtered_fields: Optional[List[str]]; specific fields to filter (if None, filters all PIXEL_FIELD types) - dewarp_points: bool; if True, dewarp XYZ points using scan.pose
- Return type:
None
- mask(scan, fields, mask)[source]
Applies a boolean mask to scan pixel fields.
mask should have shape (scan.h, scan.w). Pixels where mask == 0 are set to 0.
- Return type:
None