tree

Bazinga!

treesegmentation.tree.partition_graph(HDAG, weight_threshold, patches_dict)

Partition the graph based on a weight threshold. Assign cells and patches to trees based on the HDAG partitioning.

Parameters
  • HDAG – Hdag object

  • weight_threshold – float

  • patches_dict – dictionary of patches

Returns

array of tree objects

treesegmentation.tree.trees_to_labeled_grid(trees, x_size, y_size)

From an array of tree objects, label a 2D grid with their unique IDs.

Parameters
  • trees – list of tree objects

  • x_size – int

  • y_size – int

Returns

2D grid of labeled trees.