Agaricus bisporus group classification method and automatic picking strategy of agaricus bisporus
By using a mushroom group classification method based on overlap rate and density, the problems of high damage rate and difficulty in the automatic harvesting of button mushrooms were solved, achieving efficient and low-damage mushroom group harvesting and improving the intelligence level of the automatic harvesting system.
Patent Information
- Application Number
- CN202310547606.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-12
- Publication Date
- 2025-12-23
- Estimated Expiration
- 2043-05-12
AI Technical Summary
In the current automated harvesting process for button mushrooms, the high rate of damage and difficulty in harvesting are due to the dense and overlapping nature of the mushroom clusters.
A classification method for Agaricus bisporus based on overlap rate and density was adopted. Images of the mushroom groups were acquired through a vision system, and the improved DBSCAN clustering algorithm and overlap rate index were used to classify the mushroom groups into three categories: overlapping mushroom groups, dense mushroom groups, and scattered mushroom groups. Harvesting priorities and path planning were determined based on the classification results.
It reduces the damage rate of mushrooms during harvesting, improves harvesting efficiency, reduces the rate of missed detection and false detection, and contributes to the intelligent development of automated harvesting systems.
Smart Images

Figure CN116597307B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of Agaricus bisporus automatic picking, in particular to an Agaricus bisporus group classification method based on overlap rate and density and an Agaricus bisporus automatic picking strategy. BACKGROUND
[0002] Agaricus bisporus is a common edible fungus. Agaricus bisporus has very high nutritional and medicinal value and can be processed into various foods, health products, and even drugs, and has very high economic value.
[0003] At present, Agaricus bisporus cultivation has realized large-scale factory production. Temperature raising, temperature lowering, ventilation, and humidification equipment need to be installed in the factory mushroom house, and the conditions of temperature and humidity, ventilation, and light can be automatically or semi-automatically controlled. The production is not limited by seasons, and mushrooms can be produced every day, all year round, with high yield and good benefits. The factory mushroom house is generally 20-30 meters long, 6-10 meters wide, and 5-6 meters high. Two to four rows of multi-layer bed frames can be arranged in the length direction of the mushroom house. The bed frame is usually made of metal structural section, with a bed width of 1-1.6 meters, 5-6 layers, and a layer spacing of 50-70 centimeters. The distance between the lowest layer of the bed frame and the ground is about 30 centimeters, and the distance between the uppermost layer and the roof is more than 1 meter. The passage between the bed frames is 80-100 centimeters wide, and the passage between the bed frame and the wall is 40-80 centimeters wide.
[0004] After Agaricus bisporus grows and matures, it is automatically picked by an automatic picking robot, saving labor, improving efficiency, and reducing costs. Referring to the granted utility model patent with the publication number CN212279177U and the name of "an automatic picking robot", and the invention application with the publication number CN 113940239A and the name of "an intelligent picking system", the main working process of automatic picking is that the suction cup moves vertically downward to the cap position of Agaricus bisporus, then sucks the cap, then the suction cup rotates a certain angle and twists, and finally the suction cup moves vertically upward to complete picking.
[0005] However, the growth of Agaricus bisporus colonies is random, and Agaricus bisporus has unique growth characteristics. On the one hand, it is colony growth. Agaricus bisporus exists in the form of mycelium, and the mycelium can be connected to form a large colony. In a suitable environment, the mycelium of Agaricus bisporus will rapidly proliferate and spread to form a dense mycelial network. The mycelium is intertwined and closely attached to each other, forming an interlaced and overlapping growth state. On the other hand, it is spore production characteristics. In a suitable environment, Agaricus bisporus can rapidly produce a large number of fruiting bodies, thereby realizing rapid population expansion. The above growth characteristics determine that the Agaricus bisporus colony will form a tight colony growth state (i.e. the Agaricus bisporus colony grows in clusters). The size, shape and density of the Agaricus bisporus colony are diverse, and there is mutual compression and stacking between adjacent mushrooms. It can be seen that the dense and stacked characteristics of Agaricus bisporus increase the difficulty of automatic picking, mainly in the following aspects:
[0006] (1) If the picking strategy is determined according to the shortest total path or the shortest picking time, there are two picking sequences. Referring to Figure 13 , the first picking sequence is 1→2→3→4, but it will cause the suction cup to collide with 2 and cause damage to 2 when picking 1, and the suction cup will collide with 4 and cause damage to 4 when picking 3. The second picking sequence is 4→3→2→1, but it will cause the suction cup to collide with 2 and cause damage to 2 when picking 3. It can be seen that the damage rate is large.
[0007] (2) If the picking strategy is to pick Agaricus bisporus in the central area first, due to the tight growth of Agaricus bisporus, the Agaricus bisporus in the central area is squeezed by the surrounding Agaricus bisporus, and the friction increases. If the conventional negative pressure value is used when the suction cup is picked, it will cause the Agaricus bisporus to be unable to be picked successfully. If the negative pressure value exceeding the standard value is output, it is easy to cause damage to the surface of the cap. Referring to Figure 14 , in this Agaricus bisporus colony, if 6 is picked first, the friction of the surrounding 6 Agaricus bisporus needs to be overcome, and the picking difficulty is extremely great. If 1 is picked from the edge of the Agaricus bisporus, only the friction of the surrounding 3 Agaricus bisporus needs to be overcome. SUMMARY
[0008] The present application is to solve the technical problems of large damage rate and great picking difficulty in the existing automatic picking process of Agaricus bisporus due to the dense and stacked characteristics of Agaricus bisporus, and provides an Agaricus bisporus colony classification method based on overlapping rate and density and an automatic picking strategy for Agaricus bisporus.
[0009] The present application provides an Agaricus bisporus colony classification method based on overlapping rate and density, comprising the following steps:
[0010] Firstly, the image of Agaricus bisporus is obtained through a vision system;
[0011] Secondly, the density-based clustering algorithm is used to divide the whole double-spore mushrooms in the image into clusters, and the discrete double-spore mushrooms filtered in the clustering process are classified as discrete mushroom groups;
[0012] Thirdly, the clustering algorithm based on the overlap rate index is used to divide the double-spore mushroom groups after clustering into three categories, the double-spore mushroom groups with an average overlap rate exceeding a pre-set threshold are classified as overlapping mushroom groups, the double-spore mushroom groups with an average overlap rate lower than the pre-set threshold but an average overlap rate greater than 0 are classified as dense mushroom groups, and the double-spore mushroom groups with an average overlap rate of 0 are classified as discrete mushroom groups.
[0013] Preferably, the process of the second step is:
[0014] The whole double-spore mushrooms in the image are divided into clusters by the DBSCAN clustering algorithm:
[0015] In step S201, the xy position information of the double-spore mushrooms is stored in the data set, and the format is as follows:
[0016] x1, y1
[0017] x2, y2
[0018] ………
[0019] In step S202, a set M is generated, including all double-spore mushrooms, and a data point P that has not been visited is randomly selected;
[0020] In step S203, it is determined whether P is a core object, if yes, step S204 is entered, and if not, the P point is marked as a noise point;
[0021] In step S204, all data points within a radius of ε centered on P are found, and the boundary points are added to cluster A;
[0022] In step S205, the MinPts core points closest to P are retained, and the MinPts points are added to the current cluster A, and the distance α from the farthest point of the MinPts points to P is taken as the distance, and then α is used to replace ε as the neighborhood radius for screening;
[0023] In step S206, it is determined whether there is an unvisited core point in cluster A, if yes, step S204 is returned, that is, the other core points in the current cluster A are taken as the centers to perform diffusion search, and steps S204 and S205 are repeated;
[0024] In step S207, when all points in the current cluster are visited or no point meets the MinPts requirement, the growth of the cluster is ended, and step S202 is returned to continue to find a new core object.
[0025] In step S208, the clustering process is ended until all data points are visited.
[0026] Preferably, the process of the third step is:
[0027] Step (1), traversing each Agaricus bisporus group of the clustered N Agaricus bisporus groups;
[0028] Step (2), detecting whether there is overlapping Agaricus bisporus in the Agaricus bisporus group, if there is overlapping, then performing step (3), if there is no overlapping, then classifying the Agaricus bisporus group as a dispersed Agaricus bisporus group;
[0029] Step (3), using mathematical geometry method to calculate the overlapping area of Agaricus bisporus, according to the position and size information of Agaricus bisporus, mathematical modeling is performed, the left circle represents an Agaricus bisporus, and the right circle represents an Agaricus bisporus, and the right circle is located above the left circle; the included angles a1 and a2 at the centers of the two circles are calculated by using the cosine theorem (a 2 +b 2 +c 2 -2bc(cosA)), then the sector area S1 of the left circle is calculated by using the sector area calculation formula S = 1 / 2 sinB*ac, the sector area S2 of the right circle is calculated, then the areas A1 and A2 of the triangles in the left and right circles are calculated by using the Heron formula A = sqrt(p(p-a)(p-b)(p-c)), and finally the intersection area of the two circles, i.e. the intersection area of the two Agaricus bisporus, is calculated by using the formula (S1-A1)+(S2-A2);
[0030] Step (4), calculating the overlapping rate of Agaricus bisporus individuals, when Agaricus bisporus m blocks Agaricus bisporus n, i.e. Agaricus bisporus m is located above Agaricus bisporus n, the overlapping rate of Agaricus bisporus m individuals is calculated by using the following formula:
[0031]
[0032] In the above formula, C m represents the overlapping rate of Agaricus bisporus m individuals, S mn represents the intersection area of Agaricus bisporus m and n, and S m represents the area of Agaricus bisporus m;
[0033] Step (5), calculating the average overlapping rate of the Agaricus bisporus group by using the following formula,
[0034]
[0035] In the formula, the parameters have the following meanings:
[0036] C: the average overlapping rate of the Agaricus bisporus group
[0037] C m : the overlapping rate of the Agaricus bisporus individuals in the Agaricus bisporus group with overlapping relationship
[0038] m: the number of overlapping Agaricus bisporus in the mushroom group;
[0039] Step (6), if the average overlap rate C is greater than or equal to the pre-set threshold, it is classified as an overlapping mushroom group, and if the average overlap rate C is less than the pre-set threshold and greater than 0, it is classified as a dense mushroom group.
[0040] Preferably, in step (2), the Agaricus bisporus is identified by the YOLOv5 target detection algorithm, the normalized coordinates in the identification result are converted to pixel coordinates, and then converted to actual values in the robot coordinate system, and then the center point XY coordinates and the radius of the Agaricus bisporus are calculated, and then the two Agaricus bisporus are traversed, and if the distance between the centers of the two Agaricus bisporus is less than or equal to the sum of the two radii, it is considered that there is overlap; if the distance between the centers of all Agaricus bisporus is greater than the sum of the two radii, it is considered that there is no overlap.
[0041] The application also provides an automatic picking strategy for Agaricus bisporus, characterized by comprising the following steps:
[0042] Firstly, an image of Agaricus bisporus is obtained by a visual system;
[0043] Secondly, the entire Agaricus bisporus in the image is divided into clusters based on a density index clustering algorithm, and the discrete Agaricus bisporus filtered out in the clustering process is classified as a discrete mushroom group;
[0044] Thirdly, the clustered Agaricus bisporus groups are divided into three categories by a classification algorithm based on an overlap rate index, Agaricus bisporus groups with an average overlap rate exceeding a pre-set threshold are classified as overlapping mushroom groups, Agaricus bisporus groups with an average overlap rate lower than the pre-set threshold but an average overlap rate greater than 0 are classified as dense mushroom groups, and Agaricus bisporus groups with an average overlap rate of 0 are classified as discrete mushroom groups;
[0045] Fourthly, the picking priorities of the three types of Agaricus bisporus are determined as: discrete mushroom group, dense mushroom group, and overlapping mushroom group.
[0046] Preferably, for the discrete mushroom group, a picking planning algorithm with the shortest time or the shortest picking path is used for planning.
[0047] For the dense mushroom group, a picking method of spiraling inward from the edge is selected.
[0048] The application has the beneficial effects of efficiently identifying the overlapping and dense states of Agaricus bisporus, and then planning the picking path accordingly. At the same time, it can also reduce the missed detection rate and the false detection rate.
[0049] The application can reduce the damage rate of Agaricus bisporus picking, make picking easier, and improve picking efficiency.
[0050] The application is conducive to the intelligent development of automatic picking systems.
[0051] Further features and aspects of the present application will be described in the detailed description that follows, with reference to the accompanying drawings. BRIEF DESCRIPTION OF DRAWINGS
[0052] Figure 1 is an image of overlapping mushroom groups;
[0053] Figure 2 is an image of dense mushroom groups;
[0054] Figure 3 is an image of scattered mushroom groups;
[0055] Figure 4 is an image of Agaricus bisporus groups;
[0056] Figure 5 is a general flowchart of the classification method of Agaricus bisporus groups according to the overlapping rate and density;
[0057] Figure 6 is a flowchart of the conventional DBSCAN clustering algorithm;
[0058] Figure 7 is a flowchart of the improved DBSCAN clustering algorithm;
[0059] Figure 8 is a flowchart of the classification algorithm based on the overlapping rate index;
[0060] Figure 9 is a geometric figure of two overlapping Agaricus bisporus;
[0061] Figure 10 is Figure 9 is a schematic diagram in which the edge O1A, the edge O1B and the arc-shaped edge AB form a sector area;
[0062] Figure 11 is Figure 9 is a schematic diagram in which the edge O2A, the edge O2B and the arc-shaped edge AB form a sector area;
[0063] Figure 12 is experimental data between the overlapping rate of Agaricus bisporus and the success rate of picking;
[0064] Figure 13 is a schematic diagram of the positional relationship and picking order of four Agaricus bisporus;
[0065] Figure 14 is a schematic diagram of 12 Agaricus bisporus growing together densely;
[0066] Figure 15 is a schematic diagram of the picking method of dense mushroom groups;
[0067] Figure 16 is an original image of Agaricus bisporus;
[0068] Figure 17 is the image after recognition and positioning;
[0069] Figure 18 is the image after clustering. DETAILED DESCRIPTION
[0070] The application will be further described in detail below with specific examples with reference to the accompanying drawings.
[0071] According to the unique growth characteristics of Agaricus bisporus, the Agaricus bisporus groups are divided into three categories according to the overlap rate and density:
[0072] The first category is the Agaricus bisporus group with serious overlap phenomenon in dense growth (hereinafter referred to as the overlapping mushroom group), as shown in FIG. 1. Figure 1
[0073] The second category is the Agaricus bisporus group with less or no overlap in dense growth (hereinafter referred to as the dense mushroom group), as shown in FIG. 2. Figure 2
[0074] The third category is the Agaricus bisporus group with low density and small overlap rate (hereinafter referred to as the dispersed mushroom group), as shown in FIG. 3. Figure 3
[0075] Figure 4 It is shown that the upper left corner area is the first category of overlapping mushroom group, the right area is the first category of overlapping mushroom group, the middle lower area is the second category of dispersed mushroom group, and the middle upper area is the third category of dispersed mushroom group.
[0076] Referring to Figure 5 , the Agaricus bisporus group classification method mainly includes the following steps:
[0077] Firstly, the image of Agaricus bisporus is obtained through a visual system.
[0078] Secondly, the whole Agaricus bisporus in the image is divided into clusters based on the density index clustering algorithm, and the dispersed Agaricus bisporus filtered out in the clustering process is classified as a dispersed mushroom group.
[0079] Referring to Figure 6 , DBSCAN is a density-based clustering algorithm that can divide data points into different clusters. It describes the density of data points by defining "core points", "boundary points" and "noise points". Based on (ε, MinPts), the boundary of the cluster is determined, where ε represents the neighborhood radius threshold of a certain point, and for x j ∈D, its ε neighborhood is all samples in the data set D that are not greater than ε from x j , that is, N ε (x j )={x i ∈D|dist(x i ,x j MinPts represents the minimum number of sample points within a circle centered at a given point and with radius ε.
[0080] The DBSCAN algorithm categorizes data points into the following three classes:
[0081] Key point: If x i There exist at least MinPts sample points within a circle centered at ε, i.e., |N|. ε (x i If x ≥ MinPts, then point x is called a point. i The core point.
[0082] Boundary point: If x i The number of sample points within a circle centered at ε and with radius ε is less than MinPts, i.e., |N ε (x i If x| < MinPts, but it is within the neighborhood radius of other core points in the sample, then point x is called a point x. i These are boundary points.
[0083] Noise points: Points in the sample that are neither core points nor boundary points.
[0084] The core concepts of the DBSCAN algorithm include:
[0085] Directly Density Reachable: If data points p and q are both core points, and q is within the ε-neighborhood of p, then the data point is said to be directly density reachable from the data point p.
[0086] Density Reachable: If a series of core points p exists... i,1 ,p i,2 ,...,p i,n-1 ,p i,n , and p i,j+1 By p i,j If the direct density is attainable, then it is called p. i,n By p i,1 Density can be achieved.
[0087] Density Connected: If there exists a sample point m such that for sample points p and q, p and q are both directly density-reachable from m, then p and q are said to be density connected.
[0088] The core idea of the DBSCAN algorithm is: if the number of data points within a given radius exceeds a certain threshold, the region is considered a cluster; otherwise, the region is considered noise.
[0089] It can be seen that the conventional DBSCAN algorithm needs to manually set two parameters, radius epsilon and minimum sample number MinPts, the values of the two parameters have a great influence on the final clustering result, and the values are different for different data sets, and certain experience and experiments are needed to determine them.
[0090] When facing the clustering problem of Agaricus bisporus, due to the disordered growth characteristics of Agaricus bisporus, the density difference between the mushroom groups is large, and the conventional DBSCAN algorithm sometimes has the problem of low clustering success rate due to improper value of radius epsilon, that is, for data with uneven distribution and data with large density change, the clustering effect may not be good. In order to improve the clustering effect as much as possible, the application provides an improved DBSCAN clustering algorithm, as shown in Figure 7 The core idea of the algorithm is to change the neighborhood range of the core point. Still presetting the value of epsilon, after randomly selecting an unclassified point p in the data set, if p is determined to be a core point, that is, there are at least MinPts core points in the circle with p as the center and epsilon as the radius, then only MinPts core points in the neighborhood of p are retained, the value of alpha is the distance from p to the farthest core point in the neighborhood, and then alpha replaces epsilon to screen at the point p.
[0091] Therefore, the specific process of dividing all Agaricus bisporus in the image into clusters by the improved DBSCAN clustering algorithm is:
[0092] Step S201, store the xy position information of Agaricus bisporus in the data set, and the format is as follows:
[0093] x1, y1
[0094] x2, y2
[0095] ...
[0096] Step S202, generate a set M including all Agaricus bisporus. Randomly select an unvisited data point P.
[0097] Step S203, determine whether P is a core object, if yes, go to step S204; if not, mark P as a noise point.
[0098] Step S204, find all data points within a radius of epsilon centered on P, and add the boundary points to cluster A;
[0099] Step S205, retain the MinPts core points closest to P, and add the MinPts points to the current cluster A. Take the distance alpha from the farthest point of the MinPts points to P, and then use alpha to replace epsilon as the neighborhood radius for screening.
[0100] Step S206, whether there is an unvisited core point in the cluster A, if yes, return to step S204; that is, the current cluster A in other core points as the center of the spread search, repeat step S204, S205.
[0101] Step S207, all points in the current cluster are visited, or no point meets the MinPts requirement, end the growth of the cluster, and return to step S202 to continue to find new core objects.
[0102] Step S208, until all data points are visited, the clustering process ends.
[0103] The improved DBSCAN algorithm only needs to input the approximate range of the eps parameter, and the subsequent algorithm can automatically adjust the neighborhood radius according to the density of the data, thereby automatically identifying the clustering structure, and can handle the case where the density of the data changes greatly, so it can cluster the different dense double-spore mushroom groups. All double-spore mushrooms will be divided into N double-spore mushroom groups and some discrete double-spore mushroom individuals. Some discrete double-spore mushroom individuals are double-spore mushrooms marked as noise points in the data set in step S203.
[0104] Third step, the double-spore mushroom groups after clustering are divided into three categories by the classification algorithm based on the overlap rate index. The double-spore mushroom group with an average overlap rate exceeding a pre-set threshold is classified as an overlapping mushroom group. The double-spore mushroom group with an average overlap rate lower than the pre-set threshold but an average overlap rate greater than 0 is classified as a dense mushroom group. The double-spore mushroom group with an average overlap rate of 0 is classified as a discrete mushroom group.
[0105] Reference Figure 8 , the specific process is:
[0106] Step (1), traverse each double-spore mushroom group of the N mushroom groups after clustering.
[0107] Step (2), detect whether there are overlapping double-spore mushrooms in the double-spore mushroom group. Specifically, identify the double-spore mushrooms by the YOLOv5 target detection algorithm, convert the normalized coordinates in the identification result to pixel coordinates, and then convert them to actual values in the robot coordinate system. Then calculate the center point XY coordinates and the double-spore mushroom radius. Then traverse the double-spore mushrooms two by two. If the distance between the centers of two double-spore mushrooms is less than or equal to the sum of the two radii, it means there is overlap. If the distance between the centers of all double-spore mushrooms is greater than the sum of the two radii, i.e. there is no overlap in the mushroom group, the double-spore mushroom group is classified as a discrete mushroom group. If there is overlap, proceed to step (3).
[0108] Step (3), use mathematical geometric methods to calculate the overlapping area of the double-spore mushrooms. According to the position and size information of the double-spore mushrooms, mathematical modeling is performed, such as Figure 9As shown, the left circle represents a double mushroom, and the right circle represents a double mushroom, with the right circle above the left circle (the right double mushroom above the left double mushroom); the angle a1 between the centers of the two circles and the angle a2 between the centers of the two circles are calculated using the cosine theorem (a 2 = b 2 + c 2 - 2bc (cos A), and then the sector area S1 of the left circle (the sector surrounded by O1, A, and B) is calculated using the sector area calculation formula S = 1 / 2 sin B * ac, the sector area S2 of the right circle (the sector surrounded by O2, A, and B) is calculated, and then the area A1 of the triangle in the left circle (i.e., the area of triangle O1AB) is calculated using the Heron formula A = sqrt (p (p-a) (p-b) (p-c)), the area A2 of the triangle in the right circle (i.e., the area of triangle O2AB) is calculated, and finally the intersection area of the two circles, i.e., the intersection area of the two double mushrooms (i.e., the area of the shaded part in Figure 10 ) is calculated using the formula (S1-A1) + (S2-A2). Figure 11 Figure 9
[0109] Step (4), calculate the overlap rate of double mushroom individuals. If the two double mushrooms m and n have an overlapping relationship, double mushroom m blocks double mushroom n, i.e., double mushroom m is above double mushroom n, the overlap rate of double mushroom m individuals is calculated as follows:
[0110]
[0111] In the above formula, C m represents the overlap rate of double mushroom m individuals, S mn represents the intersection area of double mushrooms m and n, and S m represents the area of double mushroom m.
[0112] For example, Figure 9 , the intersection area S 21 of the two double mushrooms is 4, and the area S2 of the right double mushroom is 50, so the overlap rate of the right double mushroom individuals is
[0113] Step (5), calculate the average overlap rate of the mushroom group using the following formula:
[0114]
[0115] In the above formula, the parameters have the following meanings:
[0116] C: average overlap rate of double mushroom group
[0117] C m : overlap rate of double mushroom individuals in double mushroom group with overlapping relationship
[0118] m: the number of overlapping Agaricus bisporus in the group
[0119] For example, Figure 9 In the middle, the overlap rate of the left Agaricus bisporus individual C1 = 10%, the average overlap rate of the two Agaricus bisporus C = 10% + 5% = 15%
[0120] Step (6), if the average overlap rate C is greater than or equal to the pre-set threshold, it is classified as an overlapping mushroom group, and if the average overlap rate C is less than the pre-set threshold and greater than 0, it is classified as a dense mushroom group.
[0121] Regarding the value of the pre-set threshold, ideally, for a mushroom group with high density, the overlap rate 0 should be used as the judgment condition to classify dense and overlapping mushroom groups. The classification of overlapping relationship is classified as an overlapping mushroom group, and the classification of non-overlapping relationship is classified as a dense mushroom group. However, in actual scenarios, due to the fact that the cap of Agaricus bisporus is not a standard circle and the precision error of the measuring equipment, we define the dense mushroom group as a mushroom group in which there are few individuals with overlapping relationships and the overlap rate is close to 0. The dense mushroom group is defined as a mushroom group in which there are many individuals with overlapping relationships and the overlap rate is large. Therefore, we need to pre-set an overlap rate value to distinguish between overlapping mushroom groups and dense mushroom groups.
[0122] In the exploration of the pre-set overlap rate, we found that when the overlap rate is less than a certain value, even if there is an overlapping relationship between the two Agaricus bisporus, picking the lower one first will not cause damage to the upper one, that is, the overlapping relationship does not affect the picking order of the two. Therefore, we conducted an experiment on the relationship between the overlap rate and the success rate of picking, and the experimental results are shown in Figure 12 , the left Y-axis is the success rate of picking, and the right Y-axis is the proportion of the overlap rate. Here, the success rate of picking refers to the undamaged picking, and the picking with damaged cap is not considered as successful picking.
[0123] From the experimental results, we can conclude that when the overlap rate exceeds about 5%, the wrong picking order will cause the success rate of picking to drop significantly. At the same time, we counted the proportion of Agaricus bisporus with different overlap rates in the overall overlapping Agaricus bisporus, and calculated the area to obtain a dividing line of 5.23%. The overlap rate of 0%-5.43% and the overlap rate greater than 5.43% each account for 50% of the total number of overlapping Agaricus bisporus.
[0124] Considering the success rate of picking and the proportion of the overlap rate, we select the overlap rate of 4.5% (4%-5%) as the dividing value between overlapping mushroom groups and dense mushroom groups. Compared with the ideal dividing value of 0 overlap rate, the reasonable increase in the judgment value increases the judgment range of the dense mushroom group, reduces the proportion of the highest picking difficulty overlapping mushroom group, reduces the running time of the subsequent picking planning algorithm, and improves the overall picking efficiency.
[0125] After the classification of the Agaricus bisporus groups, the picking strategy of the Agaricus bisporus is determined for the execution of the picking action. Based on the previous classification criteria of the Agaricus bisporus groups, the average picking time and the picking difficulty of the three types of Agaricus bisporus are considered, and the measurement index of the Agaricus bisporus picking is determined as the efficiency and the damage rate. Firstly, the global picking planning of the Agaricus bisporus is carried out based on the efficiency index, and the picking priority (order) of the three types of Agaricus bisporus is determined as: the scattered mushroom group (low picking difficulty), the dense mushroom group (large picking difficulty), and the overlapping mushroom group (the largest picking difficulty).
[0126] For the scattered mushroom group, the picking planning algorithm with the shortest time or the shortest picking path is used for planning.
[0127] For the dense mushroom group, since the friction between the Agaricus bisporus is large, the picking method of spiraling from the edge to the inside is selected according to Figure 15 , that is: 1→2→3→4→10→11→12→8→7→6→5→9.
[0128] For the overlapping mushroom group, the corresponding picking planning is carried out by considering the overlapping relationship between the overlapping Agaricus bisporus.
[0129] The above only describes the preferred embodiments of the present application and is not used to limit the present application. For those skilled in the art, the present application can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the scope defined by the claims of the present application shall be within the protection scope of the present application.
Claims
1. An overlapping rate and density-based Agaricus bisporus cluster classification method, characterized by, The method comprises the following steps: Step 1: Obtain the image of Agaricus bisporus through a vision system; Step 2: Divide all Agaricus bisporus in the image into clusters based on a density index clustering algorithm, and classify the discrete Agaricus bisporus filtered in the clustering process as a discrete mushroom group; and divide all Agaricus bisporus in the image into clusters through a DBSCAN clustering algorithm: Step S201: Store the xy position information of Agaricus bisporus in a data set in the following format: x1, y1 x2, y2 Step S202: Generate a set M including all Agaricus bisporus, and randomly select an unvisited data point P; Step S203: Determine whether P is a core object, if yes, proceed to step S204; if not, mark P as a noise point; Step S204: Find all data points with P as the center and a radius of MinPts, and add the boundary points to a cluster H; Step S205: Keep the one closest to P MinPts The core point is to... MinPts Each point is added to the current cluster H, and the following is taken: MinPts The distance from point P to the point farthest from point P among all points Then use replace Filter by neighborhood radius; Step S206: Determine whether there is an unvisited core point in the cluster H, if yes, return to step S204; that is, perform diffusion search with other core points in the current cluster H as the center, and repeat steps S204 and S205; Step S207: When all points in the current cluster are visited or no point meets the MinPts requirement, end the growth of the cluster, and return to step S202 to continue searching for a new core object; Step S208: Continue until all data points are visited, and end the clustering process; Step 3: Classify the clustered Agaricus bisporus groups into three categories through a classification algorithm based on an overlap rate index, classify the Agaricus bisporus group with an average overlap rate higher than a pre-set threshold as an overlapping mushroom group, classify the Agaricus bisporus group with an average overlap rate lower than the pre-set threshold but an average overlap rate greater than 0 as a dense mushroom group, and classify the Agaricus bisporus group with an average overlap rate of 0 as a discrete mushroom group; Step (1): Traverse each Agaricus bisporus group of the N mushroom groups after clustering; Step (2): Detect whether there is overlapping Agaricus bisporus in the Agaricus bisporus group, if yes, proceed to step (3), and if not, classify the Agaricus bisporus group as a discrete mushroom group; Step (3), using mathematical geometry method to calculate the overlapping area of Agaricus bisporus, according to the position and size information of Agaricus bisporus, mathematical modeling is carried out, the left circle represents an Agaricus bisporus, and the right circle represents an Agaricus bisporus, and the right circle is located above the left circle; using the cosine theorem Calculate the included angle α1, α2 at the center of the two circles, and then calculate the sector area through the sector area calculation formula Calculate the sector area of the left circle , calculate the sector area of the right circle , and then calculate the area of the triangle in the left circle through the Heron formula , calculate the area of the triangle in the right circle , and finally calculate the intersection area of the two circles through the formula , that is, the intersection area of the two Agaricus bisporus. Step (4): Calculate the overlap rate of an Agaricus bisporus individual, when Agaricus bisporus E blocks Agaricus bisporus F, that is, Agaricus bisporus E is above Agaricus bisporus F, the overlap rate calculation formula of the Agaricus bisporus E individual is as follows: ; In the above formula, denotes the overlap rate of the Agaricus bisporus E individuals, denotes the intersection area of the Agaricus bisporus E, F, denotes the area of the Agaricus bisporus E; Step (5): Calculate the average overlap rate of the mushroom group through the following formula, ; Wherein, the meanings of the parameters are as follows: : average overlap rate of Agaricus bisporus groups; : the overlapping rate of Agaricus bisporus individuals with overlapping relationship in the group of Agaricus bisporus; : Number of overlapping Agaricus bisporus in the mushroom population; Step (6), if the average overlap ratio is greater than or equal to a preset threshold, the mushroom group is classified as an overlapping mushroom group, and if the average overlap ratio is less than the preset threshold and greater than 0, the mushroom group is classified as a dense mushroom group.
2. The overlap ratio and density-based Agaricus bisporus cluster classification method of claim 1, wherein, In the step (2), Agaricus bisporus is identified through a YOLOv5 target detection algorithm, the normalized coordinates in the identification result are converted to pixel coordinates, and then converted to actual values in the robot coordinate system, and then the center point XY coordinates and the radius of Agaricus bisporus are calculated, and then all Agaricus bisporus are traversed, if the distance between the centers of two Agaricus bisporus is less than or equal to the sum of the two radii, it is considered that there is overlap; if the distance between the centers of all Agaricus bisporus is greater than the sum of the two radii, it is considered that there is no overlap.
3. A method of automatic picking of Agaricus bisporus mushrooms, characterized in that, The method comprises the following steps: Step 1: Obtain the image of Agaricus bisporus through a vision system; Secondly, the density-based clustering algorithm is used to divide the whole L. bisporus in the image into clusters, and the discrete L. bisporus filtered in the clustering process is classified as a discrete mushroom group; the DBSCAN clustering algorithm is used to divide the whole L. bisporus in the image into clusters: In step S201, the xy position information of L. bisporus is stored in the data set, and the format is as follows: x1, y1 x2, y2 In step S202, a set M is generated, including all L. bisporus, and a data point P that has not been visited is randomly selected; In step S203, it is determined whether P is a core object, if yes, step S204 is entered; if not, the P point is marked as a noise point; In step S204, all data points with P as the center and a radius of MinPts are found, and the boundary points are added to the cluster H; Step S205: Keep the one closest to P MinPts The core point is to... MinPts Each point is added to the current cluster H, and the following is taken: MinPts The distance from point P to the point farthest from point P among all points Then use replace Filter by neighborhood radius; In step S206, it is determined whether there is an unvisited core point in the cluster H, if yes, step S204 is returned; that is, the other core points in the current cluster H are taken as the center to perform diffusion search, and steps S204 and S205 are repeated; In step S207, when all points in the current cluster are visited or no point meets the MinPts requirement, the growth of the cluster is ended, and step S202 is returned to continue to find a new core object; In step S208, the clustering process is ended until all data points are visited; Thirdly, the classification algorithm based on the overlap rate index is used to classify the clustered L. bisporus groups into three categories, the L. bisporus group with an average overlap rate higher than a pre-set threshold is classified as an overlapping mushroom group, the L. bisporus group with an average overlap rate lower than the pre-set threshold but an average overlap rate greater than 0 is classified as a dense mushroom group, and the L. bisporus group with an average overlap rate of 0 is classified as a discrete mushroom group; In step (1), each L. bisporus group of the N mushroom groups after clustering is traversed; In step (2), it is detected whether there is overlapping L. bisporus in the L. bisporus group, if yes, step (3) is performed, and if not, the L. bisporus group is classified as a discrete mushroom group; Step (3), using mathematical geometry method to calculate the overlapping area of Agaricus bisporus, according to the position and size information of Agaricus bisporus, mathematical modeling is carried out, the left circle represents an Agaricus bisporus, and the right circle represents an Agaricus bisporus, and the right circle is located above the left circle; using the cosine theorem Calculate the included angle α1, α2 at the center of the two circles, and then calculate the sector area through the sector area calculation formula Calculate the sector area of the left circle , calculate the sector area of the right circle , and then calculate the area of the triangle in the left circle through the Heron formula , calculate the area of the triangle in the right circle , and finally calculate the intersection area of the two circles, that is, the intersection area of the two Agaricus bisporus, through the formula In step (4), the overlap rate of the L. bisporus individual is calculated, and the formula for calculating the overlap rate of the L. bisporus E individual is as follows when the L. bisporus E blocks the L. bisporus F, that is, the L. bisporus E is located above the L. bisporus F: ; In the above formula, represents the overlap rate of Agaricus bisporus E individuals, represents the intersection area of Agaricus bisporus E and F, represents the area of Agaricus bisporus E; In step (5), the average overlap rate of the mushroom group is calculated by the following formula, ; In which, the parameters represent the following meanings: : average overlap rate of Agaricus bisporus groups; : the overlapping rate of Agaricus bisporus individuals with overlapping relationship in the group of Agaricus bisporus; : Number of overlapping Agaricus bisporus in the mushroom population; Step (6), if the average overlap ratio is greater than or equal to a preset threshold, the mushroom group is classified as an overlapping mushroom group; if the average overlap ratio is less than the preset threshold and greater than 0, the mushroom group is classified as a dense mushroom group. Fourthly, the picking priority of the three types of L. bisporus is determined as follows: discrete mushroom group, dense mushroom group, and overlapping mushroom group.
4. The method of automatic picking of Agaricus bisporus mushrooms according to claim 3, characterized in that, For the discrete mushroom group, the picking planning algorithm with the shortest time or the shortest picking path is used for planning; for the dense mushroom group, the picking method of spiraling from the edge to the inside is selected.
Citation Information
Patent Citations
Intelligent picking system
CN113940239A
Automatic picking robot
CN212279177U
Method of rapidly recognizing stacked mushrooms by picking robot
CN107316043A
System and method for autonomous harvesting of mushrooms
CN113301797A