def morphology(self, morphology):
if (morphology.shape != self.data.shape[0:2]):
raise Exception("Invalid morphology shape.")
self.__morphology = morphology
# choose some appropriate new threshold value
self.threshold = numpy.percentile(self.morphology.flatten(), q=90)
self.morphology_changed()
评论列表
文章目录