当前位置: 首页>>代码示例>>Python>>正文


Python thresholding.threshold_otsu函数代码示例

本文整理汇总了Python中skimage.filter.thresholding.threshold_otsu函数的典型用法代码示例。如果您正苦于以下问题:Python threshold_otsu函数的具体用法?Python threshold_otsu怎么用?Python threshold_otsu使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了threshold_otsu函数的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_otsu_coins_image_as_float

def test_otsu_coins_image_as_float():
    coins = skimage.img_as_float(data.coins())
    assert 0.41 < threshold_otsu(coins) < 0.42
开发者ID:amueller,项目名称:scikit-image,代码行数:3,代码来源:test_thresholding.py

示例2: test_otsu_lena_image

def test_otsu_lena_image():
    assert threshold_otsu(data.lena()) == 141
开发者ID:amueller,项目名称:scikit-image,代码行数:2,代码来源:test_thresholding.py

示例3: test_otsu_camera_image

def test_otsu_camera_image():
    assert threshold_otsu(data.camera()) == 87
开发者ID:amueller,项目名称:scikit-image,代码行数:2,代码来源:test_thresholding.py

示例4: test_otsu_coins_image

def test_otsu_coins_image():
    assert threshold_otsu(data.coins()) == 107
开发者ID:amueller,项目名称:scikit-image,代码行数:2,代码来源:test_thresholding.py

示例5: test_otsu_negative_int

 def test_otsu_negative_int(self):
     image = self.image - 2
     assert threshold_otsu(image) == 0
开发者ID:amueller,项目名称:scikit-image,代码行数:3,代码来源:test_thresholding.py

示例6: test_otsu_float_image

 def test_otsu_float_image(self):
     image = np.float64(self.image)
     assert 2 <= threshold_otsu(image) < 3
开发者ID:amueller,项目名称:scikit-image,代码行数:3,代码来源:test_thresholding.py

示例7: test_otsu

 def test_otsu(self):
     assert threshold_otsu(self.image) == 2
开发者ID:amueller,项目名称:scikit-image,代码行数:2,代码来源:test_thresholding.py

示例8: test_otsu_camera_image

def test_otsu_camera_image():
    camera = skimage.img_as_ubyte(data.camera())
    assert 86 < threshold_otsu(camera) < 88
开发者ID:alfonsodiecko,项目名称:PYTHON_DIST,代码行数:3,代码来源:test_thresholding.py

示例9: test_otsu_lena_image

def test_otsu_lena_image():
    lena = skimage.img_as_ubyte(data.lena())
    assert 140 < threshold_otsu(lena) < 142
开发者ID:alfonsodiecko,项目名称:PYTHON_DIST,代码行数:3,代码来源:test_thresholding.py

示例10: test_otsu_coins_image

def test_otsu_coins_image():
    coins = skimage.img_as_ubyte(data.coins())
    assert 106 < threshold_otsu(coins) < 108
开发者ID:alfonsodiecko,项目名称:PYTHON_DIST,代码行数:3,代码来源:test_thresholding.py

示例11: test_otsu_astro_image

def test_otsu_astro_image():
    img = skimage.img_as_ubyte(data.astronaut())
    assert 109 < threshold_otsu(img) < 111
开发者ID:ramosapf,项目名称:scikit-image,代码行数:3,代码来源:test_thresholding.py


注:本文中的skimage.filter.thresholding.threshold_otsu函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。