diff options
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -170,16 +170,24 @@ int main(int argc, char** argv) CloseWindow(); #else if (masks != NULL) { + TIME(ts_start); for (size_t y = 0; y < height; y++) { for (size_t x = 0; x < width; x++) { if (masks[x + y*width] != 0) { root = increase_label_area_alloc(root, masks[x + y*width]); + if (is_on_mask_boundary(masks, width, height, x, y)) { + increase_label_perimeter(root, masks[x + y*width]); + } } } } + TIME(ts_end); + printf("Information retrieval took %f ms\n", 1000*diff_time(&ts_end, &ts_start)); +#ifdef AVL_INFO printf("Inorder traversal of AVL tree: "); print_label(root); printf("\n"); +#endif free_avl_tree_nodes(root); root = NULL; write_array("../out.bin", masks, width*height*sizeof(uint16_t)); |