aboutsummaryrefslogtreecommitdiff
path: root/include/lib/seg
diff options
context:
space:
mode:
authorChristian C <cc@localhost>2025-03-05 16:29:12 -0800
committerChristian C <cc@localhost>2025-03-05 16:29:12 -0800
commit12de92c487469b44912c614fc21038cdb07c1a81 (patch)
tree22d1d161c8ade3522c1435ebedee80721e3dbe28 /include/lib/seg
parent74e46ee7709785f91e04ac42619e4a7e9f90bc18 (diff)
Perimeter pixel check
Diffstat (limited to 'include/lib/seg')
-rw-r--r--include/lib/seg/util.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/lib/seg/util.h b/include/lib/seg/util.h
index 1fd0247..b3526dd 100644
--- a/include/lib/seg/util.h
+++ b/include/lib/seg/util.h
@@ -1,12 +1,17 @@
#ifndef INC_LIB_SEG_UTIL_H
#define INC_LIB_SEG_UTIL_H
+#include <lib/bool.h>
#include <stdint.h>
#include <stddef.h>
// Convert x,y coords to linear coordinate
size_t xy_to_coord(size_t x, size_t y, uint32_t width, uint32_t height);
+// Determine if coordinate is on a mask boundary
+// Assumes mask is (WxH)
+bool_t is_on_mask_boundary(uint16_t* mask, uint32_t width, uint32_t height, size_t x, size_t y);
+
// Dilate masks by one 4-connected pixel
uint16_t* dilate(uint16_t* mask, uint32_t width, uint32_t height);