def threshold(self, t):
self.__threshold = t
self.threshold_changed()
elevation_map = skimage.filters.sobel(self.morphology)
markers = numpy.zeros_like(self.morphology)
markers[self.morphology < self.threshold] = 1
markers[self.morphology > self.threshold * 1.1] = 2
segmentation = skimage.morphology.watershed(elevation_map, markers)
self.overlay = segmentation == 2
评论列表
文章目录