电子科技 ›› 2021, Vol. 34 ›› Issue (5): 13-17.doi: 10.16180/j.cnki.issn1007-7820.2021.05.003

• • 上一篇    下一篇

基于H-S直方图的苹果着色率检测算法研究

杨凌霄,王振营,刘群坡,王高伟,杨彦超   

  1. 河南理工大学 电气工程与自动化学院,河南 焦作454000
  • 收稿日期:2020-01-31 出版日期:2021-05-15 发布日期:2021-05-24
  • 作者简介:杨凌霄(1964-),女,教授。研究方向:信息处理与智能控制。|王振营(1992-),男,硕士研究生。研究方向:图像处理。
  • 基金资助:
    国家重点研发计划专项(2016YFC0600906);河南省高校科技创新团队(20IRTSTHN019);河南省创新型科技人才队伍建设工程(CXTD2016054);河南理工大学博士基金(722103/001/070)

Study of Apple Coloration Detection Algorithm Based on H-S Histogram

YANG Lingxiao,WANG Zhenying,LIU Qunpo,WANG Gaowei,YANG Yanchao   

  1. School of Electrical Engineering and Automation,Henan Polytechnic University,Jiaozuo 454003,China
  • Received:2020-01-31 Online:2021-05-15 Published:2021-05-24
  • Supported by:
    National Key Research and Development Program(2016YFC0600906);Henan University Science and Technology Innovation Team(20IRTSTHN019);Construction Project of Innovative Scientific and Technological Talents in Henan Province(CXTD2016054);Doctor Foundation of Henan University of Technology(722103/001/070)

摘要:

针对用机器视觉的方法检测苹果着色率时检测结果容易受图片亮度影响的问题,文中提出了一种基于H-S直方图的苹果表皮着色率检测算法。该算法用红绿黄3种不同颜色的少量样本图片生成不同的H-S直方图。检测着色率时,提取图像中每个像素的色度值与饱和度值,用H-S直方图分析苹果表面红色区域所占的比例得出苹果表面的着色率。试验结果显示,该方法可以有效地检测出苹果表面的着色率,得到的检测结果与人眼观测的结果基本一致,平均误差小于8.3%,且检测结果不易受图片亮度的影响。

关键词: 机器视觉, HSV, RGB, 色度, 饱和度, 颜色空间转换, H-S直方图, 色泽检测

Abstract:

In order to solve the problem that the detection result of apple color by machine vision is easily affected by the brightness of the picture, an algorithm of apple skin color rate detection based on H-S histogram is proposed in this study. The algorithm use a small number of samples of red, green and yellow colors to generate different H-S histograms. When detecting the coloring rate, the hue value and saturation value of each pixel in the image are extracted, and the H-S histogram is used to analyze the proportion of the red area on the surface of the apple to obtain the coloring rate of the apple surface. The test results prove that this method can effectively detect the coloring rate of the apple surface. The detection results obtained are basically consistent with those observed by human eyes. The average error is less than 8.3%, and the detection results are not easily affected by the brightness of the picture.

Key words: machine vision, HSV, RGB, hue, saturation, color space conversion, H-S histogram, color detection

中图分类号: 

  • TP391