diff options
author | Christian C <cc@localhost> | 2025-03-05 20:53:40 -0800 |
---|---|---|
committer | Christian C <cc@localhost> | 2025-03-05 20:53:40 -0800 |
commit | 74ae06a582b7c567caf3c04e5bf5dfabf6671f31 (patch) | |
tree | c73df879087bce2f3b8d6f09acaf378814027c66 /include/lib/seg | |
parent | ffeadedd0510cb7194058c8c66c21b57f6fa02f2 (diff) |
Closing up label gaps
Diffstat (limited to 'include/lib/seg')
-rw-r--r-- | include/lib/seg/util.h | 6 |
1 files changed, 6 insertions, 0 deletions
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 |