基于SLIC与分水岭算法的彩色图像分割

侯志强, 赵梦琦, 余旺盛, 等. 基于SLIC与分水岭算法的彩色图像分割[J]. 光电工程, 2019, 46(6): 180589. doi: 10.12086/oee.2019.180589
引用本文: 侯志强, 赵梦琦, 余旺盛, 等. 基于SLIC与分水岭算法的彩色图像分割[J]. 光电工程, 2019, 46(6): 180589. doi: 10.12086/oee.2019.180589
Hou Zhiqiang, Zhao Mengqi, Yu Wangsheng, et al. Color image segmentation based on SLIC and watershed algorithm[J]. Opto-Electronic Engineering, 2019, 46(6): 180589. doi: 10.12086/oee.2019.180589
Citation: Hou Zhiqiang, Zhao Mengqi, Yu Wangsheng, et al. Color image segmentation based on SLIC and watershed algorithm[J]. Opto-Electronic Engineering, 2019, 46(6): 180589. doi: 10.12086/oee.2019.180589

基于SLIC与分水岭算法的彩色图像分割

  • 基金项目:
    国家自然科学基金资助项目(61473309,61703423)
详细信息
    作者简介:
    通讯作者: 赵梦琦(1995-),女,硕士研究生,主要从事计算机视觉、图像分割的研究。E-mail:meq_zhao@163.com
  • 中图分类号: TP391.41

Color image segmentation based on SLIC and watershed algorithm

  • Fund Project: Supported by National Natural Science Foundation of China (61473309, 61703423)
More Information
  • 为了克服传统分水岭算法引起的过分割问题,提出了一种基于简单线性迭代聚类(SLIC)与分水岭算法相结合的彩色图像分割算法,以获得更理想的分割效果。该算法首先利用图像复杂度计算预分割的超像素个数,并利用SLIC对原始图像进行超像素分割预处理,以减少后续处理中的冗余信息;然后,提出了一种自适应计算阈值的方法对预处理图像的梯度图像进行阈值处理,以有效去除噪声,获得较完整的轮廓信息;最后,利用分水岭分割算法对进行极小值标记提取后的图像进行分割。通过对大量图片进行实验表明,本文算法可以有效地抑制传统分水岭算法所产生的过分割问题,在LCE和GCE的对比上优于传统算法,分割质量有所提高。

  • Overview: Image segmentation is the first step in image processing, and plays an important role in image subsequent processing. The quality of feature extraction, target recognition and target detection all depend on the effect of image segmentation. Image segmentation has become a research hotspot and difficulty due to the changes of illumination and scale, the effects of noise and the problems of image itself. At present, image segmentation algorithms mainly include region-based segmentation algorithm, edge-based segmentation algorithm, threshold-based segmentation algorithm, and clustering-based segmentation algorithm. The watershed segmentation algorithm is a typical algorithm based on region segmentation. It has the characteristics of simple implementation, good performance and strong contour extraction ability, but the image over-segmentation problem is more serious. The SLIC algorithm is a super-pixel segmentation algorithm based on gradient rise. It has a faster processing speed, and the super-pixel block can fit the boundary of the target well, and can obtain super-pixel blocks with the same shape and size, but cannot segment the target area, which increases the difficulty for subsequent processing. In order to solve the over-segmentation problem caused by the traditional watershed segmentation algorithm and other existing algorithms(large data processing capacity and low operation efficiency), as well as the problem that the SLIC cannot segment the target region, an image segmentation algorithm based on SLIC algorithm and watershed algorithm is proposed. Firstly, a method of calculating the number of super pixels in the SLIC algorithm is proposed, which used the image complexity and image size to calculate the number of super-pixels pre-segmented, and then used the SLIC segmentation method to pre-process the original image for super-pixel segmentation to reduce redundant information in subsequent processing; Then, a method of adaptively calculating the threshold using mean and variance was proposed to perform threshold processing on the gradient image of the image to effectively remove noise and obtain more complete contour information. Finally, the image was extracted from the minimum value mark to obtain the marked image, and the image was segmented by the watershed segmentation algorithm to obtain the final segmentation image. The algorithm can effectively solve the over-segmentation problem generated by the traditional watershed algorithm. Through the statistical analysis experiment of 500 images in the Berkeley database, and the real local consistency error rate and global consistency error of 100 images and the ground truth are calculated. The fractional rate is eventually found to be better than the traditional algorithms and other marking algorithms, and the ideal segmentation effect is obtained.

  • 加载中
  • 图 1  模拟降水模型

    Figure 1.  Simulated precipitation model

    图 2  模拟泛洪模型

    Figure 2.  Simulated flooding model

    图 3  本文方法在不同K值下的分割结果比较。(a0),(b0)原始图像;(a1) K=100;(a2) K=320;(a3) K=255;(b1) K=5;(b2) K=120;(b3) K=53

    Figure 3.  Comparison of segmentation results of the method with different K value.(a0), (b0) Original image; (a1) K=100; (a2) K=320;(a3) K=255;(b1) K=5;(b2) K=120;(b3) K=53

    图 4  权重系数n对图像分割的影响。(a0),(b0)原始图像;(a1),(b1)人工标注;(a2),(b2) n=3;(a3),(b3) n=4;(a4),(b4) n=5

    Figure 4.  Effect of threshold on image segmentation.(a0), (b0) Original image; (a1), (b1) Manual labeling; (a2), (b2) n=3; (a3), (b3) n=4; (a4), (b4) n=5

    图 5  算法流程图

    Figure 5.  Algorithm flowchart

    图 6  分割实验结果比较。(a0)~(d0)原始图像;(a1)~(d1)未使用SLIC预处理分割的分水岭分割算法结果;(a2)~(d2)文献[1]算法分割结果;(a3)~(d3)文献[3]算法分割结果;(a4)~(d4)本文算法分割结果;(a5)~(d5) Berkeley图像数据库提供的人工标注分割结果

    Figure 6.  Comparison of segmentation experimental results.(a0)~(d0) Original image; (a1)~(d1) Watershed segmentation algorithm results without SLIC preprocessing segmentation; (a2)~(d2) Ref.[1] algorithm segmentation results; (a3)~(d3) Ref.[3] algorithm segmentation results; (a4)~(d4) Algorithm segmentation results; (a5)~(d5) Berkeley image manual annotation segmentation results provided by the database

    图 7  分割算法评价指数

    Figure 7.  Evaluation index of segmentation algorithms

    图 8  分割算法平均评价指数

    Figure 8.  Average evaluation index of segmentation algorithms

    表 1  不同K值下的分割结果的LCE和GCE比较

    Table 1.  Comparison of segmentation results LCE and GCE under different K values

    (a1) K=100 (a2) K=320 (a3) K=255 (b1) K=5 (b2) K=120 (b3) K=53
    LCE/% 11.38 11.45 10.84 18.81 18.65 17.37
    GCE/% 13.45 13.10 12.75 22.60 22.15 20.61
    下载: 导出CSV

    表 2  不同权重系数n下图像的LCE和GCE比较

    Table 2.  Comparison of LCE and GCE of images with different weight coefficients n

    图片 n=3 n=4 n=5
    LCE/% GCE/% LCE/% GCE/% LCE/% GCE/%
    图 4(a0) 10.80 13.62 10.00 13.30 10.30 13.70
    图 4(b0) 13.14 15.52 12.83 14.85 13.72 15.90
    下载: 导出CSV

    表 3  LCE和GCE比较

    Table 3.  Comparison of LCE and GCE

    图片 N-SLIC H-minima M-Watershed Ours
    LCE/% GCE/% LCE/% GCE/% LCE/% GCE/% LCE/% GCE/%
    6(a0) 10.89 13.65 10.43 13.50 10.10 13.50 10.00 13.30
    6(b0) 8.54 9.79 8.42 9.76 8.16 9.71 7.68 9.72
    6(c0) 11.88 14.09 11.70 13.87 11.02 13.99 10.80 13.62
    6(d0) 12.65 13.73 12.10 14.06 12.04 14.28 11.85 14.28
    下载: 导出CSV
  • [1]

    高丽, 杨树元, 夏杰, 等.基于标记的watershed图像分割新算法[J].电子学报, 2006, 34(11): 2018-2023. doi: 10.3321/j.issn:0372-2112.2006.11.019

    Gao L, Yang S Y, Xia J, et al. A new marker-based watershed algorithm[J]. Acta Electronica Sinica, 2006, 34(11): 2018-2023. doi: 10.3321/j.issn:0372-2112.2006.11.019

    [2]

    卢中宁, 强赞霞.基于梯度修正和区域合并的分水岭分割算法[J].计算机工程与设计, 2009, 30(8): 2075-2077. http://d.old.wanfangdata.com.cn/Periodical/jsjgcysj200908073

    Lu Z N, Qiang Z X. Watershed segmentation based on gradient modification and region merging[J]. Computer Engineering and Design, 2009, 30(8): 2075-2077. http://d.old.wanfangdata.com.cn/Periodical/jsjgcysj200908073

    [3]

    余旺盛, 侯志强, 宋建军.基于标记分水岭和区域合并的彩色图像分割[J].电子学报, 2011, 39(5): 1007-1012. http://d.old.wanfangdata.com.cn/Periodical/dianzixb201105005

    Yu W S, Hou Z Q, Song J J. Color image segmentation based on marked-watershed and region-merger[J]. Acta Electronica Sinica, 2011, 39(5): 1007-1012. http://d.old.wanfangdata.com.cn/Periodical/dianzixb201105005

    [4]

    Achanta R, Shaji A, Smith K, et al. SLIC superpixels compared to state-of-the-art superpixel methods[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2012, 34(11): 2274-2282. doi: 10.1109/TPAMI.2012.120

    [5]

    Ren X F, Malik J. Learning a classification model for segmentation[C]//Proceedings of the Ninth IEEE International Conference on Computer Vision, 2003: 10.

    [6]

    Shi J B, Malik J. Normalized cuts and image segmentation[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2000, 22(8): 888-905. doi: 10.1109/34.868688

    [7]

    Felzenszwalb P F, Huttenlocher D P. Efficient graph-based image segmentation[J]. International Journal of Computer Vision, 2004, 59(2): 167-181. doi: 10.1023/B:VISI.0000022288.19776.77

    [8]

    Levinshtein A, Stere A, Kutulakos K N, et al. Turbopixels: fast superpixels using geometric flows[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2009, 31(12): 2290-2297. doi: 10.1109/TPAMI.2009.96

    [9]

    赵宏伟, 何劲松.基于贝叶斯框架融合深度信息的显著性检测[J].光电工程, 2018, 45(2): 170341. doi: 10.12086/oee.2018.170341

    Zhao H W, He J S. Saliency detection method fused depth information based on Bayesian framework[J]. Opto-Electronic Engineering, 2018, 45(2): 170341. doi: 10.12086/oee.2018.170341

    [10]

    李旭旭, 李新阳, 王彩霞.哈特曼传感器子孔径光斑的局部自适应阈值分割方法[J].光电工程, 2018, 45(10): 170699. doi: 10.12086/oee.2018.170699

    Li X X, Li X Y, Wang C X. Local adaptive threshold segmentation method for subapture spots of Shack-Hartmann sensor[J]. Opto-Electronic Engineering, 2018, 45(10): 170699. doi: 10.12086/oee.2018.170699

    [11]

    刘辉, 石小龙.结合显著性和超像素改进的GrabCut图像分割[J].红外技术, 2018, 40(1): 55-61. http://d.old.wanfangdata.com.cn/Periodical/hwjs201801010

    Liu H, Shi X L. Improved GrabCut segmentation based on salience and superpixels[J]. Infrared Technology, 2018, 40(1): 55-61. http://d.old.wanfangdata.com.cn/Periodical/hwjs201801010

    [12]

    冈萨雷斯, 伍兹.数字图像处理[M]. 3版.北京:电子工业出版社, 2010.

    Gonzalez R C, Woods R E. Digital Image Processing[M]. 3rd ed. Beijing: Publishing House of Electronics Industry, 2010.

    [13]

    Digabel H, Lantuéjoul C. Iterative algorithms[C]//Proc. 2nd European Symp. Quantitative Analysis of Microstructures in Material Science, Biology and Medicine. Riederer Verlag, 1978, 19(7): 8.

    [14]

    Beucher S, Lantuéjoul C. Use of Watersheds in Contour Detection[C]//International workshop on image processing, real-time edge and motion detection. 1979: 391-396.

    [15]

    冀甜甜, 崔嘉, 董新锋, 等.结合分水岭的纹理梯度各向异性图像分割[J].中国图象图形学报, 2017, 22(7): 926-934. http://d.old.wanfangdata.com.cn/Periodical/zgtxtxxb-a201707007

    Ji T T, Cui J, Dong X F, et al. Image segmentation by combining the watershed algorithm and anisotropic texture gradients[J]. Journal of Image and Graphics, 2017, 22(7): 926-934. http://d.old.wanfangdata.com.cn/Periodical/zgtxtxxb-a201707007

    [16]

    沈夏炯, 吴晓洋, 韩道军.分水岭分割算法研究综述[J].计算机工程, 2015, 41(10): 26-30. http://d.old.wanfangdata.com.cn/Periodical/jsjgc201510006

    Shen X J, Wu X Y, Han D J. Survey of research on watershed segmentation algorithms[J]. Computer Engineering, 2015, 41(10): 26-30. http://d.old.wanfangdata.com.cn/Periodical/jsjgc201510006

    [17]

    Bai M, Urtasun R. Deep watershed transform for instance segmentation[C]//Proceedings of 2017 IEEE Conference on Computer Vision and Pattern Recognition, 2017: 2858-2866.

    [18]

    张学文.组成论[M].合肥:中国科学技术大学出版社, 2003.

    Zhang X W. The Constitution Theory[M]. Hefei: China University of Science and Technology Press, 2003.

    [19]

    吴一全, 张金矿.二维直方图θ划分最大Shannon熵图像阈值分割[J].物理学报, 2010, 59(8): 5487-5495. http://d.old.wanfangdata.com.cn/Periodical/wlxb201008052

    Wu Y Q, Zhang J K. Image thresholding based on θ-division of 2-D histogram and maximum Shannon entropy[J]. Acta Physica Sinica, 2010, 59(8): 5487-5495. http://d.old.wanfangdata.com.cn/Periodical/wlxb201008052

    [20]

    Haralick R M, Shanmugam K, Dinstein I. Textural features for image classification[J]. IEEE Transactions on Systems, Man, and Cybernetics, 1973, SMC-3(6): 610-621. doi: 10.1109/TSMC.1973.4309314

    [21]

    王崴, 王晓军, 刘晓卫, 等.基于图像复杂度的图像分割算法[J].探测与控制学报, 2015, 37(3): 5-9. http://www.cnki.com.cn/Article/CJFDTOTAL-XDYX201503002.htm

    Wang W, Wang X J, Liu X W, et al. Image segmentation algorithm based on image complexity[J]. Journal of Detection & Control, 2015, 37(3): 5-9. http://www.cnki.com.cn/Article/CJFDTOTAL-XDYX201503002.htm

    [22]

    Martin D, Fowlkes C, Tal D, et al. A database of human segmented natural images and its application to evaluating segmentation algorithms and measuring ecological statistics[C]//Proceedings of the 8th IEEE International Conference on Computer Vision, 2001.

    [23]

    王小鹏, 郝重阳, 樊养余, 等.一种提取图象细节边缘的新方法[J].中国图象图形学报, 2003, 8(11): 1286-1290. http://d.old.wanfangdata.com.cn/Periodical/zgtxtxxb-a200311010

    Wang X P, Hao C Y, Fan Y Y, et al. New method for image detail edge extraction[J]. Journal of Image and Graphics, 2003, 8(11): 1286-1290. http://d.old.wanfangdata.com.cn/Periodical/zgtxtxxb-a200311010

    [24]

    Hodneland E, Tai X C, Kalisch H. PDE based algorithms for smooth watersheds[J]. IEEE Transactions on Medical Imaging, 2016, 35(4): 957-966. doi: 10.1109/TMI.42

    [25]

    Kavzoglu T, Tonbul H. A Comparative study of segmentation quality for multi-resolution segmentation and watershed transform[C]//Proceedings of IEEE 8th International Conference on Recent Advances in Space Technologies, 2017.

    [26]

    王勋, 查宇飞, 毕笃彦. 基于多分辨率分析和分水岭的图像分割方法[J]. 光电工程, 2007, 34(6): 72–76. http://d.old.wanfangdata.com.cn/OAPaper/oai_doaj-articles_a73ba1cff6e528dc4d4e7b6b749ecb87

    Wang X, Zha Y F, Bi D Y. Image segmentation based on multi-resolution analysis and watershed algorithm[J]. Opto-Electronic Engineering, 2007, 34(6): 72-76. http://d.old.wanfangdata.com.cn/OAPaper/oai_doaj-articles_a73ba1cff6e528dc4d4e7b6b749ecb87

  • 加载中

(8)

(3)

计量
  • 文章访问数:  8282
  • PDF下载数:  2637
  • 施引文献:  0
出版历程
收稿日期:  2018-11-14
修回日期:  2019-01-13
刊出日期:  2019-06-25

目录

/

返回文章
返回