42 std::span<const float> mask, uint32_t w, uint32_t
h,
68 uint32_t w, uint32_t
h,
70 const Contour& contour,
71 float origin_x,
float origin_y,
72 float scale_x,
float scale_y);
const std::vector< float > * pixels
std::vector< Contour > find_contours(std::span< const float > mask, uint32_t w, uint32_t h, float min_area, uint32_t max_contours)
Extract outer contours from a binary mask.
void apply_contour_mask(std::span< float > pixels, uint32_t w, uint32_t h, uint32_t channels, const Contour &contour, float origin_x, float origin_y, float scale_x, float scale_y)
Zero all pixels in pixels that fall outside contour.