Apple grading device and method based on machine vision technology

By using machine vision technology and multi-objective tracking algorithms in Apple's grading device, Apple's real-time detection and grading are realized, solving the problems of unstable grading accuracy and low degree of automation in the existing technology, and reducing equipment costs.

CN119608618AInactive Publication Date: 2025-03-14BEIJING INFORMATION SCI & TECH UNIV

Patent Information

Application Number
CN202411695085.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-25
Publication Date
2025-03-14
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing Apple grading device is difficult to realize real-time detection and grading of Apple, resulting in unstable grading accuracy, low degree of automation, and high equipment costs.

Method used

The Apple grading device based on machine vision technology, including a rack, transportation mechanism and detection grading mechanism, uses the object detection algorithm and multi-objective tracking algorithm to detect and track Apple, calculates the diameter and chromaticity of the apple for classification, and creates a speed difference between adjacent conveyor belts to rotate the apple during transportation, making it easy to detect.

Benefits of technology

Real-time detection and grading of Apple has been realized, grading accuracy and automation have been improved, equipment costs and maintenance difficulties have been reduced, and market demand for Apple grading has been met.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119608618A_ABST
    Figure CN119608618A_ABST
Patent Text Reader

Abstract

The invention discloses an apple grading device and method based on a machine vision technology. The apple grading device comprises a rack, a conveying mechanism and a grading mechanism, and the conveying mechanism is installed on the rack; the grading mechanism is installed on the top of the rack and comprises a supporting frame, a development board and a detection camera. According to the apple grading device and method based on the machine vision technology, the apple detection task and the apple real-time tracking task can be completed; the rotating speed difference generated by the device can enable the apples to rotate in the transportation process, so that the whole surfaces of the apples can be conveniently detected, and the detection accuracy is improved; the apple diameter and coloring degree are selected as grading indexes, a related measurement calculation algorithm is designed, the apple grading task is achieved, and the device is simple in structure, low in cost and suitable for market popularization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of fruit processing, and in particular to an apple grading device and method based on machine vision technology. Background Art

[0002] With the rapid development of modern agriculture and food industry, the output of fruits such as apples has been increasing, and the requirements for fruit quality and grading have become higher and higher. The traditional fruit grading method mainly relies on manual work, which is not only inefficient, but also easily affected by human factors, resulting in inaccurate and unstable grading results. In recent years, with the continuous advancement of automation technology, various automated grading equipment has emerged. Among them, apple grading devices, as one of the important fruit grading equipment, have been widely used and developed.

[0003] Problems with existing apple grading devices include difficulty in achieving real-time detection and grading of apples, resulting in unstable grading accuracy and an inability to quickly respond to market demand. In addition, the degree of automation is not high, making it difficult to achieve efficient and accurate grading, and the equipment cost is relatively high. Summary of the invention

[0004] The purpose of the present invention is to provide an apple grading device and method based on machine vision technology, which improves the grading accuracy, processing efficiency and equipment stability by optimizing the design of mechanical structure and other aspects, while reducing equipment cost and maintenance difficulty, thereby meeting the market demand for apple grading.

[0005] To achieve the above-mentioned objectives, the present invention provides an apple grading device based on machine vision technology, including a frame, a transport mechanism and a detection and grading mechanism, the transport mechanism including a first drive module, a second drive module and a rotation module, the rotation module is arranged at the bottom end of the frame, the first drive module and the second drive module are symmetrically arranged at the bottom end of the frame, and are both connected to the rotation module; the detection and grading mechanism is installed on the top of the frame.

[0006] Preferably, the first driving module includes a first driving motor and a first speed regulating box, the second driving module includes a second driving motor and a second speed regulating box, the first speed regulating box and the second speed regulating box are symmetrically arranged at the middle position of the bottom of the frame through a mounting plate, the first driving motor is arranged on one side of the first speed regulating box through a first fixing plate; the first driving motor is arranged on one side of the second speed regulating box through a second fixing plate, the first speed regulating box is used to adjust the speed of the first driving motor, and the second speed regulating box is used to adjust the speed of the second driving motor;

[0007] The rotating module comprises a first rotating shaft and a second rotating shaft, and the first rotating shaft and the second rotating shaft are symmetrically arranged at the bottom of the frame;

[0008] Preferably, the detection and grading mechanism includes a support frame, an embedded development board and a detection camera, the support frame is installed on the top of the rack, the embedded development board is embedded and connected to the support frame, and the detection camera is arranged through the center of the support frame and connected to the embedded development board.

[0009] Preferably, a first driving gear is provided at an output end of the first driving motor, and a second driving gear is provided at an output end of the second driving motor.

[0010] Preferably, a first driving gear is provided at one end of the first rotating shaft, and a second driving gear is provided at one end of the second rotating shaft. A plurality of first driving wheels are equally spaced on the first rotating shaft, a first movable wheel is provided between the first driving wheels, the first driving wheel is fixedly connected to the first rotating shaft, and the first movable wheel is rotatably connected to the first rotating shaft; a plurality of second driving wheels are equally spaced on the second rotating shaft, a second movable wheel is provided between the second driving wheels, the second driving wheel is fixedly connected to the second rotating shaft, and the second movable wheel is rotatably connected to the second rotating shaft, a plurality of third movable wheels are equally spaced on the first sleeve, the third movable wheel is rotatably connected to the first sleeve, a plurality of fourth movable wheels are equally spaced on the second sleeve, and the fourth movable wheel is rotatably connected to the second sleeve.

[0011] Preferably, the first driving gear and the second driving gear are connected to the first driving gear and the second driving gear respectively through chains.

[0012] Preferably, the first driving wheel, the second movable wheel, the fourth movable wheel and the third movable wheel are connected in sequence correspondingly through a conveyor belt; the first movable wheel driving wheel, the second driving wheel, the fourth movable wheel and the third movable wheel are connected in sequence correspondingly through a conveyor belt.

[0013] Preferably, a discharge plate is provided on one side of the top end of the frame.

[0014] To achieve the above object, the present invention also provides an apple grading method based on machine vision technology, comprising the following steps:

[0015] S1. Use PyQt5 software to develop a visual interface for apple detection and tracking. The detection camera detects the surface of the apple, uses the Yolo target detection method, collects data sets for model training, and uses a segmentation algorithm to separate the apple from the background.

[0016] S2. Calculate the diameter of the apple. Select A4 paper as a reference. Place the apple on a flat A4 paper. Use the detection camera to take a photo of the apple and the paper. Then use the original image as input. Use the image compression algorithm to obtain the pixel size occupied by the A4 paper in the image. The actual size of the A4 paper is known. The actual size of the unit pixel in the image is converted and recorded as the fixed pixel size. Calculate the pixel size occupied by the apple in the image. Then multiply the pixel size occupied by the apple in the image by the fixed pixel size obtained previously to obtain the actual diameter of the apple.

[0017] S3, analyzing the coloration of the apple. The coloration is defined as the ratio of the red coloration area on the apple surface to the surface area of ​​the fruit. The coloration is obtained by calculating the ratio of the number of red pixels on the apple surface in each frame image to the total number of pixels on the apple surface.

[0018] S4. After obtaining the apple diameter and coloring, build an apple grading model according to the apple grading reference standard, write the corresponding judgment statement code on the PC to meet the output requirements corresponding to each grade, and the code includes multi-target tracking algorithm code and target detection algorithm code. Deploy the target detection algorithm code and multi-target tracking algorithm code on the embedded development board;

[0019] S5, placing the apple on the right side of the conveyor belt, starting the first drive motor and the second drive motor, the first drive motor drives the first drive gear to rotate through the chain, and then drives the first rotating shaft to rotate; the second drive motor drives the second drive gear to rotate through the chain, and then drives the second rotating shaft to rotate;

[0020] The rotation speeds of the first rotating shaft and the second rotating shaft are set to be different, thereby generating a rotation speed difference between adjacent conveyor belts, so that the apples rotate during transportation; the rotation speed of the first drive motor is adjusted by adjusting the first speed regulating box, and the rotation speed of the second drive motor is adjusted by adjusting the second speed regulating box, so that the conveyor belts have different rotation speed differences, resulting in different rotation effects of the apples. After the apples are transported to the left side of the conveyor belt, they are transported out through the discharge plate.

[0021] Therefore, the present invention adopts the above-mentioned apple grading device and method based on machine vision technology, and the beneficial effects are as follows:

[0022] (1) The present invention adopts a target detection algorithm and collects data sets for model training to achieve the task of detecting apples.

[0023] (2) The present invention adopts a multi-target tracking algorithm to complete the real-time tracking task of apples.

[0024] (3) The present invention selects apple diameter and color as grading indicators, designs relevant measurement and calculation algorithms, and realizes the apple grading task.

[0025] (4) The setting of the rotation speed difference between adjacent conveyor belts in the present invention allows the apples to rotate during transportation, making it easier for the detection camera to detect the entire surface of the apples. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 is an overall schematic diagram of an embodiment of an apple grading device based on machine vision technology of the present invention;

[0027] Figure 2 It is a left view of an embodiment of an apple grading device based on machine vision technology of the present invention;

[0028] Figure 3 It is a schematic diagram of an apple grading process according to an embodiment of an apple grading method based on machine vision technology of the present invention;

[0029] Figure 4 It is a schematic diagram of the positions of apples and a conveyor belt in an embodiment of an apple grading method based on machine vision technology of the present invention;

[0030] Figure 5 is a schematic diagram of an apple approximate graphic of an apple grading method based on machine vision technology according to an embodiment of the present invention;

[0031] Reference numerals

[0032] 1. Frame; 2. First drive motor; 3. Second drive motor; 4. First speed regulating box; 5. Second speed regulating box; 6. First rotating shaft; 7. Second rotating shaft; 8. Mounting plate; 9. First fixed plate; 10. Second fixed plate; 11. First driving gear; 12. Second driving gear; 13. First driving wheel; 14. First movable wheel; 15. Second driving wheel; 16. Second movable wheel; 17. First driving gear; 18. Second driving gear; 19. First sleeve; 20. Third movable wheel; 21. Second sleeve; 22. Fourth movable wheel; 23. Support frame; 24. Embedded development board; 25. Detection camera; 26. Discharging plate; 27. Conveyor belt. DETAILED DESCRIPTION

[0033] The technical solution of the present invention is further described below through the accompanying drawings and embodiments.

[0034] Unless otherwise defined, technical or scientific terms used in the present invention shall have the common meanings understood by one having ordinary skills in the field to which the present invention belongs.

[0035] Example

[0036] like Figure 1-Figure 2As shown, an apple grading device based on machine vision technology includes a frame 1, a transport mechanism and a detection and grading mechanism. The transport mechanism includes a first drive module, a second drive module and a rotation module. The rotation module is arranged at the bottom end of the frame 1. The first drive module and the second drive module are symmetrically arranged at the bottom end of the frame 1 and are both connected to the rotation module. The detection and grading mechanism is installed on the top of the frame 1.

[0037] The first drive module includes a first drive motor 2 and a first speed regulating box 4, and the second drive module includes a second drive motor 3 and a second speed regulating box 5; the first speed regulating box 4 and the second speed regulating box 5 are symmetrically arranged at the middle position of the bottom of the frame 1 through a mounting plate 8, and the first drive motor 2 is arranged on one side of the first speed regulating box 4 through a first fixing plate 9; the first drive motor 2 is arranged on one side of the second speed regulating box 5 through a second fixing plate 10, the first speed regulating box 4 is used to adjust the speed of the first drive motor 2, and the second speed regulating box 5 is used to adjust the speed of the second drive motor 3.

[0038] The rotating module comprises a first rotating shaft 6 and a second rotating shaft 7, and the first rotating shaft 6 and the second rotating shaft 7 are symmetrically arranged at the bottom of the frame 1;

[0039] A first driving gear 11 is provided at one end of the first rotating shaft 6, and a second driving gear 12 is provided at one end of the second rotating shaft 7. A plurality of first driving wheels 13 are sleeved on the first rotating shaft 6 at equal intervals, and a first movable wheel 14 is provided between the first driving wheels 13. The first driving wheel 13 is fixedly connected to the first rotating shaft 6, and the first movable wheel 14 is rotatably connected to the first rotating shaft 6. When the first rotating shaft 6 rotates, the first driving wheel 13 is driven to rotate. A plurality of second driving wheels 15 are sleeved on the second rotating shaft 7 at equal intervals, and a second movable wheel 16 is provided between the second driving wheels 15. The second driving wheel 15 is fixedly connected to the second rotating shaft 7, and the second movable wheel 16 is rotatably connected to the second rotating shaft 7. The second rotating shaft 7 drives the second rotating shaft 7 to rotate. A plurality of third movable wheels 20 are sleeved on the first sleeve 19 at equal intervals, and the third movable wheel 20 is rotatably connected to the first sleeve 19. A plurality of fourth movable wheels 22 are sleeved on the second sleeve 21 at equal intervals, and the fourth movable wheel 22 is rotatably connected to the second sleeve 21.

[0040] The output end of the first drive motor 2 is provided with a first drive gear 17, and the output end of the second drive motor 3 is provided with a second drive gear 18. The first drive gear 17 and the second drive gear 18 are respectively connected to the first driving gear 11 and the second driving gear 12 through chains, so the speeds of the first rotating shaft 6 and the second rotating shaft 7 can be adjusted correspondingly by adjusting the speeds of the first drive motor 2 and the second drive motor 3.

[0041] The first active wheel 13, the second active wheel 16, the fourth active wheel 22 and the third active wheel 20 are connected in sequence via a conveyor belt 27; the first active wheel 14, the second active wheel 15, the fourth active wheel 22 and the third active wheel 20 are connected in sequence via a conveyor belt 27. The material of the conveyor belt 27 is rubber, which can reduce the loss of apple skin during transportation.

[0042] The above arrangement allows the operator to adjust the rotation speeds of the first rotating shaft 6 and the second rotating shaft 7 to create a rotation speed difference between adjacent conveyor belts 27. The rotation speed difference can cause the apples to roll on the conveyor belts 27, which is beneficial for detecting the entire surface of the apples.

[0043] The support frame 23 is installed on the top of the frame 1, the embedded development board 24 is embedded and connected to the support frame 23, and the detection camera 25 is set at the center of the support frame 23 and connected to the embedded development board 24. The embedded development board 24 is deployed with target detection and multi-target tracking apple codes, which controls the detection camera 25 to complete the tracking of the apple and the detection of the apple surface.

[0044] A discharging plate 26 is provided on one side of the top of the frame 1. The material of the discharging plate 26 is plastic, which can reduce the damage to the apple skin.

[0045] like Figure 3-Figure 4 As shown, an apple grading method based on machine vision technology includes the following steps:

[0046] S1. Use PyQt5 software to develop a visual interface for apple detection and tracking. Detection camera 25 detects the surface of the apple. Use the Yolo target detection method to collect data sets for model training, and use the segmentation algorithm to separate the apple from the background. First, perform a series of image processing on the original image, such as grayscale processing, median filtering and other algorithms for binarization, and then apply the contour detection algorithm to the processed image. The largest contour in the image is the contour of the apple, and then construct a mask consistent with the largest contour. Apply the mask to the original image to obtain the complete segmented apple image.

[0047] S2, calculate the diameter of the apple. Since the visual acquisition element is a monocular detection camera 25, it is impossible to directly obtain the real information of the apple. Therefore, if you want to calculate the real fruit diameter size of the apple based on the picture content, then an object of known size is needed in the picture as a reference. Select A4 paper as a reference, place the apple on a flat A4 paper, use the detection camera 25 to take a photo of the apple and the paper, and then use the original image as input. Use the image compression algorithm to obtain the pixel size occupied by the A4 paper in the image. The actual size of the A4 paper is known, and the size of the unit pixel in the picture in reality is converted and recorded as a fixed pixel size. To measure the fruit diameter of the apple in the picture in reality, you only need to calculate the pixel size occupied by the apple in the image, and then multiply the pixel size occupied by the apple in the image by the fixed pixel size obtained before to obtain the actual diameter of the apple.

[0048] S3. Analyze the coloring degree of the apple. The coloring degree is defined as the ratio of the red coloring area on the apple surface to the surface area of ​​the fruit. The coloring degree is obtained by calculating the ratio of the number of red pixels on the apple surface in each frame image to the overall pixel ratio on the apple surface.

[0049] In order to facilitate calculation and reduce the influence of lighting conditions, this embodiment adopts the HSV color model and creates a mask according to the hue range of the apple (such as the red range in the HSV space). This mask will mark all red areas in the image as white and other areas as black. By applying this mask to the original image, all red areas in the image can be extracted and other background information can be removed. Further, the mask image is processed, such as finding contours, calculating areas, etc., to obtain relevant information about the apple. By applying this mask to the apple image segmented above, only the pixels of the red part of the apple surface can be retained, and then the ratio of the total number of red pixels to the total number of pixels on the apple surface can be calculated to obtain the coloring degree of the apple.

[0050] S4. After obtaining the apple diameter and coloring, a corresponding apple grading model is constructed. According to the apple grading reference standard, a corresponding judgment statement code is written on a PC to meet the output requirements corresponding to each grade. The code includes a target detection algorithm code and a multi-target tracking algorithm code. The target detection algorithm code and the multi-target tracking algorithm code are deployed on an embedded development board 24, which has the characteristics of small size and strong performance.

[0051] S5, such as Figure 4As shown, an apple is placed on the right side of the conveyor belt 27, the mass of the apple is m = 0.224kg, the diameter of the apple is d = 0.08m, and the circumference is L = 0.2512m. The first drive motor 2 and the second drive motor 3 are started, and the first drive motor 2 drives the first drive gear 11 to rotate through the chain, thereby driving the first rotating shaft 6 to rotate; the first rotating shaft 6 drives the first driving wheel 13 to rotate; the second drive motor 3 drives the second drive gear 12 to rotate through the chain, thereby driving the second rotating shaft 7 to rotate, and the second rotating shaft 7 drives the second driving wheel 15 to rotate. The running speed of the conveyor belt 27 has three modes: low, medium, and high. The speed of each mode can be fine-tuned, as shown in Table 1;

[0052] Table 1 Conveyor belt rotation speed

[0053] Minimum speed (m / s) Maximum speed (m / s) Low speed mode 0.156 0.208 Medium speed mode 0.391 0.480 High-speed mode 0.730 1.042

[0054] The first rotating shaft 6 and the second rotating shaft 7 are set to have different rotation speeds, thereby generating a rotation speed difference between adjacent conveyor belts 27. The rotation speed v2 of the conveyor belt 27 driven by the first rotating shaft 6 is greater than the rotation speed v1 of the conveyor belt 27 driven by the second rotating shaft 7. The interval between adjacent conveyor belts 27 is x=0.06m, and the dynamic friction coefficient is 0.5. The rotation speed difference will cause the apple to rotate during transportation, making it easier for the detection camera 25 to detect the entire surface of the apple.

[0055] The time for the apple to move on the conveyor belt 27 is set to t=4s, and the moving distance is s=1.26m. After many experiments, the speed combination with the best apple rotation effect is selected as v1=0.73m / s and v2=0.156m / s.

[0056] like Figure 4-Figure 5 As shown, verify whether the apple can rotate one circle on the conveyor belt 27 in the above setting. Approximate the apple as a sphere;

[0057]

[0058] Wherein, F1 is the supporting force of the conveyor belt 27 on the apple, and α is the angle between the direction of F1 and the vertical direction.

[0059] The apple rotates on the conveyor belt 27, and the friction force it is subjected to is sliding friction. The sliding friction force is:

[0060] f = μF1 = 0.845N;

[0061] Wherein, μ is the sliding friction coefficient of the conveyor belt 27. The rotation of the apple is approximately circular motion, and the friction force is a tangential force, which is:

[0062]

[0063] Where r is the radius of the apple, according to the physical relationship between linear velocity and tangential force The linear velocity obtained is:

[0064] v = 0.38 m / s;

[0065] Acceleration stage: The initial velocity of the apple placed on the conveyor belt 27 is 0. Therefore, the sliding friction provided by the two sides of the conveyor belt 27 is the driving force. The relationship between the sliding friction f and the acceleration a is 2f = ma, and the acceleration a = 7.545 m / s 2 , acceleration time Moving distance

[0066] Rotation stage: According to The rotation time t2 of the rotation stage is obtained as 3.29 s. After verification, the total time t1 + t2 for one rotation is 3.34 s < t = 4 s. Therefore, the apple can complete one full rotation on the conveyor belt 27.

[0067] Ideally, the period for one rotation of the apple is Relative distance, that is, the circumference of the apple L = 2πr; the distance difference between two adjacent conveyor belts 27: s0 = v1t - v2t; the relationship between the rotational speed of the conveyor belt 27 and the linear velocity ν of the apple's rotation is:

[0068]

[0069] Among them, the value of η is:

[0070]

[0071] By adjusting the rotational speeds of the first driving motor 2 and the second driving motor 3 through the first speed regulating box 4 and the second speed regulating box 5 respectively, different rotational speed differences are generated between the conveyor belts 27, which can make the rotation effect of the apple different. After the apple is transported to the left side of the conveyor belt 27, it is transported out through the discharge plate 26.

[0072] Therefore, the present invention adopts the above-mentioned apple grading device and method based on machine vision technology, which can complete the detection task of apples and the real-time tracking task of apples; selects the fruit diameter and color degree of apples as grading indicators, designs relevant measurement and calculation algorithms, and realizes the apple grading task. The device has a simple structure and low cost, and is suitable for market promotion.

[0073] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that: they can still modify or equivalently replace the technical solutions of the present invention, and these modifications or equivalent replacements cannot make the modified technical solutions deviate from the spirit and scope of the technical solutions of the present invention.

Claims

1. An apple grading device based on machine vision technology, characterized in that: It includes a frame, a transportation mechanism and a detection and grading mechanism. The transportation mechanism includes a first driving module, a second driving module and a rotation module. The rotation module is arranged at the bottom end of the frame. The first driving module and the second driving module are symmetrically arranged at the bottom end of the frame and are both connected to the rotation module. The detection and grading mechanism is installed on the top of the frame.

2. The apple grading device based on machine vision technology according to claim 1, characterized in that: The first drive module includes a first drive motor and a first speed regulating box, the second drive module includes a second drive motor and a second speed regulating box, the first speed regulating box and the second speed regulating box are symmetrically arranged at the middle position of the bottom of the frame through a mounting plate, the first drive motor is arranged on one side of the first speed regulating box through a first fixing plate; the first drive motor is arranged on one side of the second speed regulating box through a second fixing plate, the first speed regulating box is used to adjust the speed of the first drive motor, and the second speed regulating box is used to adjust the speed of the second drive motor; The rotating module comprises a first rotating shaft and a second rotating shaft, and the first rotating shaft and the second rotating shaft are symmetrically arranged at the bottom of the frame.

3. The apple grading device based on machine vision technology according to claim 2, characterized in that: The detection and grading mechanism includes a support frame, an embedded development board and a detection camera. The support frame is installed on the top of the rack, the embedded development board is embedded and connected to the support frame, and the detection camera is set at the center of the support frame and connected to the embedded development board.

4. The apple grading device based on machine vision technology according to claim 3, characterized in that: A first driving gear is disposed at an output end of the first driving motor, and a second driving gear is disposed at an output end of the second driving motor.

5. The apple grading device based on machine vision technology according to claim 4, characterized in that: A first driving gear is provided at one end of the first rotating shaft, and a second driving gear is provided at one end of the second rotating shaft. A plurality of first driving wheels are equally spaced on the first rotating shaft, a first movable wheel is provided between the first driving wheels, the first driving wheel is fixedly connected to the first rotating shaft, and the first movable wheel is rotatably connected to the first rotating shaft; a plurality of second driving wheels are equally spaced on the second rotating shaft, a second movable wheel is provided between the second driving wheels, the second driving wheel is fixedly connected to the second rotating shaft, and the second movable wheel is rotatably connected to the second rotating shaft, a plurality of third movable wheels are equally spaced on the first sleeve, the third movable wheel is rotatably connected to the first sleeve, a plurality of fourth movable wheels are equally spaced on the second sleeve, and the fourth movable wheel is rotatably connected to the second sleeve.

6. The apple grading device based on machine vision technology according to claim 5, characterized in that: The first driving gear and the second driving gear are respectively connected to the first driving gear and the second driving gear through chains.

7. The apple grading device based on machine vision technology according to claim 6, characterized in that: The first active wheel, the second active wheel, the fourth active wheel and the third active wheel are connected in sequence via a conveyor belt; the first active wheel active wheel, the second active wheel, the fourth active wheel and the third active wheel are connected in sequence via a conveyor belt.

8. The apple grading device based on machine vision technology according to claim 7, characterized in that: A discharging plate is arranged on one side of the top end of the frame.

9. An apple grading method based on machine vision technology, characterized in that: The following steps are involved: S1. Use PyQt5 software to develop a visual interface for apple detection and tracking; The detection camera detects the surface of the apple, adopts the Yolo object detection method, collects data sets for model training, and uses the segmentation algorithm to separate the apple from the background; S2. Calculate the diameter of the apple. Select A4 paper as a reference. Place the apple on a flat A4 paper. Use the detection camera to take a photo of the apple and the paper. Then use the original image as input and use the image compression algorithm to obtain the pixel size occupied by the A4 paper in the image. The actual size of the A4 paper is known. The actual size of the unit pixel in the picture is converted and recorded as the fixed pixel size. Calculate the pixel size occupied by the apple in the image, and then multiply the pixel size occupied by the apple in the image by the fixed pixel size obtained previously to get the actual diameter of the apple; S3, analyzing the coloration of the apple. The coloration is defined as the ratio of the red coloration area on the apple surface to the surface area of ​​the fruit. The coloration is obtained by calculating the ratio of the number of red pixels on the apple surface in each frame image to the total number of pixels on the apple surface. S4. After obtaining the apple diameter and coloring, build an apple grading model according to the apple grading reference standard, write the corresponding judgment statement code on the PC to meet the output requirements corresponding to each grade, and the code includes multi-target tracking algorithm code and target detection algorithm code. Deploy the target detection algorithm code and multi-target tracking algorithm code on the embedded development board; S5, placing the apple on the right side of the conveyor belt, starting the first drive motor and the second drive motor, the first drive motor drives the first drive gear to rotate through the chain, and then drives the first rotating shaft to rotate; The second driving motor drives the second driving gear to rotate through the chain, thereby driving the second rotating shaft to rotate; The rotation speeds of the first rotating shaft and the second rotating shaft are set to be different, thereby generating a rotation speed difference between adjacent conveyor belts, so that the apples rotate during transportation; the rotation speed of the first drive motor is adjusted by adjusting the first speed regulating box, and the rotation speed of the second drive motor is adjusted by adjusting the second speed regulating box, so that the conveyor belts have different rotation speed differences, resulting in different rotation effects of the apples. After the apples are transported to the left side of the conveyor belt, they are transported out through the discharge plate.

Citation Information

Patent Citations

  • Method for calculating rotation angle of apple by using stem images of apple

    CN103177434A

  • Online nondestructive testing method for internal and external quality of apples

    CN111076670A

  • Online detection and positioning device for fruits

    CN111112114A

  • Production line for sterilizing and conveying picked fruits

    CN116406701A

  • Treatment equipment used before Chinese date frying

    CN212820945U

Cited By

  • Lightweight peanut pod detection and grading method and system based on improved YOLO model

    CN120997190A