Next Article in Journal
Consequences of Ignoring Dependent Error Components and Heterogeneity in a Stochastic Frontier Model: An Application to Rice Producers in Northern Thailand
Previous Article in Journal
Biostimulatory Response of Easily Extractable Glomalin-Related Soil Protein on Soil Fertility Mediated Changes in Fruit Quality of Citrus
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Design and Experiment of a Garlic Orientation and Orderly Conveying Device Based on Machine Vision

1
Faculty of Mechanical Engineering and Automation, Zhejiang Sci-Tech University, Hangzhou 310018, China
2
Key Laboratory of Transplanting Equipment and Technology of Zhejiang Province, Hangzhou 310018, China
*
Author to whom correspondence should be addressed.
Agriculture 2022, 12(8), 1077; https://doi.org/10.3390/agriculture12081077
Submission received: 21 June 2022 / Revised: 17 July 2022 / Accepted: 19 July 2022 / Published: 22 July 2022
(This article belongs to the Section Agricultural Technology)

Abstract

:
Aiming at the problem that the existing garlic-root-cutting equipment requires the orientation and orderly conveying of garlic, a garlic orientation and orderly conveying method based on machine vision and mechanical orientation mechanisms was proposed and a garlic orientation and orderly conveying device was designed. To realize garlic posture recognition, garlic and garlic roots were used as detection objects, the YOLOv5s objection detection model was used to establish a garlic feature detection model, and the model was trained. The garlic orientation and orderly conveying device was developed and a garlic posture recognition test and garlic orientation and orderly conveying test were completed. The test results show that the success rate of posture recognition is 98.67% and the average accuracy rate of the garlic deviation angle is 99.11%. When the conveying speed is 95 mm s 1 and the rotating speed is 55 rpm, the orientation success rate is 95.6% and the conveying efficiency reaches 75 garlic per minute, which meets the design requirements. The accuracy of the garlic posture recognition method and the rationality of the garlic orientation and orderly conveying device design are verified, and the automatic orientation and orderly conveying of garlic is realized.

1. Introduction

China is a major garlic producer, consumer, and exporter in the world. In recent years, to improve the overall economic benefits in the garlic industry, the garlic deep processing industry has been vigorously developed [1,2]. Multistep processing, including root cutting, breaking, peeling, cleaning, drying, and packaging, are commonly required when deep processing garlic products [3]. The garlic-root-cutting process is the most time-consuming process. It takes 3–4 s to complete the feeding and root-cutting process of a single garlic. Currently, the correct orientation and orderly feeding of garlic is realized through manual feeding, which is highly labor intensive and inefficient. To reduce labor costs and improve the automation level of garlic-root cutting, there is an urgent need to solve the problems of automatically orienting and feeding garlic in an orderly manner.
To date, many universities and research institutions have carried out research on the garlic-root-cutting mechanization, focusing on solving the technical problems of garlic-root-cutting machinery [4,5,6]. Aiming at the automatic orientation and conveying of garlic-root cutting, the existing equipment adopts a vibration method for feeding [7], which has a poor orientation effect on garlic without stems and requires further manual adjustment. In recent years, with the development of computer technology, the agricultural product orientation method, in which machine vision technology and mechanical mechanisms are combined, has provided new ideas for the orientation of agricultural products with complex shapes and unclear physical characteristics [8,9,10,11]. Shang et al. proposed an automatic orientation system for fructus aurantii based on machine vision, which recognizes the posture of fructus aurantii based on its image and realizes its orientation operation through rotating clamping shafts on both sides [12]. Li et al. proposed an automatic orientation method for corn seeds [13]. Based on machine vision technology, the orientation of the corn seeds was adjusted to an ideal position by an adjustment device according to the recognition results. Hou et al. proposed a garlic bulbil adjustment device based on bilateral image recognition [14]. The garlic seeds were picked by the seed spoon and then arranged horizontally in an orderly manner. Posture recognition was carried out according to the image characteristics of the head and tail of the garlic seeds. Finally, the orientation and conveying of the garlic seeds were realized by the orientation mechanism combined with the posture recognition results.
In this paper, aiming at the problems of the automatic orientation and orderly conveying of garlic, as required by existing garlic-root-cutting equipment, based on the analysis of garlic shape characteristics, a garlic orientation and orderly conveying method based on machine vision and mechanical structures is proposed.

2. Materials and Methods

2.1. Structure and Working Principle

According to the operation requirements of automatic and orderly picking, orienting and feeding garlic and aiming at the problems of missing garlic stems or lodging during storage and transportation, a garlic orientation and orderly conveying device for garlic root cutting was proposed. The required garlic posture for the garlic-root-cutting mechanism is shown in Figure 1. The working process of the machine is shown in Figure 2. Garlic is single granulated and initially transported through the feeding mechanism and then the posture recognition of garlic is carried out. According to the posture recognition results, garlic posture preadjustment is carried out under the action of the preadjustment mechanism, and finally, the garlic orientation operation is completed through the righting mechanism.
According to the garlic orientation and orderly conveying device shown in Figure 3, it is mainly composed of (1) a feeding mechanism, (2) a conveying mechanism, (3) a preadjustment mechanism, (4) a righting mechanism, and (5) an image acquisition module. The feeding mechanism is driven by the cylinder to achieve reciprocating motion and push the garlic in the hopper to the outlet of the feeding mechanism, and garlic separation is completed in the push process. Finally, under the action of gravity and the intervention rod, the garlic leaves the feeding mechanism and falls into the conveyor trough in the conveying mechanism to realize separation and preliminary orientation. After being processed by the feeding mechanism, the garlic is in an upright and lateral posture, as shown in Figure 4. This paper selects garlic from Shandong Province of China as the experimental object. The garlic is about 30 mm to 40 mm in height and 45 mm to 60 mm in diameter. Due to the growth law of garlic, there is a difference in the diameter of the same garlic. The maximum diameter of garlic shown in Figure 4 is 55 mm and the minimum diameter is 50 mm.
The garlic image was obtained by the image acquisition module and its posture was identified by the garlic posture recognition system [15,16,17]. The image acquisition module consists of industrial camera and industrial lens. HW500 industrial camera and GY0814-3MP lens are selected. The camera is installed directly above the preadjustment position, the installation height is 400 mm, and the focal length of the lens is 8 mm. The image collected by the image acquisition module is a garlic image with three channels and the size of the image is 300 × 300 dpi. The posture information includes the preadjusted posture direction and deviation angle θ . According to the recognition results, if the garlic is in an upright posture, there is no need to adjust it; when the garlic is in a lateral posture, it is necessary to adjust its orientation through the preadjustment mechanism. The preadjustment mechanism is composed of a turntable, a flange coupling, and a preadjustment motor, as shown in Figure 5. The turntable is directly fixed on the output shaft of the motor through the coupling and the motor below the preadjustment mechanism is driven to rotate according to the deviation angle. At the same time, the preliminary adjustment of the garlic on the turntable is completed. After the preadjustment mechanism is completed, the garlic is in a lateral posture with a unified orientation, as shown in Figure 5a. The centralizer needs to adjust the garlic, which is in a lateral posture, to an upright posture to meet the requirements of the garlic-root-cutting operation.
The righting mechanism is composed of the righting motor, turnover plate, belt drive assembly, crank, and connection rod, as shown in Figure 6. The righting motor drives the crank to rotate through the belt drive assembly and drives the turnover plate to rotate through the connection rod. The working principle of the righting mechanism is based on the characteristics that the gravity center of garlic is close to the side of the garlic root. When the garlic enters the righting mechanism, its orientation will be adjusted under the action of gravity; that is, the stem will be reversed upward and the root will be reversed downward. After garlic turnover is completed, the garlic root will be close to the upper surface of the turnover plate and then the turnover plate will be moved from an open state to a closed state (the turnover plate and the conveyor line support plate are in the same plane) so that the garlic is in an upright posture and the orientation operation is realized.

2.2. Design of the Garlic Posture Recognition System

2.2.1. Principle of Garlic Posture Recognition

The garlic feeding mechanism can separate garlic (with or without stems) and preliminarily orientate it into two possible postures: an upright posture or a lateral posture. As shown in Figure 7, whether garlic has a stem, the images of garlic in an upright posture and in a lateral posture are obviously different. The garlic roots are not visible in the image of garlic in an upright posture. By judging whether there are garlic root features in garlic images, garlic can be distinguished as being in the upright or lateral posture. Furthermore, according to the growth characteristics of garlic, garlic roots grow on the bottom center of garlic and garlic orientation can be defined as the garlic center pointing to the garlic root center, as shown in Figure 7b. In the lateral image, garlic orientation can be determined by two key points: the garlic root center and garlic center. In Figure 7, Point A is the key point of the garlic center, and Point B is the key point of the garlic root center.
To realize garlic posture adjustment, the deviation angle θ should be obtained by the garlic posture recognition system. The coordinate system is established with the upper left corner of the garlic image as the origin, as shown in Figure 8. The deviation angle θ can be calculated by θ 1 , where θ 1 is the angle between the vector AB and the negative direction of the y-axis and the value range of θ is (−180, 180). The calculation formula is as follows:
θ = θ 1 x 1 > x 2 θ 1 x 1 < x 2 0 x 1 = x 2   and   y 1 y 2 180 x 1 = x 2   and   y 1 < y 2
where
θ 1 = arccos ( y 1 y 2 ( x 1 x 2 ) 2 + ( y 1 y 2 ) 2 )
where x 1 , y 1 are the coordinates of garlic center A and x 2 , y 2 are the coordinates of garlic root center B.
According to the analysis above, the garlic posture recognition method based on garlic feature detection is proposed. The principle is to extract garlic and garlic root features in the image and, according to these two features, the orientation of garlic is judged based on whether the garlic is in an upright or a lateral posture. Figure 9 shows the flow chart of garlic posture recognition based on garlic feature detection.

2.2.2. Garlic Feature Detection Model Based on YOLOv5s

Based on the principle of garlic posture recognition, it is necessary to solve the detection problem of garlic and garlic root features. In the process of feature detection, garlic damage and occlusion of broken skin directly lead to deviation from the garlic feature center position. At the same time, to ensure the device has a faster recognition speed, the YOLOv5s model [18,19,20,21] is used in this paper.
(1)
YOLOv5s Detection Principle
The YOLOv5s network structure first extracts the features of garlic through the backbone network and divides the input garlic image into N × N nonoverlapping grid cells. The grid cell located in the target center is responsible for the detection of garlic features. Each grid cell needs to predict category information and the probability of garlic features in the current grid cell is P r . Each grid cell generates B prediction boxes with different objectives and each prediction box contains five predicted values ( t x , t y , t w , t h and confidence). The center coordinates, width, and height of the anchor frame are as follows.
b x = σ ( t x ) + c x b y = σ ( t y ) + c y b w = p w e t w b h = p h e t h
where c x and c y are the horizontal and vertical coordinate values of the upper-left corner of the grid cell, respectively; p w and p h are the width and height values of the anchor box, respectively; t x , t y , t w and t h are the center coordinate values, width, and height values of the prediction frame; and σ ( t x ) is the Sigmoid function.
The confidence calculation formula of the prediction box is:
C j i = P r I O U p t
where
I O U p t = P B G T P B G T
where C j i represents the confidence of the j prediction box in the i grid cell; I O U p t represents the intersection ratio of the predicted frame and the ground-truth frame; P B represents the prediction box; and G T represents the manually annotated ground-truth box.
The loss function (total_loss) in the YOLOv5s model consists of three parts: the classification loss function (cls_loss), the bounding box loss function (box_loss), and the confidence loss function (obj_loss). BCE_Loss is used to calculate the class probability and the loss of the target confidence score and CIOU_Loss is used to calculate the bounding box loss. Finally, the candidate frame with the highest confidence is extracted from the candidate prediction frames by the non-maximum suppression algorithm to determine the information in the final target detection frame.
(2)
Model Training
The screened garlic from Shandong is taken as the research object. In practical applications, garlic damage and the occlusion of broken skin are the key factors that affect the robustness of the garlic feature detection model. Therefore, the images collected in this paper include images of garlic under normal conditions, images of garlic under different damage conditions, and images of garlic occluded by broken skin. In total, 505 images were collected and 2020 images were generated using rotation, brightness, saturation, and exposure changes for the garlic feature recognition dataset.
The garlic feature detection training environment in this paper is based on the Windows 10 operating system and the computer processor used for model training is Intel(R) Xeon(R) Sliver 4110 CPU@2.10 GHz (2 CPU). The running memory is 64 GB, the storage memory is 4 TB, the GPU is NVIDIA Quadro P2000, and the graphics card driver version is NVIDIA 471.41 and CUDA version 10.0.130. The construction and training of the garlic feature detection model based on YOLOv5s is completed under Python 3.6.8 and PyTorch. The maximum number of iterations (epochs) during model training is set to 300 and the batch size is set to 16. Figure 10 shows the training loss curve of the YOLOv5s model. As the number of iterations increases, the total loss of the model basically converges to a stable value.

2.3. Evaluation Indicators of Garlic Posture Recognition and Garlic Feeding Tests

To verify the effectiveness of the garlic posture recognition algorithm based on YOLOv5s garlic feature detection, the posture recognition success rate η 1 and the correctly determined deviation angle rate η 2 were selected as the evaluation indicators of garlic posture recognition algorithm and the calculation formulas are:
η 1 = C U + C D T U + T D × 100 %
η 2 = C θ C D × 100 %
where T U is the number of actual upright garlic, T D is the number of actual lateral garlic, R U is the number of recognized upright postures, R D is the number of recognized lateral postures, C U is the number of correctly recognized upright postures, C D is the number of correctly recognized lateral postures, and C θ is the deviation angle of the lateral posture.
To verify the performance of garlic orientation and orderly conveying device, the success rate of orientation ψ is taken as the evaluation indicator. The success rate of orientation ψ is the ratio of garlic upright posture number N to garlic total number M.
ψ = N M × 100 %

3. Results and Discussion

3.1. Garlic Posture Recognition Test

To test the trained garlic feature detection model based on YOLOv5s, the average garlic feature detection time for each garlic image (including three channels) is approximately 0.018 s and the detection effect is shown in Figure 11.
The garlic posture recognition method is proposed based on YOLOv5s garlic feature detection. After determining the garlic features, the garlic orientation is determined and the garlic deviation angle can be calculated. The garlic posture recognition effect is shown in Figure 12. Since the garlic righting mechanism has a high fault tolerance rate, the acceptable error range for the deviation angle is determined to be ± 5 ° .
To verify the effectiveness of the garlic posture recognition algorithm based on YOLOv5s garlic feature detection, a garlic posture recognition test was carried out and a comparison was made with the traditional garlic feature detection algorithm based on the HSV model. Taking garlic from Shandong as the object, in total, 100 images were collected, and 300 single-channel garlic images were segmented. The garlic posture recognition tests based on YOLOv5s and HSV models were carried out, respectively, and the posture recognition success rate η 1 and the correctly determined deviation angle rate η 2 were used as evaluation indicators. The statistical results of the garlic posture recognition test are shown in Table 1. In Table 1, A is the upright posture and B is the lateral posture.
In the test, a condition exists where the garlic root is completely obstructed by the broken garlic skin, which leads to the recognition system misidentifying garlic with a lateral posture as that with an upright posture. The feature information of garlic broken skin is similar to that of garlic, which causes the inaccurate identification of garlic and leads to errors in the calculated garlic deviation angle. Garlic skin damage is the main cause of the above two conditions.
It can be seen from Table 1 that the success rate of the garlic posture recognition algorithm is 98.67% and the average accuracy rate of the garlic deviation angle is 99.11%, which is superior to the traditional algorithm in terms of both the success rate and accuracy rate of posture recognition. In summary, the proposed posture recognition algorithm based on YOLOv5s garlic feature detection has the advantages of a good recognition effect and high feasibility, which can meet the design requirements of the garlic posture adjustment mechanism.

3.2. Garlic Feeding Test

A prototype is developed based on the scheme of the garlic orientation and orderly conveying device and the garlic posture recognition system, as shown in Figure 13. The equipment is powered by a 220 V AC power supply and the external air pump provides a gas source for the feeding mechanism. The garlic posture recognition software developed in this paper is run on a Lenovo xiaoxin Pro 16 computer.
Taking garlic without fiber as the test object, an operation performance verification test for the garlic orientation and orderly conveying device was carried out. Taking the orientation success rate as the evaluation index and the feeding speed of the conveying mechanism and the rotational speed of the turntable as the influencing factors, the test of garlic orientation and orderly feeding was designed, as shown in Table 2. The purpose is to optimize a set of machine operation parameters under the automatic operation mode, aiming at the high-quality conveying of garlic.
According to the test design, cold-stored dry garlic with a transverse diameter of 50–60 mm, treated by cutting fiber, was selected as the test material, and the garlic orientation and orderly conveying device were selected as the experimental object. The experiment was carried out in the Key Laboratory of Transplanting Equipment and Technology of Zhejiang. The test results are shown in Table 2. According to the test results, the success rate of orientation is 95.6% when the conveying speed is 95 mm s 1 and the rotational speed of the turntable is 55 rpm. The orientation effect is shown in Figure 14.
To further verify the orientation and conveying efficiency of the garlic orientation and orderly conveying device in this paper, it is compared with the garlic automatic conveying device using vibration feeding, as shown in Table 3. Under the same number of channels, the device proposed in this paper has faster production rhythm and higher overall conveying efficiency. In addition, the existing garlic automatic feeding equipment only relies on the feature of garlic stems for orientation and the non-stem garlic needs manual adjustment or elimination, which further reflects the advantages of the garlic orientation and orderly conveying device.
Based on the above test results and comparison, the garlic orientation and orderly conveying device proposed in this paper can realize the automatic orientation and orderly conveying of garlic and can adapt to the feeding operation of garlic, with and without stems. The orientation success rate of this device is 95.6% and the conveying efficiency reaches 75 per minute, which meets the design requirements.

4. Conclusions

(1)
Taking the cold-stored dry garlic after cutting fiber as the object, an orientation and orderly conveying device for garlic root cutting was proposed. The automatic orientation and orderly conveying of garlic was realized by using the feature that the gravitational center of garlic is close to the garlic root and combined with machine vision technology. The problem of the poor automatic orientation effect of stemless garlic was solved. Compared with the existing vibration feeding methods, the conveying efficiency was significantly improved. At the same time, it provides a new idea for the orientation and conveying of bulb crops, such as garlic, and provides technical support for the development of garlic-related equipment.
(2)
A garlic posture recognition method based on garlic feature detection was proposed by using machine vision technology. The garlic feature was detected by the YOLOv5s model and garlic posture recognition was realized. The training results show that the YOLOv5s model can effectively learn garlic image features. The problem of garlic posture recognition in the garlic orientation process was solved. The success rate of posture recognition of the garlic posture recognition algorithm based on YOLOv5s is 98.67% and the average accuracy rate of the garlic deviation angle is 99.11%. Compared with the traditional HSV model, the success rate of posture recognition and the average accuracy rate of the garlic deviation angle are increased by 30.67% and 32.09%, respectively. It can be concluded that the garlic posture recognition algorithm based on YOLOv5s can effectively recognize the posture of garlic, which can meet the design requirements of the garlic preadjustment mechanism for garlic posture recognition.
(3)
A garlic orientation and orderly conveying device for garlic root cutting was developed, which realized the automatic orientation and orderly conveying of garlic and can adapt to the feeding operation of garlic, with and without stems. Through the garlic orientation and orderly conveying test, the optimal operating parameters of the whole machine were determined. The conveying speed is 95 mm s 1 and the rotational speed of the turntable is 55 rpm. Under this set of parameters, the orientation success rate is 95.6%, the conveying efficiency is 75 per minute, and the single-channel production beat is 2.4 s. Compared with the double-channel automatic garlic shredder and the eight-channel intelligent garlic automatic root-cutting machine, mentioned in references [22,23], the single-channel production beat of this paper is improved by 0.6 s and 0.4 s, respectively, which proves that the conveying efficiency of the garlic orientation and orderly conveying device is high.

Author Contributions

Conceptualization, J.C. and C.Y.; Methodology, C.Y.; Software, Y.Z.; Validation, K.Y., Y.Z. and B.Z.; Formal Analysis, Y.Z.; Investigation, B.Z.; Resources, J.C.; Data Curation, K.Y.; Writing—Original Draft Preparation, Y.Z.; Writing—Review and Editing, J.C., C.Y., K.Y. and B.Z.; Visualization, K.Y.; Supervision, C.Y.; Project Administration, J.C.; Funding Acquisition, J.C. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the National Natural Science Foundation of China [grant number 51975536] and the Leading Goose Program of Zhejiang Province [grant number 2022C02052].

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The data presented in this study are available on request from the corresponding author.

Acknowledgments

We thank the American journal experts for their linguistic assistance during the preparation of this article.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Yang, B.; Zong, Y.; Zhao, B. Measurement of the international competitiveness of China’s garlic industry and its influencing factors. Agric. Outlook 2019, 15, 113–117. [Google Scholar] [CrossRef]
  2. Yang, X. Industrial status and development countermeasures of garlic industry in China. Chin. Fruit Veg. 2020, 40, 57–59. [Google Scholar] [CrossRef]
  3. Chen, J.; Zhou, Y.; Jia, J.; Chen, T.; Cai, S.; Yu, C. Optimum design of precise root cutting mechanism based on characteristics of garlic root disk. Acta Agric. Zhejiangensis 2021, 33, 2174–2184. [Google Scholar] [CrossRef]
  4. Yu, Z.; Hu, Z.; Yang, K.; Peng, B.; Wu, F.; Xie, H. Design and experiment of root cutting device in garlic combine harvesting. Trans. Chin. Soc. Agric. Eng. 2016, 32, 77–85. [Google Scholar] [CrossRef]
  5. Chen, J.; Zhou, B.; Jia, J.; Chen, Z.; Cai, S. Design and parameters optimization of root cutting tool based on garlic numerical simulation model. J. Food Process Eng. 2021, 44, e13753. [Google Scholar] [CrossRef]
  6. Yu, Z.; Hu, Z.; Yang, K.; Peng, B.; Zhang, Y.; Yang, M. Operation mechanism analysis and parameter optimization of garlic root floating cutting device. Trans. Chin. Soc. Agric. Mach. 2021, 52, 111–119. [Google Scholar] [CrossRef]
  7. Li, C.; Feng, R.; Xu, H.; Sun, Q.; Song, J.; Jin, C. Research status and prospect of garlic seed classifier. J. Chin. Agric. Mech. 2021, 42, 91–96. [Google Scholar] [CrossRef]
  8. Chen, Y.; Chao, K.; Kim, M. Machine vision technology for agricultural applications. Comput. Electron. Agric. 2002, 36, 173–191. [Google Scholar] [CrossRef] [Green Version]
  9. Sofu, M.; Er, O.; Kayacan, M.; Cetisli, B. Design of an automatic apple sorting system using machine vision. Comput. Electron. Agric. 2016, 127, 395–405. [Google Scholar] [CrossRef]
  10. Azarmdel, H.; Mohtasebi, S.; Jafari, A.; Muñoz, A. Developing an orientation and cutting point determination algorithm for a trout fish processing system using machine vision. Comput. Electron. Agric. 2019, 162, 613–629. [Google Scholar] [CrossRef]
  11. Chen, Z.; He, L.; Ye, Y.; Chen, J.; Wang, R. Automatic sorting of fresh tea leaves using vision-based recognition method. J. Food Process Eng. 2020, 43, e13474. [Google Scholar] [CrossRef]
  12. Shang, Z.; Zhang, H.; Zeng, C.; Yue, M.; Zhao, Q. Automatic orientation method and experiment of fructus aurantii based on machine vision. J. Chin. Agric. Mech. 2019, 40, 119–124. [Google Scholar] [CrossRef]
  13. Li, G.; Gu, K.; Zhao, M. Method and experiment on automatic orientation of slice sampling for corn seed. Trans. Chin. Soc. Agric. Eng. 2016, 32, 40–47. [Google Scholar] [CrossRef]
  14. Hou, J.; Tian, L.; Li, T.; Niu, Z.; Li, Y. Design and experiment of test bench for garlic bulbil adjustment and seeding based on bilateral image identification. Trans. Chin. Soc. Agric. Eng. 2020, 36, 50–58. [Google Scholar] [CrossRef]
  15. Yang, Q. An approach to apple surface feature detection by machine vision. Comput. Electron. Agric. 1994, 11, 249–264. [Google Scholar] [CrossRef]
  16. Unay, D.; Gosselin, B.; Kleynen, O.; Leemans, V.; Destain, M.; Debeir, O. Automatic grading of bi-colored apples by multispectral machine vision. Comput. Electron. Agric. 2011, 75, 204–212. [Google Scholar] [CrossRef] [Green Version]
  17. Li, Y.; Wu, Y.; Li, T.; Niu, Z.; Hou, J. Design and experiment of adjustment device based on machine vision for garlic clove direction. Comput. Electron. Agric. 2020, 174, 105513. [Google Scholar] [CrossRef]
  18. Zhou, J.; Jiang, P.; Zou, A.; Chen, X.; Hu, W. Ship target detection algorithm based on improved YOLOv5. J. Mar. Sci. Eng. 2021, 9, 908. [Google Scholar] [CrossRef]
  19. Yao, J.; Qi, J.; Zhang, J.; Shao, H.; Yang, J.; Li, X. A real-time detection algorithm for kiwifruit defects based on YOLOv5. Electronics 2021, 10, 1711. [Google Scholar] [CrossRef]
  20. Fan, Y.; Zhang, S.; Feng, K.; Qian, K.; Wang, Y.; Qin, S. Strawberry maturity recognition algorithm combining dark channel enhancement and YOLOv5. Sensors 2022, 22, 419. [Google Scholar] [CrossRef]
  21. Lyu, S.; Li, R.; Zhao, Y.; Li, Z.; Fan, R.; Liu, S. Green citrus detection and counting in orchards based on YOLOv5-CS and AI edge system. Sensors 2022, 22, 576. [Google Scholar] [CrossRef] [PubMed]
  22. Li, Z.; Xin, L.; Xin, L. Fully Automatic Garlic Root Cutting Machine. Chinese: ZL201910697479.1. Available online: https://kns.cnki.net/kcms/detail/detail.aspx?dbcode=SCPD&dbname=SCPD2019&filename=CN110547490A&uniplatform=NZKPT&v=W8XFteGX4tI3HWSrXsZya63Wk6msh-c7GEuOAZuOnNIjFBc5FfAV1qooTcIhgRiG. (accessed on 10 December 2019).
  23. Zhang, H.; Yang, Y.; You, W.; Zhang, C. An Intelligent Garlic Automatic Root Cutter. Chinese: ZL201720808945.5. Available online: https://kns.cnki.net/kcms/detail/detail.aspx?dbcode=SCPD&dbname=SCPD2018&filename=CN207125299U&uniplatform=NZKPT&v=vPtL03fkF96E6fAT5N1J2DLA2iX5iFq0wSFVmqhbdqDiSdj5gW_kOKgd1aalVv_v. (accessed on 23 March 2018).
Figure 1. Garlic posture required by the garlic-root-cutting mechanism.
Figure 1. Garlic posture required by the garlic-root-cutting mechanism.
Agriculture 12 01077 g001
Figure 2. Flow chart for the orientation and orderly conveying of garlic.
Figure 2. Flow chart for the orientation and orderly conveying of garlic.
Agriculture 12 01077 g002
Figure 3. Garlic orientation and orderly conveying device. 1. Feeding mechanism; 2. conveying mechanism; 3. preadjustment mechanism; 4. righting mechanism; and 5. image acquisition module.
Figure 3. Garlic orientation and orderly conveying device. 1. Feeding mechanism; 2. conveying mechanism; 3. preadjustment mechanism; 4. righting mechanism; and 5. image acquisition module.
Agriculture 12 01077 g003
Figure 4. Garlic posture into conveying compartment. (a) Upright posture; (b) lateral posture.
Figure 4. Garlic posture into conveying compartment. (a) Upright posture; (b) lateral posture.
Agriculture 12 01077 g004
Figure 5. Preadjustment mechanism. (a) Principal diagram of the preadjustment mechanism; (b) 3D view of the preadjustment mechanism.
Figure 5. Preadjustment mechanism. (a) Principal diagram of the preadjustment mechanism; (b) 3D view of the preadjustment mechanism.
Agriculture 12 01077 g005
Figure 6. Righting mechanism. (a) Principal diagram of the righting mechanism; (b) 3D view of the righting mechanism.
Figure 6. Righting mechanism. (a) Principal diagram of the righting mechanism; (b) 3D view of the righting mechanism.
Agriculture 12 01077 g006
Figure 7. Image differences in garlic posture. (a) Upright posture; (b) lateral posture.
Figure 7. Image differences in garlic posture. (a) Upright posture; (b) lateral posture.
Agriculture 12 01077 g007
Figure 8. Calculation of garlic posture deviation angle.
Figure 8. Calculation of garlic posture deviation angle.
Agriculture 12 01077 g008
Figure 9. Flow chart of garlic posture recognition.
Figure 9. Flow chart of garlic posture recognition.
Agriculture 12 01077 g009
Figure 10. Loss curve of the garlic feature detection model.
Figure 10. Loss curve of the garlic feature detection model.
Agriculture 12 01077 g010
Figure 11. Results of garlic feature detection model test in conveying compartment.
Figure 11. Results of garlic feature detection model test in conveying compartment.
Agriculture 12 01077 g011
Figure 12. Garlic posture recognition effect. (a) Upright posture; (b) lateral posture and θ = 0°; (c) lateral posture and θ = –44°; and (d) lateral posture and θ = 122°.
Figure 12. Garlic posture recognition effect. (a) Upright posture; (b) lateral posture and θ = 0°; (c) lateral posture and θ = –44°; and (d) lateral posture and θ = 122°.
Agriculture 12 01077 g012
Figure 13. Garlic orientation and orderly conveying device. 1. Feeding mechanism; 2. conveying mechanism; 3. preadjustment mechanism; 4. righting mechanism; 5. image acquisition devices; 6. control boxes; and 7. blank box.
Figure 13. Garlic orientation and orderly conveying device. 1. Feeding mechanism; 2. conveying mechanism; 3. preadjustment mechanism; 4. righting mechanism; 5. image acquisition devices; 6. control boxes; and 7. blank box.
Agriculture 12 01077 g013
Figure 14. Performance verification test of the garlic orientation and orderly conveying device. (a) Whole-machine experiment; (b) feeding mechanism; (c) conveying mechanism; (d) garlic preadjustment section; (e) garlic orientation section; and (f) garlic output posture.
Figure 14. Performance verification test of the garlic orientation and orderly conveying device. (a) Whole-machine experiment; (b) feeding mechanism; (c) conveying mechanism; (d) garlic preadjustment section; (e) garlic orientation section; and (f) garlic output posture.
Agriculture 12 01077 g014
Table 1. Statistical results of the garlic posture recognition test.
Table 1. Statistical results of the garlic posture recognition test.
MethodTotal Garlic ImagesActualRecognizedCorrectly RecognizedSuccess Rate (%)Accuracy Rate (%)
ABABABAngle of Deviation
YOLOv5s30018411618811218411211198.6799.11
Traditional method132168110946368.067.02
Table 2. Test results of the orientation and orderly conveying of garlic.
Table 2. Test results of the orientation and orderly conveying of garlic.
No.Conveying Speed (mm·s−1)Rotation Speed of Turntable (rpm)Orientation Success Rate (%)
1855086.7
2855591.3
3856081.3
4955086
5955595.6
6956080
71055090.7
81055587.3
91056076.7
Table 3. Comparison of garlic conveying efficiency.
Table 3. Comparison of garlic conveying efficiency.
TypeConveying Efficiency (/min)Single Channel Production Beat (s)
This paper752.4
Double-channel automatic garlic shredder [22]403.0
8-channel intelligent garlic automatic root cutting machine [23]1702.8
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Chen, J.; Yu, C.; Yao, K.; Zhou, Y.; Zhou, B. Design and Experiment of a Garlic Orientation and Orderly Conveying Device Based on Machine Vision. Agriculture 2022, 12, 1077. https://doi.org/10.3390/agriculture12081077

AMA Style

Chen J, Yu C, Yao K, Zhou Y, Zhou B. Design and Experiment of a Garlic Orientation and Orderly Conveying Device Based on Machine Vision. Agriculture. 2022; 12(8):1077. https://doi.org/10.3390/agriculture12081077

Chicago/Turabian Style

Chen, Jianneng, Chennan Yu, Kun Yao, Yun Zhou, and Binsong Zhou. 2022. "Design and Experiment of a Garlic Orientation and Orderly Conveying Device Based on Machine Vision" Agriculture 12, no. 8: 1077. https://doi.org/10.3390/agriculture12081077

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop