Electronic Science and Technology ›› 2021, Vol. 34 ›› Issue (5): 13-17.doi: 10.16180/j.cnki.issn1007-7820.2021.05.003

Previous Articles     Next Articles

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)


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

CLC Number: 

  • TP391