diff options
author | Christian C <cc@localhost> | 2025-03-05 19:58:33 -0800 |
---|---|---|
committer | Christian C <cc@localhost> | 2025-03-05 19:58:33 -0800 |
commit | 5b3cb257506f3fbe8c5ad3ea8aedb87d51e4c87c (patch) | |
tree | b96b9d3512afcd0bb872ec86bb393be6cbd259fe /src/main.c | |
parent | b68a9a6263610bb0a5ada53695e025daf1209fcb (diff) |
Filter small labels
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -180,6 +180,7 @@ int main(int argc, char** argv) CloseWindow(); #else if (masks != NULL) { + // Get the area/ perimeter of each label TIME(ts_start); for (size_t y = 0; y < height; y++) { for (size_t x = 0; x < width; x++) { @@ -198,6 +199,10 @@ int main(int argc, char** argv) print_label(root); printf("\n"); #endif + // Get the smallest labels + struct AVLNode* small_label_tree = NULL; + small_label_tree = get_small_labels(NULL, root, 50, 50); + free_avl_tree(small_label_tree); free_avl_tree_nodes(root); root = NULL; write_array("../out.bin", masks, width*height*sizeof(uint16_t)); |