From: An unsupervised image segmentation algorithm for coronary angiography
FOR each pixel p in Graphbin  IF (p is black in a region BRp) AND NOT(4 neighbors of p are black)    search for the best cover CVp of p    generate a spanning tree STp and add CVp to it    FOR each NOT covered pixel pb in BRp      IF (pb is black) AND NOT(4 neighbors of pb are black)         search for the best cover CVpb of pb         add CVpb to STp     END IF   END FOR   END IF   FOR each tree cv in the spanning tree set CV     IF cv has nodes adjacent to nodes in STp        add STp to cv        END IF    END FOR END FOR search for the tree STblood which has the longest path |