本文整理汇总了Python中skimage.filters.thresholding.threshold_yen函数的典型用法代码示例。如果您正苦于以下问题:Python threshold_yen函数的具体用法?Python threshold_yen怎么用?Python threshold_yen使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了threshold_yen函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_yen_blank_max
def test_yen_blank_max(self):
image = np.empty((5, 5), dtype=np.uint8)
image.fill(255)
assert threshold_yen(image) == 255
示例2: test_yen_binary
def test_yen_binary(self):
image = np.zeros([2, 256], dtype=np.uint8)
image[0] = 255
assert threshold_yen(image) < 1
示例3: test_yen_blank_zero
def test_yen_blank_zero(self):
image = np.zeros((5, 5), dtype=np.uint8)
assert threshold_yen(image) == 0
示例4: test_yen_float_image
def test_yen_float_image(self):
image = np.float64(self.image)
assert 2 <= threshold_yen(image) < 3
示例5: test_yen_arange
def test_yen_arange(self):
image = np.arange(256)
assert threshold_yen(image) == 127
示例6: test_yen_negative_int
def test_yen_negative_int(self):
image = self.image - 2
assert threshold_yen(image) == 0
示例7: test_yen
def test_yen(self):
assert threshold_yen(self.image) == 2
示例8: test_yen_coins_image_as_float
def test_yen_coins_image_as_float():
coins = skimage.img_as_float(data.coins())
assert 0.43 < threshold_yen(coins) < 0.44
示例9: test_yen_coins_image
def test_yen_coins_image():
coins = skimage.img_as_ubyte(data.coins())
assert 109 < threshold_yen(coins) < 111
示例10: test_yen_camera_image
def test_yen_camera_image():
camera = skimage.img_as_ubyte(data.camera())
assert 197 < threshold_yen(camera) < 199