Function ouster::sdk::core::frame_ops::filter_field¶
Defined in File frame_ops.h
Function Documentation¶
-
void ouster::sdk::core::frame_ops::filter_field(LidarFrame &frame, const std::string &field, double lower, double upper, double invalid = 0, const std::vector<std::string> *filtered_fields = nullptr)¶
Filter frame fields using a value range on a specific field as a mask.
Builds a binary mask from the given field where values in [lower, upper] pass, then applies that mask to all resolved pixel fields. Pixels that fail the mask are set to the invalid value.
- Parameters:
frame[inout] The lidar frame to filter in place.
field[in] Name of the field used to build the filter mask. Must be a pixel field with shape (h, w).
lower[in] Lower bound of the filter range (inclusive).
upper[in] Upper bound of the filter range (inclusive).
invalid[in] Value assigned to filtered-out pixels. Defaults to 0.
filtered_fields[in] Optional list of field names to apply the mask to. If null, all pixel fields are filtered.
- Throws:
std::invalid_argument – If the filter field does not have shape (h, w).