Function ouster::sdk::core::frame_ops::mask

Function Documentation

void ouster::sdk::core::frame_ops::mask(LidarFrame &frame, const std::vector<std::string> &fields, Eigen::Ref<const ouster::sdk::core::img_t<uint8_t>> mask)

Apply a binary mask to frame fields.

Pixels where the mask is 0 are set to 0 in the specified fields. The mask dimensions must match the frame dimensions.

Parameters:
  • frame[inout] The lidar frame to mask in place.

  • fields[in] List of field names to apply the mask to. If empty, all pixel fields are used.

  • mask[in] Binary mask data as a 2D Eigen array (row-major). Non-zero values keep the pixel, zero values invalidate it.

Throws:

std::invalid_argument – If mask dimensions don’t match frame dimensions.