51 std::span<const float> mask, uint32_t w, uint32_t
h,
52 float min_area = 0.0F, uint32_t max_contours = 0,
53 uint32_t max_points_per_contour = 0);
71 const ComponentResult& components, uint32_t w, uint32_t
h,
72 float min_area = 0.0F, uint32_t max_contours = 0,
73 uint32_t max_points_per_contour = 0);
98 uint32_t w, uint32_t
h,
100 const Contour& contour,
101 float origin_x,
float origin_y,
102 float scale_x,
float scale_y);
Connected component labelling on normalised float masks.
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, uint32_t max_points_per_contour)
Extract outer and hole 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.