aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian C <cc@localhost>2025-03-06 16:48:55 -0800
committerChristian C <cc@localhost>2025-03-06 16:48:55 -0800
commit636f829a0e5062151eb9af6b6ad0bd4155e2749e (patch)
tree99b850bc59f118c8db364d498b3df7095f7fdd7f
parent31429f745c151804af48b008a4aba1aa9d2b53a6 (diff)
Annotation
-rw-r--r--src/main.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/main.c b/src/main.c
index 7c29fd7..204f77f 100644
--- a/src/main.c
+++ b/src/main.c
@@ -110,12 +110,18 @@ int main(int argc, char** argv)
if (!silent) {
printf("Loading %s...\n", fpath);
}
+ //-----------------------------------------------
+ //-PROCESS-TIFF-TO-LABELS------------------------
+ //-----------------------------------------------
uint16_t *file_labels = tif_to_labels(fpath, &width, &height, &starting_label);
if (file_labels == NULL) {
free(fpath);
free(file_list[index]);
continue;
}
+ //-----------------------------------------------
+ //-COMBINE-LABELS-TO-GLOBAL-MASK-----------------
+ //-----------------------------------------------
masks = combine_masks(masks, file_labels, width, height);
free(file_labels);
free(fpath);
@@ -138,10 +144,10 @@ int main(int argc, char** argv)
printf("%u labels found\n", starting_label-1);
printf("Mask dimensions: %u %u\n", width, height);
}
- TIME(ts_filter_start);
//-----------------------------------------------
//-FILTER-SMALL-REGIONS-OUT----------------------
//-----------------------------------------------
+ TIME(ts_filter_start);
filter_small_masks(masks, width, height, MIN_AREA, MIN_PERIMETER);
TIME(ts_filter_end);
if (!silent) {
@@ -171,11 +177,10 @@ int main(int argc, char** argv)
}
free_avl_tree_nodes(root);
#endif
-
- TIME(ts_start);
//-----------------------------------------------
//-CLOSE-UP-SMALL-GAPS-BETWEEN-REGIONS-----------
//-----------------------------------------------
+ TIME(ts_start);
closeup(&masks, width, height, N_DILATIONS);
TIME(ts_end);
if (!silent) {