Function ouster::sdk::core::frame_ops::reduce_by_factor¶
Defined in File frame_ops.h
Function Documentation¶
-
LidarFrame ouster::sdk::core::frame_ops::reduce_by_factor(const LidarFrame &frame, size_t factor, bool update_metadata = false)¶
Downsample a LidarFrame by selecting every Nth beam row.
Equivalent to calling select_by_index with indices generated by reduce_factor_to_indices.
- Parameters:
frame[in] Source lidar frame. Must have sensor_info set.
factor[in] Downsampling factor. Must be a non-zero divisor of the frame height.
update_metadata[in] If true, the output frame’s sensor_info is updated to reflect the downsampled beams. Defaults to false.
- Throws:
std::invalid_argument – If factor is invalid or frame has no sensor_info.
- Returns:
New downsampled LidarFrame.