A machine vision-based method for grading fruit appearance quality and an automatic sorting device.
By acquiring fruit images from both top-down and bottom-up perspectives and stitching them together for grading, combined with feature point matching and chromaticity value analysis, the problem of existing devices being unable to acquire complete images has been solved, enabling efficient grading of miniaturized fruit sorting devices.
Patent Information
- Application Number
- CN202310980440.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-07
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2043-08-07
AI Technical Summary
Existing fruit sorting devices cannot guarantee the integrity of image acquisition, and the devices are too large to be suitable for the needs of small orchards and supermarkets.
Fruit images were acquired from both top-down and bottom-up perspectives. The images were stitched together using feature point matching and SVD decomposition algorithms. The fruit was graded based on HSV chromaticity values and maximum fruit diameter. A miniaturized fruit conveying and sorting device was also designed.
It achieves comprehensive detection of fruit appearance defects, is miniaturized, and is suitable for small orchards and supermarkets. It also boasts high grading accuracy, overcoming the inaccuracies of manual sorting.
Smart Images

Figure CN116984262B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of non-destructive testing and sorting technology for fruits, specifically a method for grading the appearance quality of fruits based on machine vision and an automatic sorting device. Background Technology
[0002] Fruit sorting is a crucial step before fruit sales. It primarily involves grading fruits based on their appearance and quality, and then packaging or categorizing them accordingly. Currently, fruit shops, supermarkets, and small orchards mostly rely on manual sorting for grading, which is inefficient and susceptible to subjective factors. With the advent of industrial cameras and the development of machine vision technology, machine vision-based fruit sorting devices are widely used in orchards and factories.
[0003] Utility model application No. 201921423127.9 proposes a fruit sorting and size grading packaging system based on machine vision and PLC control, including a host computer, a vision inspection unit, a slave computer, a vision screening and processing unit, a size grading unit, and several packaging units. The camera of the vision inspection unit is electrically connected to the host computer, and the camera cooperates with the rolling component of the vision inspection unit. As the fruit is rolled by the rolling component, the camera captures images from different positions. However, this device cannot guarantee that the captured images cover the entire fruit surface, and defects may be missed. Furthermore, most existing fruit sorting devices rely on long-distance transmission and multi-camera shooting to achieve full-surface detection, and multi-level sorting also relies on long transmission intervals. However, fruit sorting devices for small orchards and supermarkets require small size and complete detection. Therefore, this application proposes a fruit appearance quality grading method and an automatic sorting device based on machine vision. Summary of the Invention
[0004] To address the shortcomings of existing technologies, the technical problem this invention aims to solve is to provide a method for grading the appearance quality of fruits based on machine vision and an automatic sorting device.
[0005] The present invention solves the aforementioned technical problem by adopting the following technical solution:
[0006] A machine vision-based method for grading the appearance quality of fruits, characterized by the following steps:
[0007] Step 1: Collect images of the upper and lower parts of the fruit from both top and bottom views, and crop the target area of the images.
[0008] Step 2: Extract feature points from the image;
[0009] Step 3: Divide each image into a grid, and match the feature points in the grid corresponding to the last row of the upper half of the fruit's appearance image with the first row of the lower half of the fruit's appearance image to obtain several feature point pairs. These feature point pairs form a feature point set, completing the coarse matching of feature points.
[0010] The coarsely matched feature point pairs are filtered, and the two images are stitched together using the SVD decomposition algorithm based on the filtered feature point pairs to obtain the stitched image.
[0011] Step 4: Identify appearance defects based on the stitched image, and calculate the HSV color value and maximum diameter of the fruit to be graded; grade the fruit according to the HSV color value, maximum diameter, and whether there are defects.
[0012] Furthermore, in step three, two feature point pairs are randomly sampled from the feature point set, and the threshold T for separating in-home and out-of-home points is calculated using the least squares method. Feature point pairs are then sampled again from the feature point set, and the Euclidean distance t between the two feature points in the feature point pair is calculated. If t is greater than T, resampling is performed; otherwise, the feature point pair is added to the in-home point set Q. If the number of feature point pairs in the in-home point set Q is less than the set value, sampling continues until the number of feature point pairs in the in-home point set Q meets the requirements. The feature point pairs in the in-home point set Q are the selected feature point pairs.
[0013] Furthermore, in step four, if there are defects in the appearance, regardless of the HSV color value or the maximum fruit diameter, it is classified as a fourth-grade fruit; if there are no defects in the appearance, the maturity of the fruit to be graded is determined according to the HSV color value. If it is not fully ripe, regardless of the maximum fruit diameter, it is classified as a third-grade fruit; if it is fully ripe, it is classified as a first- or second-grade fruit according to the maximum fruit diameter. If the maximum fruit diameter is smaller than the average fruit diameter of the same type of fruit, it is classified as a second-grade fruit; otherwise, it is classified as a first-grade fruit.
[0014] This invention also provides an automatic fruit sorting device based on machine vision, including a fruit conveying component, a vision detection component, and a fruit sorting component; characterized in that the fruit conveying component conveys the fruit to be sorted to the fruit sorting component, and during the conveying process, the vision detection component captures the appearance images of the upper half and the lower half of the fruit to be sorted; wherein, the fruit sorting component includes a sorting roller, a roller shell, and a No. 3 stepper motor, the roller shell is provided with outlets for different grades of fruit, and the sorting roller is provided with different sorting zones; the sorting roller is rotatably installed inside the roller shell, and the sorting roller motor drives the sorting roller to rotate through chain drive, so that the fruit to be sorted is poured out from the corresponding outlet of the roller shell according to the grade.
[0015] Furthermore, the fruit conveying assembly includes a first support, a second support, a tray slide rail, a conveyor belt, a transparent fruit tray, and limiting blocks; two tray slide rails are symmetrically arranged on both sides of the first and second supports, and two conveyor belts are located at both ends of the tray slide rails; multiple transparent fruit trays are slidably installed on the two tray slide rails, and the transparent fruit trays are in contact with the conveyor belts, achieving sliding of the transparent fruit trays through friction; two limiting blocks are symmetrically installed in the middle of the first support for limiting the transparent fruit trays.
[0016] Furthermore, the visual inspection component includes a coaxial light source and an industrial camera; two industrial cameras are symmetrically mounted on the upper and lower parts of the first bracket, and coaxial light sources are symmetrically arranged on both sides of each industrial camera, with the two coaxial light sources on the same side of the first bracket facing each other.
[0017] Furthermore, the surface of the tray slide rail is provided with a full circumference of grooves, and the two sides of the transparent fruit tray are provided with rollers that cooperate with the grooves.
[0018] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0019] 1. This device acquires images of the upper and lower halves of the fruit from both top and bottom angles, ensuring complete coverage of the fruit surface and enabling comprehensive detection of surface defects. It integrates short-distance transmission, image acquisition, fruit grading, and sorting into a single unit, simplifying the device's structure and resulting in a smaller overall size. This facilitates disassembly and assembly, enabling miniaturized operation, making it particularly suitable for fruit shops, supermarkets, and small orchards.
[0020] 2. The tray slide rail has a full circumference groove, enabling the fruit tray to move in a vertical circular motion, rather than a horizontal one, further simplifying the device structure. The fruit tray moves by the friction between itself and the conveyor belt, and the push of the next fruit tray connects the previous one between the two conveyor belts, shortening the transmission distance.
[0021] 3. To ensure that the grading is based on the entire surface of the fruit, the two images need to be stitched together. To improve the stitching accuracy, during the image processing, not all feature points in the images are matched. Instead, the two images are divided into grids, and only feature points within the corresponding grids are matched. This reduces the false matching rate, improves the feature point matching efficiency, and facilitates rapid grading.
[0022] 4. Grading fruits by comprehensively considering three factors—maturity, size, and appearance defects (punctures, bruises, abrasions, russeting, etc.)—overcomes the drawbacks of inaccurate manual sorting. Attached Figure Description
[0023] Figure 1This is a schematic diagram of the overall structure of the present invention;
[0024] Figure 2 This is a side view of the present invention;
[0025] Figure 3 This is a schematic diagram of the fruit sorting component of the present invention;
[0026] Figure 4 This is a schematic diagram of the sorting roller of the present invention from one perspective;
[0027] Figure 5 This is a schematic diagram of the sorting roller of the present invention from another perspective;
[0028] Figure 6 This is a schematic diagram illustrating the installation of the transparent fruit tray and tray slide rail of the present invention;
[0029] Figure 7 This is a schematic diagram of the chain drive structure of the present invention;
[0030] In the image: 1. Fruit conveying component; 2. Visual inspection component; 3. Fruit sorting component;
[0031] 101. Support No. 1; 102. Support No. 2; 103. Tray slide rail; 104. Conveyor Belt No. 1; 105. Conveyor Belt No. 2; 106. Stepper Motor No. 1; 107. Stepper Motor No. 2; 108. Transparent Fruit Tray No. 1; 109. Transparent Fruit Tray No. 2; 110. Limiting block; 201. Coaxial Light Source No. 1; 202. Coaxial Light Source No. 2; 203. Coaxial Light Source No. 3; 204. Coaxial Light Source No. 4; 205. Industrial Camera No. 1; 206. Industrial Camera No. 2; 301. Stepper motor support; 302. Sorting roller; 303. Roller housing; 304. Sorting roller shaft; 305. Stepper Motor No. 3; 306. Drive sprocket; 307. Driven sprocket; 308. Chain;
[0032] 302-1, First sorting area; 302-2, Second sorting area; 303-1, Grade 1 fruit export; 303-2, Grade 2 fruit export; 303-3, Grade 3 fruit export; 303-4, Grade 4 fruit export. Detailed Implementation
[0033] Specific embodiments are given below with reference to the accompanying drawings. These specific embodiments are only used to further illustrate the technical solution of the present invention in detail and do not limit the scope of protection of this application.
[0034] This invention provides an automatic fruit sorting device based on machine vision (hereinafter referred to as the device, see below). Figures 1-7 The system includes a fruit conveying component 1, a visual inspection component 2, and a fruit sorting component 3.
[0035] The fruit conveying assembly 1 includes a first support 101, a second support 102, a tray slide rail 103, a first conveyor belt 104, a second conveyor belt 105, a first stepper motor 106, a second stepper motor 107, a transparent fruit tray, and a limiting block 110. The first support 101 and the second support 102 are spaced apart on the ground. The two tray slide rails 103 are symmetrically arranged on both sides of the first support 101 and the second support 102, and located in the middle of the first support 101. The first conveyor belt 104 and the second conveyor belt 105 are spaced apart at both ends of the tray slide rails 103. The two conveyor belts are rotatably connected to the inner sides of the two tray slide rails 103, respectively. The first stepper motor 106 drives the first conveyor belt 104, and the second stepper motor 107 drives the second conveyor belt 105. The process involves multiple transparent fruit trays sliding on two tray rails 103, simultaneously contacting either the first conveyor belt 104 or the second conveyor belt 105. The sliding of the transparent fruit trays is achieved through friction between the conveyor belts and the transparent fruit trays, transporting the fruit to the fruit sorting component 3. Two limiting blocks 110 are symmetrically installed in the middle of the first support 101. During forward movement, the transparent fruit trays can briefly stop at the limiting blocks 110, or continue forward through the limiting blocks 110. Only when the pushing force of the transparent fruit tray on the limiting blocks 110 reaches a certain magnitude can it smoothly pass through the limiting blocks 110; otherwise, it will be blocked by the limiting blocks 110, stopping the transparent fruit tray at the limiting blocks 110, facilitating the visual inspection component 2 to collect the appearance image of the fruit to be sorted.
[0036] The visual inspection component 2 includes a first coaxial light source 201, a second coaxial light source 202, a third coaxial light source 203, a fourth coaxial light source 204, a first industrial camera 205, and a second industrial camera 206. The first and second industrial cameras 205 and 206 are respectively fixed at the center of the upper and lower parts of the first support 101. The first and second coaxial light sources 201 and 202 are fixed to the upper part of the first support 101 and are symmetrical about the first industrial camera 205. The third coaxial light source 204... Coaxial light source 203 and coaxial light source 204 are fixed to the lower part of bracket 101 and are symmetrical about industrial camera 206. Coaxial light source 201 and coaxial light source 203 are directed towards each other. Similarly, coaxial light source 202 and coaxial light source 204 are directed towards each other. The light emitted by the four coaxial light sources is perpendicularly illuminating the fruit on the transparent fruit tray. Industrial camera 205 is used to capture the appearance image of the upper half of the fruit to be sorted, and industrial camera 206 is used to capture the appearance image of the lower half of the fruit to be sorted.
[0037] The fruit sorting assembly 3 includes a stepper motor bracket 301, a sorting roller 302, a roller housing 303, a sorting roller shaft 304, a third stepper motor 305, a drive sprocket 306, a driven sprocket 307, a chain 308, and an encoder (not shown in the figure). The roller housing 303 is fixed to the ground and located at the end of the tray slide rail 103 where the second conveyor belt 105 is mounted. Both ends of the sorting roller shaft 304 are rotatably connected to the roller housing 303. The sorting roller 302 is embedded inside the roller housing 303 and fixed to it. An encoder is installed on the sorting roller shaft 304 and the sorting roller 302 to detect the position of the sorting roller 302 in real time. The third stepper motor 305 is fixed on the stepper motor bracket 301. The driving sprocket 306 is fixed on the output shaft of the third stepper motor 305. The driven sprocket 307 is fixed on one end of the sorting roller shaft 304. The chain 308 is fitted on the driving sprocket 306 and the driven sprocket 307. The third stepper motor 305 drives the sorting roller 302 to rotate through the chain drive to achieve the sorting of fruits of different grades. The outer shell of the drum 303 is provided with symmetrical primary fruit outlets 303-1 and secondary fruit outlets 303-2, as well as symmetrical tertiary fruit outlets 303-3 and quaternary fruit outlets 303-4. The sorting drum 302 is provided with symmetrical first sorting zone 302-1 and second sorting zone 302-2. The outlets of the first sorting zone 302-1 correspond to the primary fruit outlets 303-1 and secondary fruit outlets 303-2 of the outer shell of the drum 303, respectively. The outlets of the second sorting zone 302-2 correspond to the tertiary fruit outlets 303-3 and quaternary fruit outlets 303-4 of the outer shell of the drum 303, respectively.
[0038] The tray slide rail 103 has a full circumference groove on its surface, allowing the transparent fruit tray to return to its initial position after moving to the end of the second conveyor belt 105 near the fruit sorting component 3, thus achieving the purpose of cyclically conveying fruit. The transparent fruit tray is made of flexible, light-transmitting material to prevent light scattering and ensure the quality of images captured by the camera. Rollers are provided on both sides of the transparent fruit tray, and the rollers cooperate with the grooves of the tray slide rail 103 to enable the transparent fruit tray to slide on the tray slide rail 103. The bottom of the transparent fruit tray is provided with friction blocks made of a high-friction coefficient material, which contact the first conveyor belt 104 or the second conveyor belt 105 to provide friction and enable the transparent fruit tray to slide.
[0039] The device also includes a host computer and a control cabinet (not shown in the figure). The control cabinet houses the power supply, motor drivers, and control boards. Images of the fruit's appearance captured by industrial cameras 205 and 206 are transmitted to the host computer, which stores a fruit grading computer program. This program is used to grade the fruit based on the appearance images. The host computer sends signals to the control boards, which in turn send control signals to the motor drivers, causing them to drive stepper motors 106, 107, and 305 to rotate, thus achieving fruit conveying and sorting. The host computer simultaneously receives position signals from the limit stop block 110 (transparent fruit tray) and from the encoder (sorting roller 302). The control cabinet is a single-layer cabinet measuring 94*149*133mm. The motor driver is a TB6600 model, and the control board is an STM32 model.
[0040] The first support 101, the second support 102, and the stepper motor support 301 are all made of aluminum profile. The width of the first conveyor belt 104 and the second conveyor belt 105 is 100mm. The industrial camera is a CCD camera, model MV-CE060-10UM, with a frame rate of 42.7fps, a resolution of 3072*2048 (approximately 6.3 million pixels), and a fixed-focus lens of MVL-HF3528M-6MP with a focal length of 35mm and a working distance of 18cm. The coaxial light source is model COL40, and the stepper motor is model 57HD2401.
[0041] This invention also provides a machine vision-based method for grading the appearance quality of fruits, comprising the following steps:
[0042] Step 1: Collect images of the upper and lower parts of the fruit from both top and bottom views; crop the target area of the image to make it occupy as much of the entire image as possible.
[0043] Step 2: Extract feature points from the image using the SIFT algorithm;
[0044] Step 3: Divide each image into a grid. Match the feature points in the grid corresponding to the last row of the upper half of the fruit's appearance image with the first row of the lower half of the fruit's appearance image to obtain several feature point pairs. These feature point pairs form a feature point set to complete the coarse matching of feature points and prevent errors caused by matching feature points with duplicate feature pairs.
[0045] An improved RANSAC algorithm is used to filter coarsely matched feature point pairs. Based on the filtered feature point pairs, the SVD decomposition algorithm is used to stitch the two images together to obtain a stitched image. Specifically, two feature point pairs are randomly sampled from the feature point set, and the Euclidean distance between the two feature points in the feature point pair is input into the least squares method to obtain the in-place / outside point separation threshold T. Feature point pairs are sampled again from the feature point set, and the Euclidean distance t between the two feature points in the feature point pair is calculated. If t is greater than T, resampling is performed; otherwise, the feature point pair is added to the in-place point set Q. If the number of feature point pairs in the in-place point set Q is less than a set value, sampling continues until the number of feature point pairs in the in-place point set Q meets the set value. The feature point pairs in the current in-place point set Q are the filtered feature point pairs.
[0046] Based on the selected feature point pairs, the SVD decomposition algorithm is used to stitch the two images together to create a single image, resulting in the stitched image.
[0047] Step 4: Based on the stitched image, calculate the HSV color value, maximum fruit diameter, and identify appearance defects of the fruit to be graded; grade the fruit according to the HSV color value, maximum fruit diameter, and whether there are defects.
[0048] If there are defects in appearance, regardless of HSV color value or maximum fruit diameter, the fruit is classified as a fourth-grade fruit. If there are no defects in appearance, the ripeness of the fruit to be graded is determined by the HSV color value. If it is not fully ripe, regardless of the maximum fruit diameter, it is classified as a third-grade fruit. If it is fully ripe, it is classified as a first- or second-grade fruit based on the maximum fruit diameter. If the maximum fruit diameter is smaller than the average fruit diameter of the same type of fruit, it is a second-grade fruit; otherwise, it is a first-grade fruit.
[0049] Taking Korla fragrant pear as an example, if there are no defects in appearance, and the arithmetic mean of the H component of the HSV color value is greater than 0.2, or the arithmetic mean of the S component is less than 0.6, or the arithmetic mean of the V component is less than 0.7, then the Korla fragrant pear to be graded is considered not fully ripe; otherwise, it is fully ripe. The average fruit diameter of Korla fragrant pear is 5.5cm.
[0050] The working principle and process of this device are as follows:
[0051] In this embodiment, two trays are set up, namely transparent fruit tray 108 and transparent fruit tray 109. The initial position of both transparent fruit trays is on conveyor belt 104. Fruits to be sorted are placed on the transparent fruit trays. Stepper motor 106 and stepper motor 106 are started to drive conveyor belt 104 and conveyor belt 105 to move, so that transparent fruit tray 108 and transparent fruit tray 109 move forward. When transparent fruit tray 109 moves to the limit block 110, it is blocked by the limit block 110 and stops. The host computer receives the signal from the limit block 110 and starts industrial camera 205 and industrial camera 206 to capture the appearance image of the fruit and transmit it to the host computer. The host computer reads the fruit grading computer program to perform image processing and analysis, and grades the fruit to be sorted. At the same time, the first transparent fruit tray 108 continues to move forward under the action of the first conveyor belt 104. After the image acquisition of the fruit on the second transparent fruit tray 109 is completed, the first transparent fruit tray 108 moves to contact the second transparent fruit tray 109 and pushes the second transparent fruit tray 109 smoothly through the limit block 110, so that the second transparent fruit tray 109 moves to the second conveyor belt 105. At the same time, the first transparent fruit tray 108 stops at the limit block 110 to acquire images. The second transparent fruit tray 109 continues to move forward under the action of the second conveyor belt 105 and reaches above the sorting roller 302.
[0052] The host computer controls the rotation direction and angle of the third stepper motor 305 based on the current grading results and the position of the sorting roller 302 when the last sorting task was completed, so that the fruit to be sorted is poured out from the corresponding outlet.
[0053] If the fruit to be sorted is Grade 1 fruit, when the sorting roller 302 is in its initial position (the first sorting area 302-1 of the sorting roller 302 is directly above), after the fruit enters the first sorting area 302-1 of the sorting roller 302, the third stepper motor 305 drives the sorting roller 302 to rotate counterclockwise by a certain angle (120°), so that the outlet of the first sorting area 302-1 of the sorting roller 302 corresponds to the Grade 1 fruit outlet 303-1 of the roller shell 303, and the fruit to be sorted is poured out from the Grade 1 fruit outlet 303-1 of the roller shell 303; when the sorting roller 302 is in position... At the primary fruit outlet position, stepper motor 305 drives sorting roller 302 to rotate clockwise by a certain angle (120°), rotating the first sorting area 302-1 to the top. After the fruit enters the first sorting area 302-1 of sorting roller 302, stepper motor 305 drives sorting roller 302 to rotate counterclockwise by a certain angle (120°), causing the fruit to be sorted to pour out from the primary fruit outlet 303-1 of roller shell 303. When sorting roller 302 is at the secondary fruit outlet position, stepper motor 305 drives sorting roller 302 to rotate counterclockwise. After the fruit to be sorted enters the first sorting zone 302-1 of the sorting roller 302, the third stepper motor 305 drives the sorting roller 302 to rotate counterclockwise by a certain angle (120°), causing the fruit to be sorted to pour out from the primary fruit outlet 303-1 of the roller shell 303; when the sorting roller 302 is at the tertiary fruit outlet position, the third stepper motor 305 drives the sorting roller 302 to rotate clockwise by a certain angle (60°), and after the fruit to be sorted enters the first sorting zone 302-1 of the sorting roller 302, the third stepper motor 305 drives... The sorting roller 302 rotates counterclockwise by a certain angle (120°) so that the fruit to be sorted is poured out from the first-stage fruit outlet 303-1 of the roller shell 303; when the sorting roller 302 is at the fourth-stage fruit outlet position, the third stepper motor 305 drives the sorting roller 302 to rotate counterclockwise by a certain angle (60°). After the fruit to be sorted enters the first sorting area 302-1 of the sorting roller 302, the third stepper motor 305 drives the sorting roller 302 to rotate counterclockwise by a certain angle (120°) so that the fruit to be sorted is poured out from the first-stage fruit outlet 303-1 of the roller shell 303.
[0054] If the fruit to be sorted is grade II fruit, when the sorting roller 302 is in its initial position, after the fruit enters the first sorting zone 302-1 of the sorting roller 302, the third stepper motor 305 drives the sorting roller 302 to rotate clockwise by a certain angle (120°), so that the outlet of the first sorting zone 302-1 of the sorting roller 302 corresponds to the grade II fruit outlet 303-2 of the roller shell 303, and the fruit to be sorted is poured out from the grade II fruit outlet 303-2 of the roller shell 303; when the sorting roller 302 is in the grade I fruit outlet position, the third stepper motor 305... Stepper motor 305 drives sorting roller 302 to rotate counterclockwise by a certain angle (120°). After the fruit to be sorted enters the first sorting zone 302-1 of sorting roller 302, stepper motor 305 drives sorting roller 302 to rotate clockwise by a certain angle (120°), causing the fruit to be sorted to be poured out from the secondary fruit outlet 303-2 of roller shell 303. When sorting roller 302 is at the secondary fruit outlet position, stepper motor 305 drives sorting roller 302 to rotate counterclockwise by a certain angle (120°), and the fruit to be sorted enters the sorting zone. After the first sorting zone 302-1 of the sorting roller 302, the third stepper motor 305 drives the sorting roller 302 to rotate clockwise by a certain angle (120°), and the fruit to be sorted is poured out from the secondary fruit outlet 303-2 of the roller shell 303; when the sorting roller 302 is at the tertiary fruit outlet position, the third stepper motor 305 drives the sorting roller 302 to rotate clockwise by a certain angle (60°), and after the fruit to be sorted enters the first sorting zone 302-1 of the sorting roller 302, the third stepper motor 305 drives the sorting roller 302 to rotate clockwise. Move the roller 302 at a certain angle (120°) so that the fruit to be sorted is poured out from the secondary fruit outlet 303-2 of the roller shell 303; when the sorting roller 302 is at the fourth fruit outlet position, the third stepper motor 305 drives the sorting roller 302 to rotate counterclockwise at a certain angle (60°). After the fruit to be sorted enters the first sorting area 302-1 of the sorting roller 302, the third stepper motor 305 drives the sorting roller 302 to rotate clockwise at a certain angle (120°) so that the fruit to be sorted is poured out from the secondary fruit outlet 303-2 of the roller shell 303.
[0055] If the fruit to be sorted is grade 3 fruit, when the sorting roller 302 is in the initial position, the stepper motor 305 drives the sorting roller 302 to rotate clockwise by a certain angle (180°), rotating the second sorting area 302-1 of the sorting roller 302 to the top. After the fruit smoothly enters the second sorting area 302-2 of the sorting roller 302, the stepper motor 305 drives the sorting roller 302 to rotate clockwise by a certain angle (120°), so that the second sorting area 302-2 of the sorting roller 302 corresponds to the grade 3 fruit outlet 30 of the roller shell 303. 3-3, the fruit to be sorted is poured out from the third-level fruit outlet 303-3; when the sorting roller 302 is at the first-level fruit outlet position, the third stepper motor 305 drives the sorting roller 302 to rotate counterclockwise by a certain angle (60°). After the fruit smoothly enters the second sorting zone 302-2 of the sorting roller 302, the third stepper motor 305 drives the sorting roller 302 to rotate clockwise by a certain angle (120°), and the fruit to be sorted is poured out from the third-level fruit outlet 303-3; when the sorting roller 302 is at the second-level fruit outlet position, the third stepper motor 305 drives the sorting roller 302 to rotate counterclockwise by a certain angle (120°), and the fruit is poured out from the third-level fruit outlet 303-3; when the sorting roller 302 is at the second-level fruit outlet position, the third stepper motor 305 drives the sorting roller 302 to rotate counterclockwise by a certain angle (60°), and the fruit is poured out from the third-level fruit outlet 303-3. The sorting roller 302 rotates clockwise by a certain angle (60°). After the sorted fruit smoothly enters the second sorting zone 302-2 of the sorting roller 302, the third stepper motor 305 drives the sorting roller 302 to rotate clockwise by a certain angle (120°). After the sorted fruit is discharged from the third-grade fruit outlet 303-3, when the sorting roller 302 is at the third-grade fruit outlet position, the third stepper motor 305 drives the sorting roller 302 to rotate counterclockwise by a certain angle (120°). After the sorted fruit smoothly enters the second sorting zone 302-2 of the sorting roller 302, the third stepper motor 305 drives the sorting roller 302 to rotate counterclockwise by a certain angle (120°). Stepper motor 305 drives sorting roller 302 to rotate clockwise by a certain angle (120°), and the fruit to be sorted is poured out from the third-grade fruit outlet 303-3; when sorting roller 302 is at the fourth-grade fruit outlet position, stepper motor 305 drives sorting roller 302 to rotate clockwise by a certain angle (120°), and after the fruit to be sorted successfully enters the second sorting area 302-2 of sorting roller 302, stepper motor 305 drives sorting roller 302 to rotate clockwise by a certain angle (120°), and the fruit to be sorted is poured out from the third-grade fruit outlet 303-3.
[0056] If the fruit to be sorted is grade four fruit, when the sorting roller 302 is in the initial position, the stepper motor 305 drives the sorting roller 302 to rotate clockwise by a certain angle (120°), rotating the second sorting area 302-1 of the sorting roller 302 to the top. After the fruit smoothly enters the second sorting area 302-2 of the sorting roller 302, the stepper motor 305 drives the sorting roller 302 to rotate counterclockwise by a certain angle (120°), so that the second sorting area 302-2 of the sorting roller 302 corresponds to the grade four fruit outlet 30 of the roller shell 303. 3-4. The fruit to be sorted is poured out from the fourth-level fruit outlet 303-4. When the sorting roller 302 is at the first-level fruit outlet, the third stepper motor 305 drives the sorting roller 302 to rotate counterclockwise by a certain angle (60°). After the fruit smoothly enters the second sorting zone 302-2 of the sorting roller 302, the third stepper motor 305 drives the sorting roller 302 to rotate counterclockwise by a certain angle (120°), and the fruit to be sorted is poured out from the fourth-level fruit outlet 303-4. When the sorting roller 302 is at the second-level fruit outlet, the third stepper motor 305 drives the sorting roller 302 to rotate counterclockwise by a certain angle (120°), and the fruit is poured out from the fourth-level fruit outlet 303-4. The sorting roller 302 rotates clockwise by a certain angle (60°). After the sorted fruit smoothly enters the second sorting zone 302-2 of the sorting roller 302, the third stepper motor 305 drives the sorting roller 302 to rotate counterclockwise by a certain angle (120°). After the sorted fruit is discharged from the fourth-grade fruit outlet 303-4, when the sorting roller 302 is at the third-grade fruit outlet position, the third stepper motor 305 drives the sorting roller 302 to rotate counterclockwise by a certain angle (120°). After the sorted fruit smoothly enters the second sorting zone 302-2 of the sorting roller 302, the third stepper motor 305 drives the sorting roller 302 to rotate counterclockwise by a certain angle (120°). Stepper motor 305 drives sorting roller 302 to rotate counterclockwise by a certain angle (120°), and the fruit to be sorted is poured out from the fourth-level fruit outlet 303-4; when sorting roller 302 is at the fourth-level fruit outlet position, stepper motor 305 drives sorting roller 302 to rotate clockwise by a certain angle (120°), and after the fruit to be sorted successfully enters the second sorting area 302-2 of sorting roller 302, stepper motor 305 drives sorting roller 302 to rotate counterclockwise by a certain angle (120°), and the fruit to be sorted is poured out from the fourth-level fruit outlet 303-4.
[0057] The rotation direction of the above sorting rollers is as follows: Figure 2 Based on.
[0058] Any aspects not covered in this invention are applicable to existing technologies.
Claims
1. A machine vision-based automatic fruit sorting device, comprising a fruit conveying component, a visual detection component, and a fruit sorting component; characterized in that, The fruit conveying component transports the fruit to be sorted to the fruit sorting component. During the conveying process, the vision detection component captures images of the upper and lower halves of the fruit to be sorted. The fruit sorting component includes a sorting roller, a roller housing, and a No. 3 stepper motor. The roller housing has outlets for different grades of fruit, and the sorting roller has different sorting zones. The sorting roller is rotatably installed inside the roller housing. The sorting roller motor drives the sorting roller to rotate via chain drive, causing the fruit to be sorted to pour out from the corresponding outlet of the roller housing according to its grade. The fruit conveying assembly includes a first support, a second support, tray rails, a conveyor belt, transparent fruit trays, and limiting blocks. Two tray rails are symmetrically arranged on both sides of the first and second supports, and two conveyor belts are located at both ends of the tray rails. Multiple transparent fruit trays are slidably mounted on the two tray rails, contacting the conveyor belts and sliding through friction. The bottom of each transparent fruit tray has friction blocks made of a high-friction-coefficient material. Two limiting blocks are symmetrically installed in the middle of the first support to limit the movement of the transparent fruit trays. The trays can only pass smoothly through the limiting blocks when the pushing force exerted by the transparent fruit tray on them reaches a certain level; otherwise, they will be stuck.
2. The automatic fruit sorting device based on machine vision according to claim 1, characterized in that, The vision inspection component includes a coaxial light source and an industrial camera; two industrial cameras are symmetrically mounted on the upper and lower parts of the first bracket, and coaxial light sources are symmetrically arranged on both sides of each industrial camera, with the two coaxial light sources on the same side of the first bracket facing each other.
3. The automatic fruit sorting device based on machine vision according to claim 1, characterized in that, The tray slide rail surface is provided with a full circumference of grooves, and the transparent fruit tray has rollers on both sides that cooperate with the grooves.
4. A machine vision-based method for grading the appearance quality of fruits using the apparatus described in any one of claims 1 to 3, characterized in that, The method includes the following steps: Step 1: Collect images of the upper and lower parts of the fruit from both top and bottom views, and crop the target area of the images. Step 2: Extract feature points from the image; Step 3: Divide each image into a grid, and match the feature points in the grid corresponding to the last row of the upper half of the fruit's appearance image with the first row of the lower half of the fruit's appearance image to obtain several feature point pairs. These feature point pairs form a feature point set, completing the coarse matching of feature points. The coarsely matched feature point pairs are filtered, and the two images are stitched together using the SVD decomposition algorithm based on the filtered feature point pairs to obtain the stitched image. Step 4: Identify appearance defects based on the stitched image, and calculate the HSV color value and maximum diameter of the fruit to be graded; grade the fruit according to the HSV color value, maximum diameter, and whether there are defects.
5. The method for grading fruit appearance quality based on machine vision according to claim 4, characterized in that, In step three, two feature point pairs are randomly sampled from the feature point set, and the threshold for separating local and in-local points is calculated using the least squares method. T Continue sampling feature point pairs from the feature point set and calculate the Euclidean distance between the two feature points in the feature point pair. t ,like t Greater than T If the feature point pair is positive, resample; otherwise, add the feature point pair to the local point set. Q If the set of local points Q If the number of feature point pairs in the sample is less than the set value, sampling continues until the set of inliers is reached. Q The number of feature point pairs in the set meets the requirements, and the set of local points is... Q The feature point pairs in the image are the selected feature point pairs.
6. The method for grading fruit appearance quality based on machine vision according to claim 4, characterized in that, In step four, if there are defects in appearance, regardless of HSV color value or maximum fruit diameter, the fruit is classified as grade four. If there are no defects in appearance, the ripeness of the fruit to be graded is determined according to the HSV color value. If it is not fully ripe, regardless of the maximum fruit diameter, it is classified as grade three. If it is fully ripe, it is classified as grade one or two according to the maximum fruit diameter. If the maximum fruit diameter is smaller than the average fruit diameter of the same type of fruit, it is grade two; otherwise, it is grade one.
Citation Information
Patent Citations
Fruit sorting and size grading packaging system based on machine vision and PLC control
CN210618577U
Automatic fruit sorting device based on machine vision
CN220559857U