| As one of the main economic crops in Hunan Province,citrus needs to be tested and sorted for its external fruit shape quality before entering the market.According to the different grades of citrus fruit shape,high-quality citrus will be sold to the fresh fruit market,Unqualified citrus are sold to canning or juice processing plants,thus increasing the economic benefits of citrus in the market.At present,manual sorting or simple mechanical control is generally used for the detection of citrus fruit shape,and there are some problems such as low detection accuracy and low degree of automation.Therefore,this study built a citrus fruit shape online detection and sorting control system based on machine vision technology and PLC control technology.The multi-station visual detection module,fruit conveying module and automatic control module were designed to analyze the error of multi-station image.Image preprocessing and Hu moment algorithm were used to identify the posture of citrus and calculate the fruit shape characteristics.Then combined with the sorting control algorithm,the citrus online measurement and sorting,stability test and dynamic sorting test,verified the rapidity,stability,and accuracy of the measurement and control system.The specific contents are as follows:(1)An online detection and sorting control system for citrus fruit shape was built,and the design and selection of the conveying module,visual detection module,automatic control module and communication module in the measurement and control system were completed.Five inspection stations were set up in the visual inspection area,which increased the probability that the monocular camera captures dynamic citrus fruit stems.The industrial camera adopted the mode of external trigger photography,which improved the stability of the dynamic capture of citrus images by the measurement and control system.(2)The radius error and shape error of the multi-position image obtained by the monocular camera were analyzed.The results showed that the radius error is within 1.8%,and the shape error range was 2.71%-3.69%.The visual detection module used the zero-order moment and first-order moment algorithm of Hu moment to calculate the centroid of citrus stem contour and shape contour after Gaussian filter noise reduction,image grayscale and binarization processing on the obtained original color image.Determined the positional relationship between the two in the two-dimensional coordinate system,selected the fruit posture with the citrus fruit stem facing up and satisfy the plane positional relationship,and calculated the circularity and fruit diameter characteristics of the citrus.(3)An embedded fruit shape measurement and control software was developed,which realized the functions of automatic measurement and control of citrus fruit shape and human-computer interaction.Among them,the number of pulse signals generated by the photoelectric sensor blocked by the fixed bracket at the lower end of the fruit cup was counted.Combined with the citrus shape online processing system,the fruit shape characteristic information of the same citrus at different stations was summarized to the citrus.In addition,a chain separation control system was designed for single point detection and multi-point control.According to the citrus fruit shape detection test at different speeds,combined with the one-way ANOVA in SPSS software,the results showed that there was no significant difference between the results of fruit shape detection and manual sorting(P>0.05),indicated that the system has better stability in detecting fruit shape at different speeds.(4)The characteristics of citrus fruit shape were comprehensively detected by the online measurement and control system.The average error range of citrus roundness at different transport speeds was 0.0031-0.0070,and the maximum deviation range was 0.07%-1.71%.The average error range of the fruit diameter detected by the system was 0.42 mm-0.56 mm,and the maximum deviation variation range was 0.067%-2.27%.According to the comprehensive sorting test of citrus fruit shape,the classification equipment has the highest production efficiency at the detection speed of 8 citrus per second.The average time of single citrus detection and sorting was about 127 ms,and the correct sorting rate of citrus fruit shape was 93.00%,which realized the requirements of rapid,stable and accurate online detection and sorting.The online detection and sorting system designed for citrus fruit shape characteristics in this study not only improves the efficiency of citrus post-harvest processing,but also provides technical reference for the sorting of other fruits. |