boundary_to_affinity#

omnipose.core.boundary_to_affinity(masks, boundaries)[source]#

This function converts boundary+interior labels to an affinity graph. Boundaries are taken to have label 1,2,...,N and interior pixels have some value M>N. This format is the best way I have found to annotate self-contact cells.