diff options
| author | Christian Cunningham <cc@local.lan> | 2025-03-05 19:58:33 -0800 |
|---|---|---|
| committer | Christian Cunningham <cc@local.lan> | 2025-03-05 19:58:33 -0800 |
| commit | 42694f833b07a16ca0ed8637d9cea0ce3f7c771d (patch) | |
| tree | b96b9d3512afcd0bb872ec86bb393be6cbd259fe /src/main.c | |
| parent | bc1250e778b6e84ae036a56fb97f8ef7ff0b37e2 (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)); |
