渔业现代化杂志

• 论文 • 上一篇    下一篇

基于改进K-means聚类算法的金鱼阴影去除及图像分割方法

  

  1. (中国水产科学研究院渔业机械仪器研究所,上海 200092)
  • 出版日期:2019-04-20 发布日期:2019-06-05
  • 通讯作者: 刘世晶(1982—),男,助理研究员,硕士,研究方向:图像处理、模式识别和机器视觉。E-mail:liushijing@fmiri.ac.cn
  • 作者简介:王帅(1989—),男,研究实习员,硕士,研究方向:图像处理、模式识别和渔业信息化。 Email:wangshuai@fmiri.ac.cn
  • 基金资助:
    中国水产科学研究院基本科研业务费专项课题(2016ZD1401);中国水产科学研究院渔业机械仪器研究所基本科研业务费专项课题(2017YJS005);国家重点研发计划(2017YFD0701700)

Goldfish shadow removal and image segmentation based on improved K-means clustering algorithm

  1. (Fishery Machinery and Instrument Research Institute, Chinese Academy of Fishery Sciences, Shanghai 200092, China)
  • Online:2019-04-20 Published:2019-06-05

摘要: 针对鱼类行为量化过程中运动阴影区域去除难的问题,以金鱼为研究对象,分别从去除噪点及孤立数据点、使用马氏距离作为距离度量方法、明确聚类个数以及初始聚类中心点选择等方面对传统K-means聚类算法进行了优化,提出了一种基于改进k-means聚类算法的金鱼阴影去除及图像分割方法。在室内正常环境下,使用相机采集玻璃鱼缸中金鱼图像,首先等比例压缩10倍,使用中值滤波方法对样本图像进行预处理,然后将其从RGB颜色空间转换到Lab颜色空间,最后提取a、b分量并使用改进的K-means算法进行聚类。试验结果表明,和传统K-means聚类算法及FCM(Fuzzy c-means)聚类算法进行比较,改进算法对于图像阴影去除及分割具有更好的效果,在200幅具有不同阴影的金鱼样本图像中,基于改进k-means聚类算法的平均误分类的像素比率和平均运行时间分别为2.48%和0.875s,能够满足离线鱼类行为量化过程中图像预处理的要求。

关键词: 金鱼, 运动阴影去除, 改进k-means, Lab颜色空间, 图像分割

Abstract: Aiming at the difficulty in removing motion shadow regions in the process of fish behavior quantification, with goldfish as research object, the method of goldfish shadow removal and image segmentation based on improved K-means clustering algorithm is proposed to optimize traditional K-means clustering algorithm in such aspects as removing noisy points and isolated data points, using mahalanobis distance as distance measurement method, defining the number of clustering and choosing the initial clustering center. In the normal indoor environment, the camera is used to collect the images of goldfish in the glass fish tank. First, after 10 times of uniform compression, we use the median filtering method to preprocess the sample images, and then the sample images are converted from RGB color space to Lab color space. Finally, the components a and b are extracted and the improved K-means algorithm is used for clustering. The test results show that compared with the traditional K-means clustering algorithm and FCM (Fuzzy c-means) clustering algorithm, the improved algorithm has better effect on image shadow removal and segmentation. The average misclassification pixel ratio and the average running time based on improved K-means clustering algorithm are 2.48% and 0.875s respectively in 200 goldfish sample images with different shadows, which can satisfy the requirement of image preprocessing in the process of off-line fish behavior quantification.

Key words: Goldfish, motion shadow removal, improved K-means, Lab color space, image segmentation