博客
关于我
图像处理:斑点检测和连接的组件
阅读量:335 次
发布时间:2019-03-04

本文共 2538 字,大约阅读时间需要 8 分钟。

?????????????????

????????????????????????????????????????????????????????????????

????

?????????????????????????????????????????????????????????????????????????????????????????

???????

  • ???????????????????????????
  • ???????????????????????????
  • ???????????????????????????
  • ??????????????????????????????????????

???????

????????????????????

  • Laplacian of Gaussian (LoG)?????????????????????????????
  • Difference of Gaussian (DoG)?????????????????????
  • Hessian Laplace (DoH)???Hessian??????????????????
  • ?Python??????scikit-image????????????????????

    from skimage.io import imreadfrom skimage.color import rgb2grayfrom skimage.feature import blob_dog, blob_log, blob_dohimport matplotlib.pyplot as pltimport numpy as np# ????????????im_bw = rgb2gray(imread('your_image.png'))# LoG??blobs_log = blob_log(im_bw, max_sigma=30, num_sigma=10, threshold=0.1)blobs_log[:, 2] = blobs_log[:, 2] * np.sqrt(2)  # ???# DoG??blobs_dog = blob_dog(im_bw, max_sigma=30, threshold=0.1)blobs_dog[:, 2] = blobs_dog[:, 2] * np.sqrt(2)# DoH??blobs_doh = blob_doh(im_bw, max_sigma=30, threshold=0.01)# ??????plt.figure(figsize=(9, 3))for blob in [blobs_log, blobs_dog, blobs_doh]:    y, x, r = blob    plt.imshow(im_bw, interpolation='nearest')    plt.circle((x, y), r, color='yellow', linewidth=2, fill=False)plt.tight_layout()plt.show()

    ???????

    ??????????????????????????????????????????????????????????????????????????

    ????

    ?????????????????????????????????????????????????????????

    from skimage import dataimport numpy as npdef multi_dilation(im, num):    for _ in range(num):        im = np.dilation(im, np.ones((3, 3)))    return imdef multi_erosion(im, num):    for _ in range(num):        im = np.erosion(im, np.ones((3, 3)))    return im# ????im_bw = data.hawksbury()  # ????im_cleaned = multi_erosion(multi_dilation(im_bw, 5), 5)plt.imshow(im_cleaned)plt.show()

    ???????

    ??skimage??label?region_properties?????????????????????

    from skimage import dataimport numpy as npfrom skimage.segmentation import regionprops# ????im_bw = data.hawksbury()label_im = data.blobs(im_bw)plt.imshow(label_im, alpha=0.5)plt.show()# ??????props = regionprops(label_im)print(props[0].area)  # ??????????

    ????

    ??regionprops??????????

    • ????????
    • ??????????
    • ????BBox??????????
    • ??????????
    • ????????????
    • ??????????
    • ?????????????
    • ??????????????????????

    ?????????????????????????

    ??????

    ????????????????????????????

    • ???????????????????????????
    • ????????????????????????
    • ??????????????????????

    ??

    ?????????????????????????????????????????????????????????????????????????????????????????????????

    转载地址:http://eyaq.baihongyu.com/

    你可能感兴趣的文章
    Paystack Android SDK 集成与使用指南
    查看>>
    PC端编辑 但能在PC端模拟移动端预览的富文本编辑器
    查看>>
    Penetration Testing、Security Testing、Automation Testing
    查看>>
    php -- 魔术方法 之 判断属性是否存在或为空:__isset()
    查看>>
    php csv 导出
    查看>>
    php include和require
    查看>>
    php mysql优化方法_MySQL优化常用方法
    查看>>
    PHP OAuth 2.0 Server
    查看>>
    php odbc驱动,php常用ODBC函数集(详细)
    查看>>
    php openssl aes ecb,php openssl_encrypt AES-128-ECB iOS
    查看>>
    php paypal rest api,PayPal REST API指定网络配置文件PHP
    查看>>
    PHP pcntl_fork不能在web服务器中使用的变通方法
    查看>>
    php private ,public protected三者的区别
    查看>>
    php PSR规范
    查看>>
    php rand() 重复,array_rand()函数从另外一个数组中随机取得的一定数量的数组的元素是否会重复?...
    查看>>
    php redis(2)
    查看>>
    PHP Redis分布式锁
    查看>>
    PHP SOAP模块的使用方法:NON-WSDL模式
    查看>>
    PHP SPL标准库-迭代器
    查看>>
    PHP Static延迟静态绑定
    查看>>