aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/lib/algo/avl_tree.h6
-rw-r--r--include/lib/seg/mask_data.h10
2 files changed, 16 insertions, 0 deletions
diff --git a/include/lib/algo/avl_tree.h b/include/lib/algo/avl_tree.h
index 4bfc0f7..f77ce5b 100644
--- a/include/lib/algo/avl_tree.h
+++ b/include/lib/algo/avl_tree.h
@@ -29,6 +29,12 @@ struct AVLNode* right_rotate(struct AVLNode* parent);
// Rotate an AVL node left
struct AVLNode* left_rotate(struct AVLNode* parent);
+// Create AVL node
+struct AVLNode* create_avl_node(void* data, bool_t (*compare)(void*, void*));
+
+// Insert data into AVL tree
+struct Result avl_insert(struct AVLNode* node, void* data, bool_t (*compare)(void*, void*));
+
// In-order traversal print pointer
void print_in_order(struct AVLNode* root);
diff --git a/include/lib/seg/mask_data.h b/include/lib/seg/mask_data.h
index 595ffd6..34fd6f1 100644
--- a/include/lib/seg/mask_data.h
+++ b/include/lib/seg/mask_data.h
@@ -43,4 +43,14 @@ struct AVLNode* increase_label_area_alloc(struct AVLNode* root, uint16_t label);
// Create an AVL node if it doesn't exist
struct AVLNode* increase_label_perimeter_alloc(struct AVLNode* root, uint16_t label);
+// Comparison of uint16_ts
+bool_t compare_uint16_t(uint16_t* s1, uint16_t* s2);
+
+// In-order traversal print pointer
+void print_in_order_uint16_t(struct AVLNode* root);
+
+// Filter out small masks
+// Assumption: Contiguous labeling
+struct AVLNode* get_small_labels(struct AVLNode* removal_tree, struct AVLNode* label_tree, size_t min_area, size_t min_perimeter);
+
#endif