From 74ae06a582b7c567caf3c04e5bf5dfabf6671f31 Mon Sep 17 00:00:00 2001 From: Christian C Date: Wed, 5 Mar 2025 20:53:40 -0800 Subject: Closing up label gaps --- include/lib/seg/util.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include') diff --git a/include/lib/seg/util.h b/include/lib/seg/util.h index b3526dd..c3c0060 100644 --- a/include/lib/seg/util.h +++ b/include/lib/seg/util.h @@ -15,6 +15,12 @@ bool_t is_on_mask_boundary(uint16_t* mask, uint32_t width, uint32_t height, size // Dilate masks by one 4-connected pixel uint16_t* dilate(uint16_t* mask, uint32_t width, uint32_t height); +// Erode masks by one 4-connected pixel +uint16_t* erode(uint16_t* mask, uint32_t width, uint32_t height); + +// Close up masks by N-pixels +uint16_t* closeup(uint16_t* mask, uint32_t width, uint32_t height, size_t count); + // Combine Label Masks // For all empty spaces in the destination, put the extra label if it exists // Allocates an array if destination is unallocated -- cgit v1.2.1