def run(self, ips, snap, img, para = None): ips.data = sknw.build_sknw(img) img[:] = img * 120
def run(self, ips, snap, img, para = None): ips.data = sknw.build_sknw(img, True) sknw.draw_graph(img, ips.data) ips.mark = Mark(ips.data)
def run(self, ips, imgs, para=None): ips.data = sknw.build_sknw(imgs, True) sknw.draw_graph(imgs, ips.data)
def build(msk): dis = distance_transform_edt(msk) ske = skeletonize(msk > 128) graph = sknw.build_sknw(ske, True) rst = build_graph(graph, dis, True) return rst