摘要
针对彩色胶囊图像的特点,结合RGB颜色空间数据易处理和HSV颜色空间色差感知均匀的优点,提出一种异囊缺陷检测方法,其中异囊是指某种颜色的胶囊中混有的其它颜色胶囊。该方法是基于RGB颜色空间的图像分割和基于HSV颜色空间的色差公式计算。将基于Y方向的Scharr算子应用于R分量图像,寻找胶囊上下两节之间的分隔线,将R、G、B各分量图像分割成两部分;基于图像直方图,采用加权平均的方法来获取R、G、B分量值,并将R、G、B分量值转成H、S、V分量值;利用加权方式的HSV色差公式计算色差,与设定阈值比较得出检测结果。测试结果表明,该方法保证了较高的检测精度,节省了常规基于HSV检测的方法中整体图像颜色空间转换的时间消耗。
Aiming at the characteristics of the color images of capsules, combining the advantages of processing data easily in the RGB color space and the uniformity of color difference perception in the HSV color space, a detection method of Yinang defect was proposed. Yinang is the capsule whose color is different from others. In this method, the image segmentation was based on the RGB color space and the computation of color difference was based on the HSV color space. Firstly, the vertical Scharr operator was applied to get the segmented edge in the R value image, and R, G, B value images were split into two parts respectively. Secondly, the values of R, G, B were obtained by using a method of weighted average based on the histogram, and were transformed into the values of H, S, V. At last, the color difference was counted using the weighted HSV color difference formula, and was compared with the set threshold. Online test results show that the proposed method has high accuracy and saves the time on transforming color space for the whole image using the usual color recognition method based on the HSV.
出处
《计算机工程与设计》
CSCD
北大核心
2014年第11期3888-3892,共5页
Computer Engineering and Design
基金
湖北省优秀中青年创新团队基金项目(T200801)
湖北省教育厅重点基金项目(D20091103)