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


Python selem.square函数代码示例

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


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

示例1: test_binary_opening

def test_binary_opening():
    strel = selem.square(3)
    binary_res = binary.binary_opening(bw_img, strel)
    grey_res = img_as_bool(grey.opening(bw_img, strel))
    testing.assert_array_equal(binary_res, grey_res)
开发者ID:AbdealiJK,项目名称:scikit-image,代码行数:5,代码来源:test_binary.py

示例2: setUp

 def setUp(self):
     self.black_pixel = 255 * np.ones((4, 4), dtype=np.uint8)
     self.black_pixel[1, 1] = 0
     self.white_pixel = 255 - self.black_pixel
     self.selems = [selem.square(2), selem.rectangle(2, 2),
                    selem.rectangle(2, 1), selem.rectangle(1, 2)]
开发者ID:AbdealiJK,项目名称:scikit-image,代码行数:6,代码来源:test_grey.py

示例3: test_binary_dilation

def test_binary_dilation():
    strel = selem.square(3)
    binary_res = binary.binary_dilation(bw_lena, strel)
    grey_res = img_as_bool(grey.dilation(bw_lena, strel))
    testing.assert_array_equal(binary_res, grey_res)
开发者ID:Rapternmn,项目名称:scikit-image,代码行数:5,代码来源:test_binary.py

示例4: test_non_square_image

def test_non_square_image():
    strel = selem.square(3)
    binary_res = binary.binary_erosion(bw_img[:100, :200], strel)
    grey_res = img_as_bool(grey.erosion(bw_img[:100, :200], strel))
    testing.assert_array_equal(binary_res, grey_res)
开发者ID:AbdealiJK,项目名称:scikit-image,代码行数:5,代码来源:test_binary.py

示例5: test_square_selem

 def test_square_selem(self):
     for k in range(0, 5):
         actual_mask = selem.square(k)
         expected_mask = np.ones((k, k), dtype="uint8")
         assert_equal(expected_mask, actual_mask)
开发者ID:NelleV,项目名称:scikits.image,代码行数:5,代码来源:test_selem.py

示例6: test_square_selem

 def test_square_selem(self):
     """Test square structuring elements"""
     for k in range(0, 5):
         actual_mask = selem.square(k)
         expected_mask = np.ones((k, k), dtype='uint8')
         assert_equal(expected_mask, actual_mask)
开发者ID:Cadair,项目名称:scikit-image,代码行数:6,代码来源:test_selem.py

示例7: test_binary_opening

def test_binary_opening():
    strel = selem.square(3)
    binary_res = binary.binary_opening(bw_img, strel)
    with expected_warnings(['precision loss']):
        grey_res = img_as_bool(grey.opening(bw_img, strel))
    testing.assert_array_equal(binary_res, grey_res)
开发者ID:haohao200609,项目名称:Hybrid,代码行数:6,代码来源:test_binary.py

示例8: test_non_square_image

def test_non_square_image():
    strel = selem.square(3)
    binary_res = binary.binary_erosion(bw_img[:100, :200], strel)
    with expected_warnings(['precision loss']):
        grey_res = img_as_bool(grey.erosion(bw_img[:100, :200], strel))
    testing.assert_array_equal(binary_res, grey_res)
开发者ID:haohao200609,项目名称:Hybrid,代码行数:6,代码来源:test_binary.py

示例9: test_binary_opening

def test_binary_opening():
    strel = selem.square(3)
    binary_res = binary.binary_opening(bw_lena, strel)
    grey_res = grey.opening(bw_lena, strel)
    testing.assert_array_equal(binary_res, grey_res)
开发者ID:GerardoLopez,项目名称:scikits-image,代码行数:5,代码来源:test_grey.py


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