Robot collaborative operation control method and system in edible mushroom planting process
By generating a refined task list through multi-dimensional environmental perception data and image recognition algorithms, and combining load balancing strategies and mature parameter mapping models, collaborative control instructions are dynamically generated. This solves the problems of low maturity determination and harvesting efficiency in existing edible mushroom cultivation systems, and achieves efficient and precise edible mushroom harvesting.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-25
- Publication Date
- 2026-03-17
AI Technical Summary
Existing edible mushroom cultivation systems have shortcomings in maturity determination, multi-robot load balancing, and harvesting parameter scheduling, resulting in low harvesting efficiency, high damage rate, uneven resource allocation, and a lack of closed-loop verification mechanism, which affects the overall harvest quality.
By collecting multi-dimensional environmental perception data through inspection robots, combining image recognition algorithms to determine maturity and generate a task list, the central control unit dynamically generates control instructions to coordinate the harvesting tasks, the harvesting robot provides feedback signals and triggers secondary imaging confirmation, and generates a supplementary harvesting list to achieve precise harvesting.
It enables precise determination of the maturity and density of edible fungi in different areas, improves harvesting efficiency, reduces mechanical damage, eliminates missed harvesting and residues, constructs a closed-loop control circuit, and achieves full-process automation and high reliability.
Smart Images

Figure CN121374656B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of edible fungi cultivation control, and particularly relates to a method and system for controlling robot collaborative operation during edible fungi cultivation. Background Technology
[0002] In modern edible mushroom cultivation, automated inspection and harvesting using robots has become a key technology for improving production efficiency. Existing systems typically rely on inspection robots to collect images of the mushroom bed and environmental data along a preset initial path. Based on this, they make a preliminary judgment on the maturity of the mushrooms, generate a harvesting task list, and schedule harvesting robots to perform the tasks. However, such systems still have significant shortcomings in practical applications. First, the maturity determination in the inspection stage largely relies on two-dimensional image features from a single perspective, lacking deep integration with three-dimensional spatial location, regional density, and growth prediction models. This results in insufficient accuracy in maturity assessment and difficulty in accurately identifying individuals and areas to be harvested. Second, the task generation and scheduling strategies do not fully consider real-time load balancing among multiple robots, dynamic path planning, and refined harvesting parameters matched to maturity levels, easily leading to high damage rates, low efficiency, and uneven resource allocation during harvesting. Furthermore, existing systems lack an effective closed-loop verification mechanism, failing to quickly confirm the effect and make re-harvesting decisions after harvesting, potentially leading to residue problems and affecting overall harvest quality and yield. These technical bottlenecks restrict the reliability, efficiency, and automation level of robot collaborative operation systems in complex planting environments. Summary of the Invention
[0003] To address the shortcomings of existing technologies, this invention proposes a robot collaborative operation control method and system for edible mushroom cultivation. The method includes: an inspection robot scanning the mushroom bed, using image recognition algorithms to determine the maturity of the edible mushrooms and calculate the harvest density in the area, generating a harvest task list; a central control unit dynamically generating coordinated harvest task control instructions based on the list and preset parameter tables and curves, including target coordinates, the number of robots, and the specific gripping posture, force, and lifting speed of each robot; after the harvesting robot responds to the instructions and executes the operation, it sends a signal to the nearest inspection robot and triggers secondary imaging for confirmation. If residues are found, a re-harvesting list is generated based on the residue density and the process is repeated, thereby achieving efficient, precise, and non-destructive automated collaborative harvesting of edible mushrooms.
[0004] To achieve the above objectives, the present invention provides the following technical solution:
[0005] Methods for controlling collaborative robot operations during edible mushroom cultivation include:
[0006] The inspection robot scans the mushroom bed along a preset initial path to collect environmental perception data of the edible fungi;
[0007] Based on the environmental perception data of edible fungi combined with image recognition algorithms, the maturity of at least one edible fungi is determined and the density of edible fungi to be harvested in a region is calculated, generating a list of tasks to be harvested that includes the coordinates of the area to be harvested, the maturity level, and the density of edible fungi to be harvested in the region; the environmental perception data of edible fungi includes at least one image of edible fungi and three-dimensional spatial information.
[0008] Based on the list of tasks to be picked, combined with the load balancing strategy and the preset maturity-clamping posture parameter table, maturity-clamping force curve and force-lifting speed curve, a coordinated picking task control instruction is generated; the coordinated picking task control instruction includes at least the target picking coordinates, the number of picking robots, and the corresponding clamping posture, clamping force and lifting speed control parameters for each picking robot.
[0009] In response to the coordinated harvesting task control command, the harvesting robot performs the harvesting operation with the end effector of the harvesting robot in the specified gripping posture, gripping force, and lifting speed. After harvesting, it sends a harvesting completion signal to the inspection robot closest to the harvesting area and triggers a secondary imaging confirmation of the harvesting area. If there are harvested residues, it generates a re-harvesting task list based on the density of residues to be harvested and repeatedly responds to the corresponding coordinated harvesting task control command.
[0010] Specifically, images and three-dimensional spatial information of edible fungi are collected, including:
[0011] S101. As the first inspection robot travels along the preset initial path in the preset world coordinate system, it continuously collects the first environmental perception data within the coverage area of the current preset initial path and the second environmental perception data outside the coverage area of the preset initial path and within the collection view range.
[0012] S102. Based on the second environmental perception data, the location of the second mushroom body region to be evaluated in the second environmental perception data is identified in real time through a lightweight convolutional neural network. At the same time, based on the location of the second mushroom body region to be evaluated and combined with an information sharing algorithm, the second inspection robot corresponding to the preset initial path to which the location of the second mushroom body region to be evaluated belongs is queried.
[0013] Specifically, collecting images and three-dimensional spatial information of edible fungi also includes:
[0014] S103. Based on the second environmental perception data, calculate the initial maturity discrimination score of the second mushroom body area to be evaluated; the initial maturity discrimination score is obtained based on the estimated density of mushrooms in the second mushroom body area to be evaluated, the Euclidean distance between the second mushroom body area to be evaluated and the current position of the inspection robot, and the edible fungus growth status predicted by the preset maturity growth prediction model, combined with the evaluation by the expert evaluation system.
[0015] S104. When the initial maturity discrimination score of at least one second mushroom body region to be evaluated exceeds the set threshold, the first inspection robot shares the second environmental perception data and the initial maturity discrimination score with the second inspection robot through the information sharing algorithm, based on the query obtained by the second inspection robot, and constructs the third environmental perception data of the second inspection robot by combining the first environmental perception data collected by the second inspection robot in real time.
[0016] Specifically, the process of obtaining the list of tasks to be picked includes:
[0017] Based on the third environmental perception data of any inspection robot, the images are arranged in the order of the collection timestamps to obtain the sequence of images to be identified, wherein each frame of the image is associated with the three-dimensional spatial information marker of the corresponding timestamp.
[0018] Each frame in the image sequence to be identified is subjected to coordinate mapping, interference suppression, feature repair, and inter-frame redundancy removal to obtain a complete inter-frame incremental region image sequence for any inspection robot; the length of the complete inter-frame incremental region image sequence is the same as the preset initial path length of the corresponding inspection robot.
[0019] Based on the complete inter-frame incremental region image sequence of any inspection robot, the standardized mushroom body region image is obtained through image size normalization processing.
[0020] Based on the standardized mushroom body region image, the improved YOLOv8 algorithm is used to detect mushroom targets and obtain the bounding box coordinates of each edible fungus.
[0021] Based on the bounding box coordinates of each edible fungus, a region image of a single fungus is obtained through a region segmentation algorithm, and the edge contour data of a single fungus is obtained through an edge detection algorithm based on the single fungus region image.
[0022] Based on the edge contour data of a single mushroom, the contour data of the cap and the stem are obtained through a contour segmentation algorithm.
[0023] Specifically, the process of obtaining the list of tasks to be picked also includes:
[0024] Based on the cap outline data, we obtained the cap diameter parameter, cap edge curvature parameter, cap color RGB mean parameter, and gill clarity parameter.
[0025] Based on the stipe outline data, the stipe height parameter is obtained through a height calculation algorithm;
[0026] Based on the bounding box coordinates of all edible fungi, the total number of edible fungi detected within the preset initial path is obtained through quantity statistics, and is recorded as the total count of mushroom bodies in the region.
[0027] Specifically, the process of obtaining the list of tasks to be picked also includes:
[0028] Based on the initial maturity score within the current preset initial path and the single mushroom feature parameter set extracted from the corresponding region, the maturity growth prediction model and the pre-trained expert evaluation system are used to obtain the maturity score and corresponding maturity level of edible fungi at each position within the preset initial path of any inspection robot; the single mushroom feature parameters include cap diameter parameter, cap edge curvature parameter, cap color RGB mean parameter, gill clarity parameter, and stem height parameter.
[0029] Based on the maturity level of edible fungi at each location within the preset initial path of any inspection robot, combined with the corresponding single mushroom feature parameters, the ratio of the similarity of the single mushroom feature parameters to the maturity score deviation is used as the cluster density parameter. An adaptive clustering algorithm is used to divide the preset initial path into regions to obtain the set of edible fungi evaluation clusters on the current preset initial path.
[0030] Based on the edible fungi evaluation cluster set on the current preset initial path and the preset harvesting evaluation threshold, the edible fungi evaluation cluster set to be harvested and the edible fungi evaluation cluster set to be matured are obtained.
[0031] Specifically, the process of obtaining the list of tasks to be picked also includes:
[0032] Based on the maturity score of each edible fungus assessment cluster to be harvested, the ratio of the number of edible fungus assessment clusters to the total number of mushrooms in the region, the preset edible fungus growth curve, and the expert evaluation algorithm, the harvesting priority of each edible fungus assessment cluster to be harvested is obtained.
[0033] Simultaneously, based on the number of edible fungi in each cluster of edible fungi to be harvested, the regional harvesting density of each cluster of edible fungi to be harvested is calculated.
[0034] By utilizing the harvesting priority of the edible fungi assessment clusters within each preset initial path, the corresponding regional harvesting density, and the location coordinates of the edible fungi assessment clusters, a harvesting task list is constructed for each preset initial path.
[0035] Specifically, generating coordinated harvesting task control instructions includes:
[0036] The system obtains the number and location coordinates of harvesting robots that are currently idle and in operation, as well as the predicted remaining working time of harvesting robots in the corresponding edible fungus assessment cluster. Through statistical algorithms, it obtains the number of harvesting robots to be scheduled in real-time, their corresponding coordinates, and the number of waiting harvesting robots to be scheduled, their corresponding waiting time lengths, and their corresponding coordinates. The remaining working time is predicted using an LSTM algorithm based on the historical average harvesting rate of harvesting robots, the remaining number of edible fungi in the corresponding edible fungus assessment cluster, and the number of currently working harvesting robots in the corresponding edible fungus assessment cluster.
[0037] Based on the real-time scheduling of the number of picking robots and their corresponding coordinates, the scheduling of the number of waiting picking robots and their corresponding waiting time and coordinates, combined with the list of tasks to be picked in each preset initial path, with the goal of minimizing travel time and picking task completion time, the optimal task allocation algorithm and load balancing algorithm are used to obtain the list of picking robot allocation labels and corresponding travel path parameters corresponding to each cluster of edible fungi to be picked.
[0038] Based on the list of assigned tags for each cluster of edible fungi to be harvested and the corresponding travel path parameters, combined with a fuzzy control algorithm, the optimal path instruction for each cluster of edible fungi to be harvested is generated. The optimal path instruction for each cluster of edible fungi to be harvested includes the number of harvesting robots assigned, the starting and ending points of each harvesting robot, the starting time point, and the travel time length.
[0039] Specifically, generating coordinated harvesting task control instructions also includes:
[0040] Based on the maturity score and corresponding maturity level of each edible fungus in the assessment cluster of edible fungi to be harvested, combined with the maturity-gripping posture parameter table, the gripping posture parameters of each harvesting robot in harvesting a single edible fungus in the current assessment cluster of edible fungi to be harvested are obtained.
[0041] Simultaneously, based on the maturity score and corresponding maturity level of each edible fungus in the assessment cluster of edible fungi to be harvested, combined with the maturity-gripping force curve, the gripping force parameters of each harvesting robot in harvesting a single edible fungus in the current assessment cluster of edible fungi to be harvested are obtained.
[0042] Based on the clamping force parameters of each picking robot when picking a single edible fungus in the current edible fungus assessment cluster, combined with the force-lifting speed curve, the picking and lifting speed control parameters of each picking robot when picking a single edible fungus in the current edible fungus assessment cluster are obtained.
[0043] Based on the clamping posture parameters, force parameters, and lifting speed control parameters of each picking robot when picking a single edible fungus in the current edible fungus evaluation cluster, combined with the PID control algorithm, the picking task control instructions for each picking robot are generated.
[0044] Based on the harvesting task control instructions of all harvesting robots and combined with simulation algorithms, the system is optimized and trained with the goal of minimizing the proportion of harvesting damage. This generates coordinated harvesting task control instructions for each edible fungus evaluation cluster to be harvested, enabling real-time harvesting control.
[0045] The robot collaborative operation control system in the edible fungi cultivation process includes: a data acquisition module, an identification module, an instruction module, a response module, and a feedback confirmation module;
[0046] The data acquisition module is used by the inspection robot to scan the mushroom bed along a preset initial path and collect environmental perception data of edible fungi.
[0047] The identification module, based on the environmental perception data of edible fungi and combined with image recognition algorithms, determines the maturity of at least one edible fungi and calculates the density of edible fungi to be harvested in a region, generating a list of tasks to be harvested that includes the coordinates of the area to be harvested, the maturity level, and the density of edible fungi to be harvested in the region; the environmental perception data of edible fungi includes at least one image of an edible fungi and its three-dimensional spatial information.
[0048] The instruction module generates coordinated harvesting task control instructions based on the list of tasks to be harvested, combined with a load balancing strategy and preset maturity-clamping posture parameter table, maturity-clamping force curve and force-lifting speed curve. The coordinated harvesting task control instructions include at least the target harvesting coordinates, the number of harvesting robots, and the corresponding clamping posture, clamping force and lifting speed control parameters for each harvesting robot.
[0049] The response module responds to the coordinated picking task control command, and performs the picking operation through the end gripper of the picking robot with the gripping posture, gripping force and lifting speed. After the picking is completed, it sends a picking completion signal to the inspection robot closest to the picking area.
[0050] The feedback confirmation module is used to trigger secondary imaging confirmation of the picking area. If there are picking residues, a re-picking task list is generated based on the density of the residues to be picked and the corresponding coordinated picking task control command is repeatedly responded to.
[0051] Compared with the prior art, the beneficial effects of the present invention are:
[0052] This invention addresses the shortcomings of existing technologies by using multi-dimensional environmental perception data collected by inspection robots to accurately determine and quantify the maturity of edible fungi and the density of mushrooms to be harvested in a given area. This generates a detailed task list containing spatial coordinates, maturity level, and distribution density. Furthermore, based on a load balancing strategy and a mature harvesting parameter mapping model, collaborative control commands are dynamically generated to precisely guide multiple harvesting robots to perform operations with optimal gripping posture, force, and speed, significantly improving harvesting efficiency and greatly reducing mechanical damage. Finally, through real-time feedback and secondary imaging confirmation mechanisms after harvesting, a closed-loop control loop of execution, verification, and re-harvesting is constructed, effectively preventing missed harvesting and residue issues. Overall, this invention achieves full automation, precision, and high reliability in the entire process of edible fungi harvesting operations, from perception and decision-making to execution. Attached Figure Description
[0053] Figure 1 This is a flowchart of the robot collaborative operation control method in the edible fungi cultivation process of the present invention;
[0054] Figure 2 This is a block diagram of the robot collaborative operation control system for the edible fungi cultivation process of the present invention. Detailed Implementation
[0055] Example 1
[0056] Please see Figure 1 The present invention provides an embodiment of a robot collaborative operation control method in edible fungi cultivation, comprising the following steps:
[0057] S1. The inspection robot scans the mushroom bed along a preset initial path to collect environmental perception data of edible fungi. It should be further explained that the preset initial path in this embodiment is obtained by those skilled in the art based on the current number of inspection robots and the size of the area to be inspected, combined with grid algorithms and simulation algorithms, with the goal of maximizing harvesting efficiency. The harvesting efficiency is constructed by the ratio of the real-time harvesting quantity to the quantity missed in secondary confirmation and the time length for completing the harvesting task.
[0058] S2. Based on the environmental perception data of edible fungi and combined with image recognition algorithms, determine the maturity of at least one edible fungi and calculate the density of edible fungi to be harvested in the region, and generate a list of tasks to be harvested that includes the coordinates of the area to be harvested, the maturity level, and the density of edible fungi to be harvested in the region; the environmental perception data of edible fungi includes at least one image of edible fungi and three-dimensional spatial information.
[0059] S3. Based on the list of tasks to be picked, combined with the load balancing strategy and the preset maturity-clamping posture parameter table, maturity-clamping force curve and force-lifting speed curve, generate coordinated picking task control instructions; the coordinated picking task control instructions include at least the target picking coordinates, the number of picking robots, and the corresponding clamping posture, clamping force and lifting speed control parameters for each picking robot.
[0060] S4. In response to the coordinated harvesting task control command, the harvesting robot performs the harvesting operation with the end gripper in the gripping posture, gripping force, and lifting speed. After harvesting, the robot sends a harvesting completion signal to the inspection robot closest to the harvesting area and triggers a secondary imaging confirmation of the harvesting area. If there are harvesting residues, a re-harvesting task list is generated based on the density of residues to be harvested, and the corresponding coordinated harvesting task control command is repeatedly responded to.
[0061] It should be further explained that the acquisition of images and three-dimensional spatial information of edible fungi in this embodiment includes:
[0062] S101. The configured first inspection robot, while traveling along a preset initial path in a preset world coordinate system, continuously collects first environmental perception data within the coverage area of the current preset initial path and second environmental perception data outside the coverage area of the preset initial path but within the collection viewpoint range. The core reason for collecting the second environmental perception data in this embodiment is that the preset initial path only covers a portion of the mushroom house. There are mushroom areas outside the path but within the collection viewpoint of the inspection robot. If only the first environmental perception data within the path is collected, a blind spot will be formed, missing mushroom growth information in these areas, making it impossible to fully grasp the overall distribution and growth status of mushrooms within the mushroom house. Its function is to expand the environmental perception range, extending the path... The data collection includes areas accessible from the external viewpoint, providing data support for the subsequent identification of second mushroom areas outside the path using a lightweight convolutional neural network. This data can also be shared with the second inspection robot corresponding to the preset initial path of that area, supplementing the second inspection robot's perception data and improving its third environmental perception data. The ultimate effect is to avoid missing information about mushrooms outside the path, ensuring that all mushrooms within the viewing range of the mushroom house can be perceived and evaluated. This reduces problems such as missed identification of mature mushrooms and delayed harvesting due to incomplete perception. Furthermore, it lays a data foundation for cross-robot collaborative perception, improving the comprehensiveness and timeliness of overall mushroom monitoring in the mushroom house, and ensuring the completeness and accuracy of the subsequent harvest task list construction.
[0063] It should be further explained that the process of constructing the world coordinate system in this embodiment includes:
[0064] The origin is selected as the intersection of the lines connecting the mushroom house floor and two vertical walls. A three-dimensional right-handed coordinate system is formed, with the vertical line pointing to the top of the mushroom house as the Z-axis, the parallel line along the long side of the mushroom house as the X-axis, and the Y-axis determined using the right-hand screw rule. At least three non-collinear static reference objects are deployed within the mushroom house to cover the entire work area. The geometric center coordinates of each reference object are measured multiple times using a total station or high-precision differential GPS, and the average value is calculated and stored in the central control unit. During robot power-on initialization, at least two reference objects are identified using a visual sensor or LiDAR. The pose relationship between the sensor and the world coordinate system is calculated using the PnP algorithm or triangulation method. Combined with the pre-calibrated installation coordinates of the sensor on the robot body, the initial pose of the robot is obtained. During operation, the robot calculates the pose increment by scanning a fixed feature matching map using laser SLAM or visual inertial odometry, accumulating the increments to obtain the real-time pose. Reference objects are periodically re-identified for correction, and adjustments are made when deviations exceed limits to maintain consistency with the world coordinate system. After the sensor senses the mushroom body, it first calculates the coordinates of the mushroom body in the robot's coordinate system based on the sensor's installation coordinates, and then converts them into three-dimensional coordinates in the world coordinate system based on the real-time pose and uploads them. The central control unit integrates all robot poses, mushroom body world coordinates and fixed environmental features of the mushroom house to build and update a global map containing the mushroom house environment, robot and mushroom body distribution in real time.
[0065] S102. Based on the second environmental perception data, the location of the second mushroom body region to be evaluated in the second environmental perception data is identified in real time through a lightweight convolutional neural network. At the same time, based on the location of the second mushroom body region to be evaluated and combined with an information sharing algorithm, the second inspection robot corresponding to the preset initial path to which the location of the second mushroom body region to be evaluated belongs is queried. It should be further noted that this embodiment includes at least a first inspection robot and a second inspection robot.
[0066] It should be further explained that, in this embodiment, the second inspection robot corresponding to the preset initial path to which the location of the second mushroom body to be evaluated belongs includes:
[0067] S1021. Based on the location of the second mushroom body region to be evaluated and the established world coordinate system, obtain the three-dimensional coordinates of the second mushroom body region to be evaluated in the world coordinate system, and denot them as the target coordinates P.
[0068] S1022. Retrieve the stored global path information in the world coordinate system. The global path information includes at least the preset initial path identifiers of all inspection robots and their path point sequences in the world coordinate system. The path data includes the inspection robot identifiers corresponding to each preset initial path and the three-dimensional coordinate set of that path.
[0069] S1023. For each preset initial path, calculate the coverage area of the path in three-dimensional space based on the corresponding path point sequence; the coverage area is a three-dimensional strip-shaped area formed by extending a preset working width to both sides of the path centerline as a reference; the preset working width is set according to half of the effective detection width of the sensor carried by the corresponding inspection robot.
[0070] S1024. The spatial position relationship between the target coordinate P and all calculated path coverage areas is determined, and the path coverage areas whose spatial range includes the target coordinate P are selected. It should be further explained that the spatial inclusion relationship matching step in this embodiment is achieved by calculating the vertical distance from the target coordinate P to the path centerline and comparing it with the preset working width: if the vertical distance is less than or equal to the working width, it is determined that the coordinate P is located within the coverage area of the path.
[0071] S1025. Based on the association between the preset initial path and the inspection robot in the global map, retrieve the inspection robot identifier corresponding to the filtered preset initial path. The inspection robot corresponding to this identifier is the second inspection robot corresponding to the preset initial path to which the second mushroom body area to be evaluated belongs.
[0072] S103. Based on the second environmental perception data, calculate the initial maturity discrimination score of the second mushroom body region to be evaluated; the initial maturity discrimination score is obtained based on the estimated density of mushrooms in the second mushroom body region to be evaluated, the Euclidean distance between the second mushroom body region to be evaluated and the current position of the inspection robot, and the edible fungus growth status predicted by the preset maturity growth prediction model combined with the evaluation by the expert evaluation system; it should be further explained that the construction and training process of the maturity growth prediction model in this embodiment includes:
[0073] S1031. Based on the historical database of the central control unit, the historical monitoring data set of a specific mushroom bed area within multiple consecutive inspection cycles is obtained through time-series data extraction operations; the historical monitoring data set includes at least the average maturity level of the mushrooms at each inspection time point and the corresponding environmental parameters, including environmental temperature, environmental humidity and carbon dioxide concentration.
[0074] S1032. Based on the historical monitoring data set, a standardized time-series dataset is obtained through a data preprocessing process. The data preprocessing process includes: filling in missing data using time-series linear interpolation, converting maturity levels into numerical values using one-hot encoding, and aligning and normalizing based on timestamps to achieve a unified numerical scale between environmental data and maturity data.
[0075] S1033. Based on the standardized time series dataset, obtain the model training sample set through the supervised learning sample construction method; the supervised learning sample construction method refers to: taking the complete data sequence of the previous one or more consecutive inspection cycles as input features, taking the actual maturity level of the future specified prediction cycle as prediction label, and constructing a set of input-output sample pairs with temporal correlation.
[0076] S1034. Based on the training sample set of the model, a pre-trained maturity growth prediction model is obtained through the long short-term memory network training process; the training process includes: dividing the sample set into a training set and a validation set in chronological order, using mean squared error as the loss function to optimize the model parameters, monitoring the training process through the validation set, and terminating the training when the model loss converges.
[0077] S1035. Based on the pre-trained maturity growth prediction model, a continuously optimized prediction system is obtained through an online update mechanism; the online update mechanism refers to: periodically collecting new inspection data during system operation, and incrementally training the model based on the new data within the most recent time window, so that the model continuously adapts to the dynamic changes in the growth characteristics of edible fungi.
[0078] S104: When the initial maturity discrimination score of at least one second mushroom body region to be evaluated exceeds a set threshold, the first inspection robot, based on the query results from the second inspection robot, shares the second environmental perception data and the initial maturity discrimination score with the second inspection robot through an information sharing algorithm. Combined with the first environmental perception data collected in real time by the second inspection robot, the first inspection robot constructs the third environmental perception data for the second inspection robot. It should be further noted that the set threshold in this embodiment is specifically set by those skilled in the art based on actual scenario parameters; the information sharing algorithm in this embodiment is preferably the Raft algorithm.
[0079] This process achieves a unified spatial reference for multi-robot collaborative operations by constructing a precise world coordinate system and global map. During inspection, the system not only collects environmental data within the preset initial path range but also intelligently identifies potential areas to be evaluated outside the path. It then uses a lightweight convolutional neural network for real-time localization and matches the corresponding responsible robot based on spatial relationships, enabling dynamic optimization of inspection resource allocation. In particular, when high-maturity areas are detected, key data is transmitted to the corresponding inspection robot through an information sharing mechanism, forming complete third-party environmental perception data. This cross-robot data fusion and task collaboration mechanism effectively expands the perception range of a single path, significantly improving the system's global perception capability and response efficiency regarding the maturity status of edible fungi.
[0080] It should be further explained that the process of obtaining the list of tasks to be picked in this embodiment includes:
[0081] S201. Based on the third environmental perception data of any inspection robot, arrange them in the order of the collection timestamps to obtain the image sequence to be identified, wherein each frame of the image is associated with the three-dimensional spatial information marker of the corresponding timestamp.
[0082] S202. Perform coordinate mapping, interference suppression, feature restoration, and inter-frame redundancy removal processing on each frame of the image sequence to be identified to obtain a complete inter-frame incremental region image sequence for any inspection robot; the length of the complete inter-frame incremental region image sequence is the same as the preset initial path length of the corresponding inspection robot; in this embodiment, the coordinate mapping, interference suppression, feature restoration, and inter-frame redundancy removal processing includes:
[0083] S2021. Based on the pose data of the inspection robot, the focal length of the image, and the lens distortion parameters corresponding to each frame of the image sequence to be identified, a coordinate mapping matrix is constructed to obtain the mapping relationship between the pixel coordinate system and the world coordinate system. Based on the mapping relationship, the three-dimensional spatial information of edible fungi is converted into corresponding pixel coordinates through coordinate inversion calculation, and the pixel coordinates obtained by inversion are compared and analyzed with the pixel positions of the mushroom body in the actual image to obtain the image sequence after coordinate mapping deviation correction.
[0084] It should be further explained that the process of comparing and analyzing the pixel coordinates obtained by inversion with the actual mushroom pixel positions in the image in this embodiment includes:
[0085] Step 1: Based on the timestamp information of each frame in the image sequence to be identified, obtain the six-degree-of-freedom pose data of the inspection robot in the world coordinate system at the time of image acquisition by querying the historical data of the laser SLAM system or visual inertial odometry system carried by the inspection robot; the pose data includes X-axis position parameters, Y-axis position parameters, Z-axis position parameters and rotation angles around the X-axis, Y-axis, and Z-axis.
[0086] Step 2: Based on the acquired pose data, image capture focal length parameters, and lens distortion parameters, an initial mapping matrix between the pixel coordinate system and the world coordinate system of each frame is obtained through a coordinate transformation matrix construction algorithm. The capture focal length parameters are retrieved from the wide-angle camera parameter library of the inspection robot. The coordinate transformation matrix construction algorithm specifically includes: obtaining the camera intrinsic parameter matrix and lens distortion parameters through Zhang Zhengyou's camera calibration method; calculating the robot extrinsic parameter matrix through pose data; and performing matrix multiplication operations on the intrinsic parameter matrix, extrinsic parameter matrix, and lens distortion parameters to obtain the initial mapping matrix. The lens distortion parameters include radial distortion coefficients and tangential distortion coefficients, which are obtained from camera calibration data. The robot extrinsic parameter matrix includes rotation and translation matrices.
[0087] Step 3: Based on the initial mapping matrix and the three-dimensional spatial coordinates of the edible fungus in the world coordinate system, the inverse pixel coordinates of the edible fungus in the image are calculated through the perspective projection transformation algorithm. The specific implementation of the perspective projection transformation algorithm includes: transforming the three-dimensional coordinates in the world coordinate system to the camera coordinate system through rigid body transformation, then transforming them to the image coordinate system through perspective projection transformation, and finally obtaining the final pixel coordinates through distortion correction processing.
[0088] Step 4: Based on the inversely calculated pixel coordinates and the actual pixel coordinates of the mushroom obtained through the image recognition algorithm, the coordinate deviation value of the edible fungus in each frame image is obtained by calculating the Euclidean distance; the actual pixel position data of the mushroom is obtained by identifying the edge of the mushroom through the image target detection algorithm; the deviation calculation in this embodiment is used to calculate the Euclidean distance between the inversely calculated pixel coordinates and the actual pixel coordinates; the image recognition algorithm in this embodiment uses the Canny edge detection algorithm combined with Hough transform to accurately identify the actual pixel position of the mushroom in the image.
[0089] Step 5: Based on the comparison results between the coordinate deviation value and the preset deviation threshold, the pose parameters and distortion coefficients are iteratively adjusted using the Levenberg-Marquardt optimization algorithm until the coordinate deviation value meets the preset requirements, and the optimized mapping matrix is obtained. In this embodiment, the Levenberg-Marquardt optimization algorithm balances the advantages of gradient descent and Gauss-Newton methods by dynamically adjusting the damping factor, thereby achieving rapid convergence of the mapping matrix parameters.
[0090] Step 6: Based on the optimized mapping matrix, the three-dimensional spatial information of edible fungi in each frame image is re-labeled using a coordinate reprojection algorithm to obtain a single frame image after coordinate mapping deviation correction; the coordinate re-labeling algorithm is used to label the three-dimensional spatial information of edible fungi in the world coordinate system to the corresponding pixel positions according to the corrected mapping matrix;
[0091] Step 7: Repeat steps 1 to 6 for each frame of the image to obtain the complete image sequence after coordinate mapping deviation correction.
[0092] S2022. Based on the image sequence after coordinate mapping deviation correction, the mushroom body region is enhanced by super-resolution reconstruction algorithm, and the color transfer algorithm is used to adjust the color parameters of the distorted region with reference to the color features of the same mushroom body in the normal frame. Based on the image sequence after feature repair, the image sequence to be identified is obtained by cross-frame feature similarity calculation and verification, and the local feature repair is completed and the preset similarity threshold is met.
[0093] It should be further explained that, in this embodiment, the process of adjusting the color of the distorted region by super-resolution reconstruction and using a color transfer algorithm with the normal frame color of the same mushroom as a reference, and verifying the cross-frame feature similarity to a preset similarity threshold includes:
[0094] Step 1: Based on each frame of the image sequence to be identified after coordinate mapping deviation correction, obtain the mushroom body region image data of each frame image through a semantic segmentation algorithm; the semantic segmentation algorithm uses the DeepLabv3+ model to identify and extract the mushroom body region in the image, excluding the background region;
[0095] Step 2: Based on the acquired mushroom body region image data, a super-resolution reconstruction algorithm is used to obtain image data with enhanced subtle features of the mushroom body region; the super-resolution reconstruction algorithm uses the SRGAN model to generate a high-resolution mushroom body image based on the input mushroom body region image.
[0096] Step 3: Based on the acquired image data enhanced with subtle features and the original frame image, an image fusion algorithm is used to obtain a single-frame image with enhanced subtle features; the image fusion algorithm uses the Laplacian pyramid fusion method to fuse the enhanced mushroom body features with the original frame image;
[0097] Step 4: Based on the single-frame image enhanced with subtle features and the normal frame image of the same mushroom in the image sequence to be identified, obtain the reference color distribution parameters of the mushroom through a color histogram statistical algorithm; the color histogram statistical algorithm calculates the RGB three-channel color distribution histogram of the same mushroom region in the normal frame;
[0098] Step 5: Based on the obtained mushroom body reference color distribution parameters and the single-frame image enhanced with subtle features, the color difference detection algorithm is used to obtain the color distortion area of the mushroom body in the single-frame image; the color difference detection algorithm uses the CIEDE2000 color difference formula to calculate the color deviation.
[0099] Step 6: Based on the obtained mushroom body color distortion area and mushroom body reference color distribution parameters, the Reinhard color transfer algorithm is used to obtain the adjusted RGB color value data of the color distortion area; the Reinhard color transfer algorithm achieves color transfer through LAB color space conversion and statistical feature matching.
[0100] Step 7: Based on the obtained adjusted RGB color value data, a single-frame image after color restoration is obtained through a pixel replacement algorithm; the pixel replacement algorithm replaces the original pixel values in the color-distorted areas with the migrated pixel values.
[0101] Step 8: Based on the obtained color-restored single-frame image and other frame images of the same mushroom in the image sequence to be identified, obtain the cross-frame feature similarity value of the same mushroom through a feature similarity calculation algorithm; the feature similarity calculation algorithm adopts SIFT feature extraction and cosine similarity calculation.
[0102] Step 9: Based on the obtained cross-frame feature similarity value and the preset feature similarity threshold, if the similarity value is lower than the preset feature similarity threshold, then repeat steps 2 to 8 to adjust the hyperparameters of SRGAN and the matching parameters of the Reinhard algorithm until the similarity value reaches the preset threshold; repeat the above steps for all frames in the image sequence to obtain the image sequence to be identified after local feature repair.
[0103] S2023. Based on the selected interference frames, the adjacent normal frames are used as reference frames. The weighted average interpolation algorithm is used to calculate the pixel values of the blurred areas in the interference frames, and the blurred pixels in the interference frames are repaired. At the same time, the RGB channel values of the interference frames are adjusted based on the color mean of the reference frames through color feature normalization processing to obtain the image sequence after dynamic interference suppression.
[0104] It should be further explained that in this embodiment, the process of filtering interfering frames by calculating the grayscale fluctuation value between adjacent frames, using the normal frames before and after the interfering frame as a reference, and using weighted average interpolation to repair blurred pixels in the interfering frame and normalize the color features to be consistent with the reference frame includes:
[0105] Step 1: Based on each frame of the image sequence to be identified after local feature repair, obtain the grayscale value data of each frame image through a grayscale conversion algorithm, and convert the RGB three-channel image into a single-channel grayscale image;
[0106] Step 2: Based on the grayscale data of two adjacent frames, the inter-frame grayscale fluctuation value of the two adjacent frames is obtained by means of the absolute difference algorithm. The means of the absolute difference algorithm calculates the absolute difference of grayscale values at corresponding pixel positions in two adjacent frames, and takes the arithmetic mean of the absolute differences of all pixel positions as the inter-frame grayscale fluctuation value.
[0107] Step 3: Based on the inter-frame grayscale fluctuation value and the preset grayscale fluctuation threshold, obtain the set of dynamic interference frames in the image sequence to be identified; wherein, if the inter-frame grayscale fluctuation value is greater than the preset grayscale fluctuation threshold, the next frame is determined to be a dynamic interference frame.
[0108] Step 4: Based on each dynamic interference frame in the dynamic interference frame set, obtain the preceding and following normal frames as reference frames using a time-series indexing algorithm; the normal frames are frames whose inter-frame grayscale fluctuation values are less than or equal to a preset grayscale fluctuation threshold.
[0109] Step 5: Based on the interference frame and the preceding and following reference normal frames, obtain the repair pixel value data of the blurred area of the interference frame through a bidirectional linear interpolation algorithm; the bidirectional linear interpolation algorithm calculates the weighted average of the gray values of the corresponding pixels in the preceding and following reference normal frames, and the weights are dynamically adjusted according to the time interval.
[0110] Step 6: Based on the repaired pixel value data, obtain the initially repaired dynamic interference frame through a pixel overlay algorithm; the pixel overlay algorithm replaces the original pixel value at the corresponding position in the interference frame with the interpolated pixel value;
[0111] Step 7: Based on the initially repaired dynamic interference frame and the preceding and following reference normal frames, obtain the reference color mean data through the mean calculation algorithm; the mean calculation algorithm calculates the arithmetic mean of the R, G, and B channel pixel values of the preceding and following reference normal frames respectively.
[0112] Step 8: Based on the reference color mean data and the initially repaired dynamic interference frame, obtain the repaired interference frame after color feature calibration using a histogram matching algorithm; the histogram matching algorithm adjusts the color distribution of the interference frame to make it consistent with the color distribution characteristics of the reference frame.
[0113] Step 9: Based on all dynamic interference frames in the image sequence to be identified after local feature repair, repeat the operations of steps 4 to 8 for each interference frame using a batch processing algorithm to obtain the image sequence to be identified after dynamic interference suppression.
[0114] S2024. Based on the image sequence after dynamic interference suppression, extract adjacent two-frame images in timestamp order, and use the ORB feature matching algorithm to detect overlapping regions between adjacent frames; based on the overlapping region detection results, retain the body features and corresponding three-dimensional spatial information marking results of the overlapping regions in the previous frame image, and only perform feature marking on the newly added non-overlapping regions in the subsequent frame image to obtain an inter-frame incremental region image set; based on the inter-frame incremental region image set, obtain a complete inter-frame incremental region image sequence for any inspection robot through temporal integration processing;
[0115] It should be further explained that the process of acquiring the inter-frame incremental region image set of any inspection robot in this embodiment includes:
[0116] Step 1: Based on the timestamp order of the image sequence after dynamic interference suppression, the adjacent two frames are obtained sequentially in ascending order of timestamps using a time-sequence traversal algorithm.
[0117] Step 2: Based on two adjacent frames, obtain the ORB feature set of the previous frame and the ORB feature set of the next frame using the ORB feature extraction algorithm; the ORB feature extraction algorithm uses oFAST keypoint detection and rBRIEF descriptor generation.
[0118] Step 3: Based on the ORB feature sets of the previous frame image and the ORB feature sets of the subsequent frame image, the overlapping area range data of the two adjacent frames and the matching result data of the mushroom body features within the overlapping area are obtained through a brute-force matching algorithm; the brute-force matching algorithm uses Hamming distance to calculate feature similarity and performs false matching elimination through distance ratio test;
[0119] Step 4: Based on the overlapping region range data and mushroom body feature matching results, obtain the inter-frame incremental region image through feature point filtering and region division algorithms; the algorithm retains the matched feature points in the previous frame image and their corresponding three-dimensional spatial information in the world coordinate system, and only calculates and marks the three-dimensional spatial information in the world coordinate system for new unmatched feature points in the subsequent frame image.
[0120] Step 5: Based on all timestamps of the image sequence after dynamic interference suppression, repeat the operations of steps 1 to 4 for all adjacent pairs of images in the sequence through an iterative processing algorithm to obtain the image set after removing inter-frame redundancy.
[0121] S203. Based on the complete inter-frame incremental region image sequence of any inspection robot, a standardized mushroom body region image is obtained through image size standardization processing. In this embodiment, the image size standardization process first obtains the width and height parameters of the original image, and then calculates the scaling ratio according to the preset target resolution. This ratio is taken as the smaller value between the original width and height and the target width and height ratio to ensure complete image adaptation. Next, the image is scaled using a bilinear interpolation algorithm, and the image quality is maintained by calculating the weighted average of the four adjacent pixels around the interpolation point. Finally, the scaled image is filled with zero values at the edges to unify the image size to the target resolution, thereby ensuring the consistency of the input size of subsequent image processing algorithms.
[0122] S204. Based on the standardized mushroom body region image, mushroom body target detection is performed using the improved YOLOv8 algorithm to obtain the bounding box coordinates of each edible fungus; the bounding box coordinates include the pixel coordinates of the upper left and lower right corners of the bounding box.
[0123] It should be further explained that the specific process of mushroom body target detection using the improved YOLOv8 algorithm in this embodiment includes:
[0124] Step 1: Based on the standardized mushroom body region image, obtain a normalized image through pixel value normalization processing; the pixel value normalization processing is to divide the RGB three-channel pixel values of the image by 255 respectively, so that the pixel value range is mapped to the 0-1 interval.
[0125] Step 2: Based on the normalized image, obtain multi-scale basic feature maps through the CSPDarknet backbone network; the CSPDarknet backbone network contains 5 convolutional modules and 4 CSP modules, and the multi-scale basic feature maps include 8×8 scale feature maps, 16×16 scale feature maps and 32×32 scale feature maps, which correspond to mushroom target features of different sizes in the image.
[0126] Step 3: Based on the multi-scale basic feature map, obtain the enhanced multi-scale feature map through the mushroom body feature enhancement module, specifically as follows:
[0127] Multi-scale feature maps extracted from the backbone network are processed by a cross-scale feature fusion unit in a path aggregation network structure. The cross-scale feature fusion unit adopts a bidirectional feature propagation path from top to bottom and bottom to top. Through feature map concatenation and 1×1 convolution operations, the 8×8 scale feature map is added and fused pixel by pixel with the 16×16 scale feature map and the 16×16 scale feature map is added and fused with the 32×32 scale feature map to obtain the fused multi-scale feature map. The top-down feature propagation path achieves the fusion of shallow detailed features to deep semantic features through upsampling and feature concatenation, while the bottom-up feature propagation path achieves the fusion of deep semantic features to shallow detailed features through downsampling and feature concatenation.
[0128] Based on the fused multi-scale feature map, multi-scale receptive field feature extraction is performed through a dilated spatial pyramid pooling module. Multiple dilated convolutions with different sampling rates are used in parallel to obtain an enhanced feature map containing multi-scale contextual information. In this embodiment, the process of multi-scale receptive field feature extraction through the dilated spatial pyramid pooling module includes: processing the input feature map using four parallel branches, extracting features using 3×3 dilated convolution kernels with dilation rates of 1, 2, 4, and 8 respectively, while retaining a global average pooling branch; concatenating the feature maps output from the five branches by channel dimension, and then performing feature fusion and dimensionality reduction through 1×1 convolution, finally outputting an enhanced feature map with multi-scale receptive fields. This module obtains feature information of different receptive fields through convolution kernels with different dilation rates, where dilation rate 1 corresponds to the standard convolutional receptive field, and dilation rates 2, 4, and 8 obtain equivalent receptive fields of approximately 7×7, 15×15, and 31×31 respectively. The global average pooling branch provides image-level global contextual information, and finally, feature fusion achieves complete capture of features at different scales of the mushroom body.
[0129] Based on the enhanced feature map, the edge texture enhancement unit is used for processing. The edge texture enhancement unit adopts a multi-operator edge detection layer with a parallel convolution structure. The Sobel operator is used to extract first-order gradient features, the Laplacian operator is used to extract second-order differential features, and the local binary mode operator is used to extract texture structure features. The Sobel operator uses a 3×3 convolution kernel to calculate the gradient features in the horizontal and vertical directions respectively. The Laplacian operator uses a second-order differential template to extract the curvature features of the mushroom body surface. The local binary mode operator extracts the local texture mode by comparing the gray value relationship between the center pixel and the neighboring pixels.
[0130] Based on the extracted edge texture features, edge-aware smoothing is performed using a guided filter to suppress background noise while preserving the details of the mushroom body edges, resulting in an enhanced edge texture feature map. The guided filter performs edge-preserving smoothing on the input feature map using a guide image, where the guide image is the result of the original input image after Gaussian filtering.
[0131] The enhanced edge texture feature map and the fused multi-scale feature map are concatenated by channel dimension, and feature dimensionality reduction is performed through 1×1 convolution, finally outputting the enhanced multi-scale feature map. The feature dimensionality reduction operation reduces the number of channels in the concatenated feature map to a preset dimension through 1×1 convolution, while maintaining the spatial size of the feature map unchanged.
[0132] Step 4: Based on the enhanced multi-scale feature maps, obtain the fused detection feature maps through the PAN-FPN neck network. The PAN-FPN neck network includes an upsampling module, a downsampling module, and a convolutional fusion module. Upsampling is used to fuse the 8×8 scale feature map with the 16×16 scale feature map, and downsampling is used to fuse the fusion result with the 32×32 scale feature map, finally outputting detection feature maps at three scales: 8×8, 16×16, and 32×32.
[0133] Step 5: Based on the fused detection feature map, obtain the bounding box coordinates of each edible fungus using the YOLOv8 detection head. The YOLOv8 detection head contains three prediction branches corresponding to the 8×8, 16×16, and 32×32 scale detection feature maps, respectively. Each prediction branch outputs target prediction information through a 1×1 convolutional layer. The target prediction information includes the x-coordinate of the upper left corner, the y-coordinate of the upper left corner, the x-coordinate of the lower right corner, the y-coordinate of the lower right corner, the confidence of the fungus category, and the confidence of the target presence. The prediction information is filtered using a non-maximum suppression algorithm, retaining the prediction results with a confidence level higher than a preset threshold, and finally obtaining the bounding box coordinates of each edible fungus.
[0134] S205. Based on the bounding box coordinates of each edible fungus, a single-mushroom region image is obtained through a region segmentation algorithm. Simultaneously, based on the single-mushroom region image, edge contour data of the single mushroom is obtained through an edge detection algorithm. It should be further noted that the process of obtaining the edge contour data of the single mushroom in this embodiment includes:
[0135] Step 1: Based on the bounding box coordinates of each edible fungus and the standardized mushroom body region image, obtain valid bounding box coordinates through coordinate boundary verification processing. The bounding box coordinates include the x-coordinate of the upper left corner, the y-coordinate of the upper left corner, the x-coordinate of the lower right corner, and the y-coordinate of the lower right corner. The standardized mushroom body region image has an image width and an image height. The coordinate boundary verification processing is as follows: if the x-coordinate of the upper left corner is less than zero, it is adjusted to zero; if the y-coordinate of the upper left corner is less than zero, it is adjusted to zero; if the x-coordinate of the lower right corner is greater than the image width, it is adjusted to the image width; if the y-coordinate of the lower right corner is greater than the image height, it is adjusted to the image height. This is used to ensure that the bounding box coordinates are within the image size range.
[0136] Step 2: Based on the effective bounding box coordinates, obtain a single mushroom region image through pixel region extraction processing. The pixel region extraction processing is as follows: extract all pixels from the standardized mushroom region image with the horizontal coordinate range from the upper left x-coordinate to the lower right x-coordinate and the vertical coordinate range from the upper left y-coordinate to the lower right y-coordinate. Arrange these pixels in their original positions to form a new image. The new image is the single mushroom region image, with its width being the difference between the lower right x-coordinate and the upper left x-coordinate, and its height being the difference between the lower right y-coordinate and the upper left y-coordinate.
[0137] Step 3: Based on the single mushroom region image, a Gaussian filter is applied to obtain a denoised single mushroom region image. The Gaussian filter is performed using a Gaussian kernel for convolution. The Gaussian kernel is a 3x3 matrix, and the matrix element values are calculated by a Gaussian function to smooth the image and reduce noise interference with edge detection.
[0138] Step 4: Based on the denoised single-mushroom region image, the gradient magnitude image and gradient direction image are obtained through Sobel operator calculation. The Sobel operator includes an x-direction operator and a y-direction operator, both of which are 3x3 matrices. The x-direction operator is used to calculate the gradient value of a pixel in the x-direction, and the y-direction operator is used to calculate the gradient value of a pixel in the y-direction. The gradient magnitude is obtained by taking the square root of the sum of the squares of the x-direction gradient value and the y-direction gradient value, and the gradient direction is obtained by taking the arctangent of the x-direction gradient value and the y-direction gradient value. The gradient magnitude image is composed of the gradient magnitude of all pixels, and the gradient direction image is composed of the gradient direction of all pixels.
[0139] Step 5: Based on the gradient magnitude image and gradient direction image, obtain a thinned gradient magnitude image through non-maximum suppression processing; the non-maximum suppression processing is as follows: for each pixel in the gradient magnitude image, determine two adjacent pixels (pixels before and after along the gradient direction) according to its gradient direction. If the gradient magnitude of the pixel is greater than the gradient magnitude of the two adjacent pixels, retain its gradient magnitude; otherwise, set its gradient magnitude to zero to remove non-edge pixels and refine the edge contour.
[0140] Step 6: Based on the refined gradient magnitude image, obtain the strong edge pixel set and the weak edge pixel set through dual threshold filtering. The dual threshold filtering process sets a high threshold and a low threshold. If the gradient magnitude of a pixel is greater than the high threshold, it is included in the strong edge pixel set. If the gradient magnitude of a pixel is between the low threshold and the high threshold, it is included in the weak edge pixel set. If the gradient magnitude of a pixel is less than the low threshold, it is discarded. The high threshold and the low threshold are set according to the gradient magnitude distribution of the single mushroom region image.
[0141] Step 7: Based on the strong edge pixel set and the weak edge pixel set, obtain the edge contour data of a single mushroom through edge connection processing; the edge connection processing is as follows: traverse each pixel in the weak edge pixel set, and if the pixel is adjacent to any pixel in the strong edge pixel set (up, down, left, right or diagonal direction), then include it in the strong edge pixel set. Finally, the edge contour data is composed of the coordinates of all pixels in the strong edge pixel set, and the edge contour data is the set of pixel coordinates of the edge of a single mushroom.
[0142] S206. Based on the edge contour data of a single mushroom, the cap contour data and the stem contour data are obtained through a contour segmentation algorithm. The contour segmentation algorithm is an algorithm that segments the edge contours according to the morphological differences between the cap and the stem. The cap is an arc-shaped contour with a wider top, and the stem is a columnar contour with a narrower bottom.
[0143] S207. Based on the cap contour data, obtain the cap diameter parameter, cap edge curvature parameter, cap color RGB mean parameter, and gill clarity parameter. In this embodiment, the calculation of the cap diameter parameter first obtains the coordinate set of all edge pixels based on the cap contour data, then calculates the distance between any two pixels in the set using the Euclidean distance formula, and finally determines the maximum value among all distances as the cap diameter parameter by traversing and comparing. The calculation process of the cap edge curvature parameter in this embodiment includes: extracting a subset of continuous pixel coordinates of the arc edge from the cap contour data; obtaining the contour function by performing quadratic curve fitting using the least squares method; calculating the curvature value of each pixel position based on the curvature formula; and finally taking the arithmetic mean of all curvatures as the cap edge curvature parameter. In this embodiment, the calculation process of the RGB mean parameter of the cap color includes: First, based on the cap outline data, all internal pixels of the cap region are determined by the boundary filling algorithm to form a pixel set of the cap region; then, each pixel in the set is traversed, and the values of its three color channels R, G, and B are extracted to form a corresponding set of channel values; then, the summation operation is performed on each set of channels to obtain the sum of the values of each channel; finally, the sum of each channel is divided by the total number of pixels in the cap region, and the mean values of the three channels R, G, and B are calculated by arithmetic mean. The combination of the mean values of these three channels constitutes the RGB mean parameter that characterizes the overall color feature of the cap. In this embodiment, the calculation process of the gill sharpness parameter includes: First, based on the cap outline data and single mushroom area image, a ring-shaped gill texture area is determined within 1 / 3 to 2 / 3 of the height above the bottom edge of the cap, and all pixels in this area are obtained to form a pixel set of the texture area; then, using the gradient calculation method, the absolute value of the horizontal brightness difference between each pixel in the set and its right-side adjacent pixel and the absolute value of the vertical brightness difference between each pixel and its lower-side adjacent pixel are calculated, and the brightness difference values in the two directions are added together to obtain the gradient value of the pixel, which reflects the intensity of local texture changes; finally, the gradient values of all pixels are summed and divided by the total number of pixels to obtain the average gradient value as the gill sharpness parameter. In this embodiment, the calculation process of the stipe height parameter includes two key steps: First, based on the stipe contour data, an extreme value search algorithm is used to identify the bottom endpoint corresponding to the maximum vertical coordinate and the top endpoint corresponding to the minimum vertical coordinate among all pixels on the stipe edge, obtaining the complete coordinate information of these two key points; then, by calculating the coordinate difference, the vertical coordinate value of the top endpoint is subtracted from the vertical coordinate value of the bottom endpoint, and the absolute value obtained is the stipe height parameter; this parameter accurately reflects the morphological characteristics of edible fungi by quantifying the degree of stipe extension in the vertical direction, providing important geometric feature basis for maturity assessment.
[0144] S208. Based on the stipe outline data, obtain the stipe height parameter through a height calculation algorithm; where the height is the vertical distance between the upper and lower endpoints in the stipe outline.
[0145] S209. Based on the bounding box coordinates of all edible fungi, the total number of edible fungi detected within the preset initial path is obtained through quantity statistics and recorded as the total count of mushroom bodies in the region.
[0146] S210. Based on the initial maturity discrimination score within the current preset initial path and the single mushroom feature parameter set extracted from the corresponding region, the maturity growth prediction model and the pre-trained expert evaluation system are used to obtain the maturity score and corresponding maturity level of edible fungi at each position within the preset initial path of any inspection robot.
[0147] S211. Based on the initial maturity score within the current preset initial path and the single mushroom feature parameter set extracted from the corresponding region, the maturity score and corresponding maturity level of edible fungi at each location within the preset initial path of any inspection robot are obtained through the maturity growth prediction model and the pre-trained expert evaluation system, including the following steps:
[0148] S2111. Based on the initial maturity discrimination score within the current preset initial path, a weighted fusion algorithm is used to obtain a fusion maturity benchmark value. The weighted fusion algorithm is to calculate the initial maturity discrimination score with the environmental parameters of the corresponding area. The environmental parameters include environmental temperature, environmental humidity and carbon dioxide concentration. The weight of each environmental parameter is preset according to its influence on maturity.
[0149] S2112. Based on the single mushroom feature parameter set extracted from the corresponding region, standardized single mushroom feature parameters are obtained through feature standardization processing; the single mushroom feature parameter set includes cap diameter parameter, cap edge curvature parameter, cap color RGB mean parameter, gill clarity parameter, and stem height parameter; the feature standardization processing adopts the minimum-maximum normalization algorithm to map each feature parameter value to the interval between zero and one;
[0150] S2113. Based on standardized single mushroom feature parameters, feature dimensionality reduction is performed using principal component analysis algorithm to obtain principal component feature vectors; the principal component analysis algorithm calculates the covariance matrix of the feature parameters, performs eigenvalue decomposition on the covariance matrix, selects the eigenvectors corresponding to the first k largest eigenvalues to form a projection matrix, and multiplies the standardized single mushroom feature parameters with the projection matrix to obtain the principal component feature vectors.
[0151] S2114. Based on the fusion maturity benchmark value and principal component feature vector, a preliminary maturity prediction value is obtained through a maturity growth prediction model. The maturity growth prediction model is a long short-term memory network model, which uses the principal component feature vector as input features and the fusion maturity benchmark value as the initial state. The preliminary maturity prediction value is calculated through the gating mechanism of the long short-term memory network.
[0152] S2115. Based on the preliminary maturity prediction value, the maturity score correction amount is obtained through the pre-trained expert evaluation system; the expert evaluation system is a fuzzy logic-based reasoning system, which includes a knowledge base and an inference engine. The knowledge base stores maturity evaluation rules, and the inference engine matches the corresponding rules according to the preliminary maturity prediction value and outputs the maturity score correction amount.
[0153] S2116. Based on the preliminary maturity prediction value and the maturity score correction amount, the final maturity score of edible fungi at each position is obtained through a linear superposition algorithm; the linear superposition algorithm adds the preliminary maturity prediction value and the maturity score correction amount to obtain the final maturity score in the range of zero to one hundred.
[0154] S2117. Based on the final maturity score, the maturity level corresponding to each edible fungus is obtained through a threshold comparison algorithm. The threshold comparison algorithm sets a first threshold and a second threshold. If the final maturity score is greater than or equal to the first threshold, it is determined to be a harvestable level. If the final maturity score is greater than or equal to the second threshold and less than the first threshold, it is determined to be a ripening level. If the final maturity score is less than the second threshold, it is determined to be an immature level.
[0155] S212. Based on the maturity level of edible fungi at each location within the preset initial path of any inspection robot, combined with the corresponding single mushroom feature parameters, and using the ratio of the similarity of single mushroom feature parameters to the deviation of maturity scores as the cluster density parameter, an adaptive clustering algorithm is used to perform regional clustering on the preset initial path to obtain the set of edible fungi evaluation clusters on the current preset initial path; the single mushroom feature parameters in this embodiment include cap diameter parameter, cap edge curvature parameter, cap color RGB mean parameter, gill clarity parameter, and stem height parameter;
[0156] It should be further explained that the process of dividing the preset initial path into regions using an adaptive clustering algorithm in this embodiment includes:
[0157] S2121. Based on the single mushroom feature parameters of each edible fungus at each position within the preset initial path, construct a feature data matrix; the rows of the feature data matrix correspond to each edible fungus sample, and the columns correspond to the five feature parameter dimensions.
[0158] S2122. Based on the feature data matrix, the feature similarity value between any two edible fungi samples is obtained through the Euclidean distance algorithm; the Euclidean distance algorithm is used to calculate the straight-line distance between two samples in the five-dimensional feature space, and the smaller the distance value, the higher the feature similarity.
[0159] S2123. Based on the maturity score of edible fungi at each location, the absolute difference calculation algorithm is used to obtain the maturity score deviation value between any two edible fungi samples; the absolute difference calculation algorithm calculates the absolute difference in maturity scores between the two samples.
[0160] S2124. Based on the feature similarity matrix and the maturity score deviation matrix, a clustering density parameter matrix is obtained through a ratio calculation algorithm; the ratio calculation algorithm divides each feature similarity value by its corresponding maturity score deviation value, and when the maturity score deviation value is zero, the deviation value is replaced with a preset non-zero minimum value.
[0161] S2125. Based on the clustering density parameter matrix, an initial set of cluster centers is obtained through a density peak search algorithm; the density peak search algorithm calculates the local density value and relative distance value of each sample, and selects the k samples with the largest product of local density value and relative distance value as the initial cluster centers;
[0162] S2126. Based on the initial cluster center set and cluster density parameter matrix, an improved k-means clustering algorithm is used to obtain the edible fungi evaluation cluster set; the improved k-means clustering algorithm uses the cluster density parameter as the distance weight between samples, and recalculates the cluster centers in each iteration until the change in cluster centers is less than a preset threshold.
[0163] S2127. Based on the obtained edible fungi evaluation cluster set, the effectiveness of the clustering results is verified by the silhouette coefficient calculation algorithm. The silhouette coefficient calculation algorithm calculates the silhouette coefficient value of each sample, and takes the average of the silhouette coefficients of all samples as the clustering effectiveness index. When the average value is greater than the preset effectiveness threshold, the final edible fungi evaluation cluster set is output.
[0164] S213. Based on the edible fungi evaluation cluster set on the current preset initial path and the preset harvesting evaluation threshold, obtain the harvesting edible fungi evaluation cluster set and the maturing edible fungi evaluation cluster set; it should be further noted that the harvesting evaluation threshold in this embodiment is set by those skilled in the art.
[0165] S214. Based on the maturity score of each edible fungus assessment cluster to be harvested, the ratio of the number of edible fungus assessment clusters to the total number of mushrooms in the region, the preset edible fungus growth curve, and the expert evaluation algorithm, the harvesting priority of each edible fungus assessment cluster to be harvested is obtained.
[0166] It should be further explained that the process of obtaining the harvest priority of each edible fungus assessment cluster in this embodiment includes:
[0167] S2141. Based on the maturity scores of all edible fungi samples in the cluster of edible fungi to be harvested, calculate the average maturity score of the cluster using a weighted average algorithm; based on the average maturity score, query the preset edible fungi growth curve to obtain the corresponding remaining harvestable time parameter; based on the remaining harvestable time parameter, calculate the maturity urgency coefficient using a reciprocal operation.
[0168] S2142. Based on the number of edible fungi in the cluster of edible fungi to be harvested and the total number of mushrooms in the region, the yield proportion parameter is obtained by a ratio calculation algorithm; the yield proportion parameter is logarithmically normalized to obtain the yield weight coefficient.
[0169] S2143. Combine the maturity urgency coefficient and the yield weight coefficient into a two-dimensional evaluation feature vector, and use it as the input to the expert evaluation system;
[0170] S2144. Based on the evaluation feature vector, the initial priority score is calculated through a fuzzy logic reasoning system. The fuzzy logic reasoning system includes a membership function of the maturity urgency coefficient and a membership function of the output weight coefficient. Reasoning is performed through a fuzzy rule base, and the initial priority score is obtained by defuzzification using the centroid method.
[0171] S2145. Based on the remaining harvestable time parameter, the initial priority score is corrected using an exponential decay model. The exponential decay model uses the remaining harvestable time parameter as the independent variable to calculate a time decay factor, and multiplies the initial priority score by the time decay factor to obtain the corrected priority score.
[0172] S2146. The corrected priority scores of all edible fungi assessment clusters to be harvested are processed by the min-max normalization algorithm to map the priority scores to the range of zero to one hundred, so as to obtain the final harvest priority of each edible fungi assessment cluster to be harvested.
[0173] S215. Simultaneously, based on the number of edible fungi in each cluster of edible fungi to be harvested, calculate the regional harvesting density of each cluster of edible fungi to be harvested.
[0174] S216. Using the harvesting priority of the edible fungi assessment clusters within each preset initial path, the corresponding regional harvesting density, and the location coordinates of the edible fungi assessment clusters, a harvesting task list is constructed within each preset initial path.
[0175] This process, through a systematic image processing and feature extraction workflow, achieves high-precision quantitative assessment of edible fungi maturity, constructing a complete data processing chain from raw sensory data to harvesting decisions. First, multi-level image preprocessing techniques, including coordinate mapping correction, super-resolution reconstruction, dynamic interference suppression, and inter-frame redundancy removal, significantly improve the spatial accuracy and feature quality of image data, providing a reliable data foundation for subsequent analysis. Next, an improved YOLOv8-based target detection algorithm combined with multi-scale feature enhancement enables precise localization and segmentation of the mushroom body. Edge detection and contour analysis further extract key morphological parameters such as cap diameter, edge curvature, color features, and gill clarity. Based on this, the system integrates environmental parameters and morphological features, using an LSTM prediction model and a fuzzy logic expert system for maturity scoring. An adaptive clustering algorithm based on density peak search divides the edible fungi into evaluation clusters with similar characteristics. Finally, combining growth curves and yield weights, fuzzy inference and an exponential decay model calculate the harvesting priority considering time urgency and yield value, forming a complete task list including spatial coordinates, maturity level, harvesting density, and priority. The systematic integration of this series of technologies has transformed the assessment of edible fungi maturity from traditional subjective judgment to objective quantitative analysis based on the fusion of multi-source data, significantly improving the scientific nature and accuracy of harvesting decisions.
[0176] It should be further explained that the generation of coordinated harvesting task control instructions in this embodiment includes:
[0177] S301. Obtain the number and location coordinates of the harvesting robots currently in idle and working states, as well as the predicted remaining working time of the harvesting robots in the corresponding edible fungus assessment cluster. Through statistical algorithms, obtain the number of harvesting robots to be scheduled in real time and their corresponding coordinate positions, and the number of harvesting robots waiting to be scheduled and their corresponding waiting time lengths and coordinate positions. The remaining working time is predicted based on the historical average harvesting rate of harvesting robots, the remaining number of edible fungi in the corresponding edible fungus assessment cluster, and the number of harvesting robots currently working in the corresponding edible fungus assessment cluster, combined with the LSTM algorithm.
[0178] It should be further explained that the process of obtaining the number of picking robots and their corresponding coordinates in real time, and the number of waiting picking robots and their corresponding waiting time and coordinates in this embodiment includes:
[0179] S3011. Based on the current working status data of all picking robots, the robots are divided into idle robots and working robots by a status recognition algorithm. The status recognition algorithm is implemented by reading the status flag bit returned by the robot controller. A status flag bit of zero indicates an idle state, and a status flag bit of one indicates a working state.
[0180] S3012. Count the total number of idle robots as the number of picking robots to be scheduled in real time, and at the same time obtain the three-dimensional coordinate position of these robots in the world coordinate system as the coordinate position for real time scheduling.
[0181] S3013. For each working robot, based on the historical average picking rate parameter of the picking robots, the remaining number of edible fungi in the corresponding edible fungi assessment cluster, and the number of picking robots currently working in the corresponding edible fungi assessment cluster, the remaining working time parameter is predicted by the Long Short-Term Memory Network algorithm; the input feature vector of the Long Short-Term Memory Network algorithm includes the current working duration parameter, the number of completed picking parameters, the current picking rate parameter, and the density of remaining edible fungi in the cluster.
[0182] S3014. Based on the world coordinates of the robot's current position and the center position of the target edible fungus cluster, the movement distance parameter is obtained through the Euclidean distance calculation algorithm; based on the movement distance parameter and the robot's average movement speed parameter, the robot's transfer time parameter is calculated through division.
[0183] S3015. Based on the predicted remaining working time parameter and robot transfer time parameter, the scheduling waiting time length parameter is obtained by addition operation;
[0184] S3016. The total number of robots in working status is used as the number of robots waiting to be scheduled for harvesting. At the same time, the three-dimensional coordinate positions of these robots in the world coordinate system are obtained as the scheduling waiting coordinate positions. The calculated scheduling waiting time length parameter is associated with and stored with the corresponding coordinate positions.
[0185] S3017. Integrate the number of picking robots to be scheduled in real time with their corresponding coordinates, the number of picking robots to be scheduled and their corresponding waiting time with their corresponding coordinates into a structured scheduling resource list.
[0186] S302. Based on the real-time scheduling of the number of picking robots and their corresponding coordinate positions, the scheduling of the number of waiting picking robots and their corresponding waiting time length and corresponding coordinate positions, combined with the list of tasks to be picked in each preset initial path, with the goal of minimizing the travel time and the completion time of the picking tasks, the optimal task allocation algorithm and load balancing algorithm are used to obtain the list of picking robot allocation labels and the corresponding travel path parameters corresponding to each cluster of edible fungi to be picked.
[0187] S3021. Based on the harvesting priority parameters, remaining harvestable time parameters, and number of edible fungi within the clusters of edible fungi assessment clusters, and combined with the coordinate positions of the real-time scheduled harvesting robots, the coordinate positions of the scheduled waiting harvesting robots, and the corresponding waiting time parameters, a multi-dimensional decision feature matrix is constructed. The row dimension of the multi-dimensional decision feature matrix corresponds to the cluster identifier of the edible fungi assessment clusters, the column dimension corresponds to the available harvesting robot identifier, and the matrix elements include the travel time estimate, the waiting time compensation value, and the urgency adjustment factor.
[0188] S3022. Based on the current position coordinates of the harvesting robot and the coordinates of the center point of the edible fungus evaluation cluster, the straight-line distance parameter is obtained through the Euclidean distance calculation algorithm; based on the straight-line distance parameter and the robot's average moving speed parameter, the theoretical travel time is calculated through division; the theoretical travel time is corrected based on the environmental complexity coefficient to obtain the estimated travel time. The specific implementation process is as follows: the environmental data around the path from the harvesting robot's current position to the center point of the edible fungus evaluation cluster is collected by the lidar or vision sensor on the harvesting robot, and a local environmental map of the path is constructed by combining SLAM technology; the DBSCAN clustering algorithm is used to identify obstacles in the local environmental map and extract the obstacle density and path width per unit area. The degree of fluctuation and ground flatness deviation are used as environmental characteristic parameters. The weights of each environmental characteristic parameter are determined by the analytic hierarchy process or the entropy weight method. After the environmental characteristic parameters are standardized by Min-Max, they are weighted and summed to obtain the environmental complexity coefficient with a value range of 0-1. The larger the coefficient value, the more complex the path environment. Based on the robot's historical travel data, the least squares method is used to fit and obtain the travel time correction model. This model takes the theoretical travel time and the environmental complexity coefficient as inputs, introduces the correction coefficient k calibrated by historical data, and calculates the travel time estimate by substituting the theoretical travel time and the environmental complexity coefficient into the calculation logic of travel time estimate = theoretical travel time × (1 + k × environmental complexity coefficient).
[0189] S3023. For the scheduled waiting picking robot, the waiting time compensation value is calculated based on its waiting time length parameter using an exponential decay function; the input of the exponential decay function is the waiting time length parameter, and the output is a compensation coefficient that decreases with time.
[0190] S3024. Based on the remaining harvestable time parameter of the cluster of edible fungi to be harvested, calculate the urgency adjustment factor through an inverse proportional function; the inverse proportional function outputs a maximum value when the remaining harvestable time approaches zero, and outputs a smaller value when the remaining harvestable time is large.
[0191] S3025. Based on the estimated travel time, the waiting time compensation value, and the urgency adjustment factor, a comprehensive cost matrix is constructed using a linear weighted combination algorithm; the linear weighted combination algorithm is to sum the three parameters according to preset weight coefficients, and the weight coefficients are dynamically adjusted according to the system optimization objective.
[0192] S3026. Based on the comprehensive cost matrix, the Hungarian algorithm is used to solve the optimal allocation scheme. The Hungarian algorithm finds the task-robot matching relationship that minimizes the total comprehensive cost through three sub-steps: matrix reduction, independent zero element labeling, and augmented path search.
[0193] S3027. Based on the optimal allocation scheme, calculate the number of tasks assigned to each picking robot, and evaluate the load distribution balance through the standard deviation algorithm; the standard deviation algorithm calculates the degree of deviation between the number of tasks of each robot and the average number of tasks.
[0194] S3028. When the load balance exceeds a preset threshold, a task redistribution algorithm is used for adjustment. The task redistribution algorithm is based on a hill-climbing search strategy, which redistributes some tasks of the high-load robot to the low-load robot while minimizing the increase in total overall cost.
[0195] S3029. Based on the final allocation scheme, generate a corresponding list of picking robot assignment tags for each cluster of edible fungi to be picked; the list of assignment tags includes the unique identifier of the assigned picking robot, the task priority sequence number, and the expected start time stamp.
[0196] S30210, Based on the current position coordinates of the harvesting robot and the coordinates of the target cluster center, adopt... The path planning algorithm calculates the optimal travel path; The path planning algorithm manages search nodes through open and closed lists, evaluates path costs based on heuristic functions, and outputs path parameters including a sequence of path point coordinates, total path length, and estimated travel time.
[0197] S303. Based on the list of assigned tags for each cluster of edible fungi to be harvested and the corresponding travel path parameters, combined with a fuzzy control algorithm, generate the optimal path instruction for each cluster of edible fungi to be harvested. The optimal path instruction for each cluster of edible fungi to be harvested includes the number of harvesting robots assigned, the starting point and ending point of each harvesting robot, the starting time point of travel, and the length of travel time.
[0198] S304. Based on the maturity score and corresponding maturity level of each edible fungus in the evaluation cluster of edible fungi to be harvested, combined with the maturity-gripping posture parameter table, obtain the gripping posture parameters of each harvesting robot when harvesting a single edible fungus in the current evaluation cluster of edible fungi to be harvested.
[0199] It should be further explained that the construction process of the maturity-clamping posture parameter table in this embodiment includes:
[0200] S3041. Based on the maturity score parameters of edible fungi, a mapping relationship between maturity level and score range is established through a threshold division algorithm; the maturity level includes immature level, immature level and unharvested level, and the corresponding score ranges are 0 to 59 points, 60 to 79 points and 80 to 100 points, respectively.
[0201] S3042. Based on historical harvesting experimental data, the basic clamping posture parameters corresponding to each maturity level are determined by statistical analysis algorithms; the basic clamping posture parameters include the reference value of the clamp opening angle, the reference value of the clamping depth, and the reference value of the approach angle.
[0202] S3043. Based on the cap diameter parameter and stipe height parameter of edible fungi, the basic posture parameters are corrected by a multiple linear regression algorithm; the multiple linear regression model uses the cap diameter parameter and stipe height parameter as independent variables and the posture parameter adjustment amount as dependent variable.
[0203] S3044. Based on the current maturity score parameters of edible fungi, the corresponding clamping posture parameters are obtained through a lookup table interpolation algorithm; the lookup table interpolation algorithm first determines the maturity level, and then performs linear interpolation calculation within the parameter range of the corresponding level.
[0204] S3045. Based on the physical constraints of the mechanical system, the feasibility of the clamping posture parameters is verified by a boundary constraint algorithm; the boundary constraint algorithm checks whether the clamping opening angle is within the range of 15 degrees to 90 degrees and whether the clamping depth is within the range of 5 mm to 30 mm.
[0205] S3046. The verified clamping posture parameters are encapsulated into a set of control commands, including specific values of the clamp opening angle, clamping depth, and approach angle, and sent to the end effector of the corresponding harvesting robot.
[0206] S305. Simultaneously, based on the maturity score and corresponding maturity level of each edible fungus in the current edible fungus assessment cluster, combined with the maturity-clamping force curve, the clamping force parameters of each picking robot in picking a single edible fungus in the current edible fungus assessment cluster are obtained.
[0207] It should be further explained that the process of constructing the maturity-clamping strength curve in this embodiment includes:
[0208] S3051. Based on historical harvesting experimental data, a functional relationship between maturity score and benchmark clamping force is established using a polynomial fitting algorithm; the polynomial fitting algorithm adopts a quadratic polynomial model, with maturity score parameter as independent variable and benchmark clamping force parameter as dependent variable.
[0209] S3052. Based on the influence of the cap diameter parameter on the clamping force, a diameter compensation coefficient is determined by a linear interpolation algorithm; the linear interpolation algorithm calculates the corresponding compensation coefficient value according to the position of the cap diameter parameter within a preset diameter range;
[0210] S3053. Based on the reference clamping force parameter and the diameter compensation coefficient, the comprehensive clamping force parameter is calculated by a product algorithm; the product algorithm multiplies the reference clamping force parameter by the diameter compensation coefficient and the environmental humidity correction factor to obtain the final clamping force value;
[0211] S3054. Based on the safety requirements of the mechanical system, the rationality of the clamping force parameter is verified by a threshold comparison algorithm; the threshold comparison algorithm checks whether the comprehensive clamping force parameter is within the allowable range of 0.5N to 5N.
[0212] S3055: Convert the verified clamping force parameters into motor torque control signals, including force setpoint and torque conversion coefficient, and send them to the torque controller of the corresponding harvesting robot.
[0213] S306. Based on the clamping force parameter of each picking robot in picking a single edible fungus in the current edible fungus assessment cluster and the force-lifting speed curve, obtain the picking and lifting speed control parameter of each picking robot in picking a single edible fungus in the current edible fungus assessment cluster.
[0214] It should be further explained that the process of constructing the force-lifting speed curve in this embodiment includes:
[0215] S3061. Based on historical harvesting data, a mathematical relationship between the clamping force parameter and the probability of damage to edible fungi is established using a logistic regression algorithm; the logistic regression algorithm uses the clamping force parameter as the independent variable and the probability of damage to edible fungi as the dependent variable.
[0216] S3062. Based on the damage probability threshold of edible fungi, the lifting speed adjustment coefficient is determined by an interpolation algorithm; the interpolation algorithm calculates the corresponding speed adjustment coefficient value according to the position of the damage probability within a preset probability range.
[0217] S3063. Based on the cap diameter parameter and cap edge curvature parameter, the cap vulnerability index is calculated by principal component analysis; the principal component analysis reduces the cap diameter parameter and cap edge curvature parameter to a single vulnerability index.
[0218] S3064. Based on the clamping force parameter and the target damage probability, the reference lifting speed control parameter is calculated by an inverse function solution algorithm; the inverse function solution algorithm solves for the lifting speed value that satisfies the target damage probability by Newton's iteration method.
[0219] S3065. Based on the baseline lifting speed control parameters, speed adjustment coefficient, and cap fragility correction factor, the optimal lifting speed control parameters are calculated using a weighted fusion algorithm.
[0220] S3066. Based on the mechanical system performance parameters, the feasibility of the lifting speed control parameters is verified by a constraint satisfaction algorithm; the constraint satisfaction algorithm checks whether the lifting speed control parameters are within the minimum and maximum speed range allowed by the equipment.
[0221] S3067. Convert the verified lifting speed control parameters into motor control signals, including target speed values and acceleration limit values, and send them to the motion control system of the corresponding harvesting robot.
[0222] S307. Based on the clamping posture parameters, force parameters and lifting speed control parameters of each picking robot in the current edible fungus evaluation cluster, combined with the PID control algorithm, the picking task control command of each picking robot is generated.
[0223] S308. Based on the harvesting task control instructions of all harvesting robots and combined with simulation algorithms, optimization training is carried out with the goal of minimizing the proportion of harvesting damage. Coordinated harvesting task control instructions are generated in each cluster of edible fungi to be harvested for evaluation, and real-time harvesting control is performed.
[0224] This process achieves global optimization of resource scheduling and operational parameters for harvesting robots by constructing a multi-layered collaborative control system. First, based on the LSTM algorithm, the remaining working time of the robot in its working state is accurately predicted. Combined with real-time location information, a complete scheduling resource list containing both immediately available and expected available resources is constructed, providing precise spatiotemporal resource data support for task allocation. Second, innovatively, multi-dimensional factors such as travel time, waiting time, and harvesting urgency are integrated into the comprehensive cost matrix. Initial optimal allocation is achieved through the Hungarian algorithm, followed by load balancing optimization using a hill-climbing search strategy. This ensures both time efficiency in task allocation and avoids overloading of individual robots. More importantly, a complete mapping chain from maturity level to specific operational parameters is established: maturity levels are transformed into specific mechanical operation parameters through a maturity-attitude parameter table; precise force control is achieved based on a force curve fitted by multinomials, combined with environmental factors; and the force-speed relationship constructed using a logistic regression model effectively controls damage risk while ensuring harvesting efficiency. Finally, PID control and simulation optimization ensure coordinated execution of all parameters. This end-to-end optimization, from macro-level resource scheduling to micro-level operational parameters, enables the system to significantly improve operational efficiency and achieve efficient collaborative operation of multiple robots while ensuring harvesting quality.
[0225] It should be further explained that the process of triggering secondary imaging confirmation of the picking area in this embodiment includes:
[0226] S401. Based on the status signal of the harvesting robot's end effector completing the harvesting action, a harvesting completion signal is sent to the nearest inspection robot via a wireless communication protocol; the harvesting completion signal includes the cluster identifier of the edible fungi to be harvested, the harvesting completion timestamp, and the identifier of the robot that performed the harvesting.
[0227] S402. Based on the received harvest completion signal, the inspection robot adjusts the current inspection path through a path replanning algorithm; the path replanning algorithm uses Dijkstra's shortest path algorithm to calculate the optimal path from the robot to the coordinates of the evaluation cluster center of the edible fungi to be harvested.
[0228] S403. Based on the multispectral imaging system carried by the inspection robot, a secondary imaging of the cluster area of the edible fungi to be harvested is performed by a region scanning algorithm; the region scanning algorithm adopts a raster scanning mode to collect image data including visible light band and near-infrared band.
[0229] S404. Based on secondary imaging data, residual edible fungi are identified using the improved YOLOv8 algorithm. After identification, the number of residual edible fungi in the clusters is evaluated by using a density calculation algorithm, and the density of residual edible fungi to be harvested in the residual area is calculated in combination with the actual effective planting area of the region.
[0230] S405. Based on the real-time picking quantity parameter, the secondary confirmation omission quantity parameter, and the picking task completion time parameter, the current picking efficiency value is obtained through an efficiency calculation algorithm; the efficiency calculation algorithm is the real-time picking quantity minus the secondary confirmation omission quantity, divided by the picking task completion time.
[0231] S406. Based on the harvesting efficiency value and the density of unharvested areas in the residual area, the preset initial path planning strategy is updated using the Q-learning algorithm; the Q-learning algorithm uses maximizing harvesting efficiency as the reward function and minimizing the density of unharvested areas in the residual area as the constraint condition.
[0232] S407. Based on the optimized path planning parameters, the optimal inspection path sequence is solved by a genetic algorithm; the genetic algorithm uses the maximization of harvesting efficiency as the fitness function and outputs the updated preset initial path.
[0233] S408. The updated preset initial path is sent to all inspection robots to complete the real-time optimization and adjustment of the inspection path.
[0234] This embodiment constructs a fully intelligent operation system from environmental perception to harvesting optimization. Through the collaborative innovation of multiple core technologies, it achieves precise and efficient management of edible fungi cultivation. In the inspection perception stage, the optimal inspection path is generated based on grid division and efficiency targets. An innovative dual-mode data acquisition mechanism inside and outside the path is adopted, combined with a spatial matching algorithm to achieve cross-robot data sharing. At the same time, through the construction of a high-precision world coordinate system and multi-source fusion positioning technology, the spatial consistency of the coordinates of all robots and mushrooms is ensured, fundamentally solving the perception blind spot problem of traditional single-path inspection and significantly improving the coverage and data accuracy of the entire mushroom house monitoring. In the data processing stage, the system adopts a multi-level optimization strategy. The spatial positioning accuracy is improved through a coordinate mapping correction algorithm, the image detail features are enhanced based on super-resolution reconstruction technology, the image sequence stability is ensured by using a dynamic interference suppression method, and the data processing efficiency is improved by using an inter-frame redundancy removal mechanism. These technologies work together to provide a high-quality data foundation for subsequent analysis. In the maturity assessment stage, the system accurately identifies mushrooms using an improved multi-scale target detection network, quantifies key parameters using morphological feature extraction algorithms, and employs an assessment method that integrates time-series prediction models and expert systems to accurately determine maturity. Furthermore, it scientifically groups mushrooms based on density-adaptive clustering algorithms, establishing a complete assessment system from image recognition to maturity grading. In the task scheduling and harvesting control stage, the system innovatively constructs a multi-dimensional resource scheduling model, comprehensively considering factors such as robot status, environmental complexity, and time urgency, and achieves efficient task allocation through optimization algorithms. Simultaneously, it establishes a complete mapping relationship from maturity to specific operational parameters, ensuring the accuracy and adaptability of harvesting actions. In the secondary optimization stage, the system achieves real-time evaluation of harvesting results through multispectral imaging and intelligent algorithms, and continuously optimizes operational strategies based on reinforcement learning and evolutionary algorithms, forming a complete closed-loop optimization system.
[0235] Example 2
[0236] Please see Figure 2 Another embodiment of the present invention provides a robot collaborative operation control system for edible fungi cultivation, comprising: a data acquisition module, an identification module, an instruction module, a response module, and a feedback confirmation module;
[0237] The data acquisition module is used by the inspection robot to scan the mushroom bed along the preset initial path and collect environmental perception data of edible fungi.
[0238] The identification module, based on the environmental perception data of edible fungi and combined with image recognition algorithms, determines the maturity of at least one edible fungi and calculates the density of edible fungi to be harvested in a region, generating a list of tasks to be harvested that includes the coordinates of the area to be harvested, the maturity level, and the density of edible fungi to be harvested in the region; the environmental perception data of edible fungi includes at least one image of an edible fungi and its three-dimensional spatial information.
[0239] The instruction module generates coordinated harvesting task control instructions based on the list of tasks to be harvested, combined with a load balancing strategy and preset maturity-clamping posture parameter table, maturity-clamping force curve and force-lifting speed curve. The coordinated harvesting task control instructions include at least the target harvesting coordinates, the number of harvesting robots, and the corresponding clamping posture, clamping force and lifting speed control parameters for each harvesting robot.
[0240] The response module responds to the coordinated picking task control command, and performs the picking operation through the end gripper of the picking robot with the gripping posture, gripping force and lifting speed. After the picking is completed, it sends a picking completion signal to the inspection robot closest to the picking area.
[0241] The feedback confirmation module is used to trigger secondary imaging confirmation of the picking area. If there are picking residues, a re-picking task list is generated based on the density of the residues to be picked and the corresponding coordinated picking task control command is repeatedly responded to.
[0242] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments under the guidance of the present invention without departing from the spirit and scope of the present invention. All of these variations are within the protection scope of the present invention.
[0243] If the technical solution disclosed herein involves personal information, the product using this technical solution has clearly informed the user of the personal information processing rules and obtained the user's voluntary consent before processing the personal information. If the technical solution disclosed herein involves sensitive personal information, the product using this technical solution has obtained the user's separate consent before processing the sensitive personal information, and also meets the requirement of "express consent". For example, at personal information collection devices such as cameras, clear and prominent signs are set up to inform users that they have entered the scope of personal information collection and that personal information will be collected. If an individual voluntarily enters the collection scope, it is deemed that they have agreed to the collection of their personal information; or on the personal information processing device, with clear signs / information informing users of the personal information processing rules, authorization is obtained from the individual through pop-up information or by asking the individual to upload their personal information; wherein, the personal information processing rules may include information such as the personal information processor, the purpose of personal information processing, the processing method, and the types of personal information processed.
Claims
1. A method for controlling the cooperative work of robots in the cultivation process of edible fungi, characterized in that, The method comprises the following steps: The inspection robot scans the mushroom bed along the preset initial path and collects environmental perception data of the edible fungi; Based on the environmental perception data of the edible fungi and an image recognition algorithm, the maturity of at least one edible fungus is determined and the area density of the to-be-picked edible fungi is calculated, and a to-be-picked task list containing the coordinates of the to-be-picked area, the maturity level and the area density of the to-be-picked edible fungi is generated; the environmental perception data of the edible fungi at least contains the image and three-dimensional space information of the edible fungi; Based on the to-be-picked task list, a load balancing strategy and a preset maturity-gripping posture parameter table, a maturity-gripping force curve and a force-pulling speed curve, a coordinated picking task control instruction is generated; the coordinated picking task control instruction at least contains target picking coordinates, the number of picking robots and the corresponding gripping posture, gripping force and pulling speed control parameters of each picking robot; In response to the coordinated picking task control instruction, the end gripper of the picking robot performs picking operation with the gripping posture, gripping force and pulling speed, and after picking is completed, a picking completion signal is fed back to the nearest inspection robot of the picking area, and secondary imaging confirmation of the picking area is triggered; if there is picking residue, a supplementary picking task list is generated according to the residue area density of the to-be-picked edible fungi, and the corresponding coordinated picking task control instruction is repeatedly responded; The generation of the coordinated picking task control instruction comprises: The number, position coordinates of the picking robots in idle state and working state at the current time, and the remaining working time of the picking robots in working state in the corresponding to-be-picked edible fungi evaluation clustering cluster are obtained, and through a statistical algorithm, the number of instantaneously scheduled picking robots and the corresponding coordinate positions, the number of scheduled waiting picking robots and the corresponding waiting time length and the corresponding coordinate positions are obtained; the remaining working time is predicted by combining the historical average picking rate of the picking robots, the remaining number of edible fungi in the corresponding to-be-picked edible fungi evaluation clustering cluster, and the number of picking robots currently working in the corresponding to-be-picked edible fungi evaluation clustering cluster, and the LSTM algorithm; Based on the number of instantaneously scheduled picking robots and the corresponding coordinate positions, the number of scheduled waiting picking robots and the corresponding waiting time length and the corresponding coordinate positions, and the to-be-picked task list in each preset initial path, the shortest travel time and picking task completion time are taken as the target, and through the optimal task allocation algorithm and the load balancing algorithm, the picking robot distribution label list and the corresponding travel path parameters corresponding to each to-be-picked edible fungi evaluation clustering cluster are obtained; Based on the picking robot distribution label list and the corresponding travel path parameters corresponding to each to-be-picked edible fungi evaluation clustering cluster, the optimal path instruction of the picking robot corresponding to each to-be-picked edible fungi evaluation clustering cluster is generated by combining the fuzzy control algorithm; the optimal path instruction of the picking robot corresponding to each to-be-picked edible fungi evaluation clustering cluster comprises the number of distributed picking robots, the travel starting point and ending point of each picking robot, the travel starting time point and the travel time length. Based on the maturity score and the corresponding maturity level of each edible fungus in the to-be-picked edible fungus evaluation cluster, and combined with the maturity-gripping posture parameter table, the gripping posture parameter of each picking robot in picking the single edible fungus in the to-be-picked edible fungus evaluation cluster is obtained. Meanwhile, based on the maturity score and the corresponding maturity level of each edible fungus in the to-be-picked edible fungus evaluation cluster, and combined with the maturity-gripping force curve, the gripping force parameter of each picking robot in picking the single edible fungus in the to-be-picked edible fungus evaluation cluster is obtained. Based on the gripping force parameter of each picking robot in picking the single edible fungus in the to-be-picked edible fungus evaluation cluster, and combined with the force-lifting speed curve, the picking lifting speed control parameter of each picking robot in picking the single edible fungus in the to-be-picked edible fungus evaluation cluster is obtained. Based on the gripping posture parameter, the force parameter and the lifting speed control parameter of each picking robot in picking the single edible fungus in the to-be-picked edible fungus evaluation cluster, and combined with the PID control algorithm, the picking task control instruction of each picking robot is generated. Based on the picking task control instruction of all picking robots, and combined with the simulation algorithm, the minimum picking damage ratio is taken as the target for optimization training, and the coordinated picking task control instruction in each to-be-picked edible fungus evaluation cluster is generated for real-time picking control.
2. The method of claim 1, wherein the robot cooperative work control method is used in a mushroom cultivation process. The image and three-dimensional space information of the collected edible fungus include: S101, the first inspection robot continuously collects first environment perception data in a preset initial path coverage range and second environment perception data within a collection angle range outside the preset initial path coverage range in the process of traveling along the preset initial path in the preset world coordinate system; S102, based on the second environment perception data, the position of the second to-be-evaluated mushroom area in the second environment perception data is identified in real time through a lightweight convolutional neural network, and based on the position of the second to-be-evaluated mushroom area, a second inspection robot corresponding to the preset initial path of the second to-be-evaluated mushroom area position is queried through an information sharing algorithm.
3. The method of claim 2, wherein the robot cooperative work control method is used in a mushroom cultivation process. The image and three-dimensional space information of the collected edible fungus further include: S103, based on the second environment perception data, an initial maturity discrimination score of the second to-be-evaluated mushroom area is calculated; the initial maturity discrimination score is obtained based on the estimated density of the mushroom in the second to-be-evaluated mushroom area, the Euclidean distance between the second to-be-evaluated mushroom area and the current position of the inspection robot, and the growth state of the edible fungus predicted based on a preset maturity growth prediction model, and is evaluated by an expert evaluation system; S104, when there is at least one second to-be-evaluated mushroom area whose initial maturity discrimination score exceeds a set threshold, the first inspection robot shares the second environment perception data and the initial maturity discrimination score to the second inspection robot through an information sharing algorithm according to the second inspection robot obtained by querying, and constructs third environment perception data of the second inspection robot based on the first environment perception data collected by the second inspection robot in real time.
4. The method of claim 3, wherein the robot cooperative work control method is used in a mushroom cultivation process. The acquisition process of the to-be-picked task list includes: Based on the third environment perception data of any inspection robot, arrange in chronological order to obtain a sequence of images to be identified, wherein each image is associated with three-dimensional spatial information markers corresponding to the time stamp; Coordinate mapping, interference suppression, feature restoration, and inter-frame redundancy reduction are performed on each image in the sequence of images to be identified to obtain a complete inter-frame incremental area image sequence of any inspection robot; the length of the complete inter-frame incremental area image sequence is the same as the preset initial path length of the corresponding inspection robot; Based on the complete inter-frame incremental area image sequence of any inspection robot, image size normalization processing is performed to obtain a normalized mushroom body area image; Based on the normalized mushroom body area image, a modified YOLOv8 algorithm is used for mushroom target detection to obtain the bounding box coordinates of each edible mushroom; Based on the bounding box coordinates of each edible mushroom, a region segmentation algorithm is used to obtain a single mushroom area image, and an edge detection algorithm is used to obtain single mushroom edge profile data based on the single mushroom area image; Based on the single mushroom edge profile data, a contour segmentation algorithm is used to obtain cap contour data and stem contour data.
5. The method of claim 4, wherein the robot cooperative work control method is characterized by, The process of obtaining the to-be-picked task list further includes: Based on the cap contour data, the cap diameter parameter, the cap edge curvature parameter, the cap color RGB mean parameter, and the gill clarity parameter are obtained; Based on the stem contour data, the stem height parameter is obtained through a height calculation algorithm; Based on the bounding box coordinates of all edible mushrooms, the total number of detected edible mushrooms in the preset initial path is obtained through quantity statistics, denoted as the area mushroom total count.
6. The method of claim 5, wherein the robot cooperative work control method is used in a mushroom cultivation process. The process of obtaining the to-be-picked task list further includes: Based on the initial maturity discrimination score in the current preset initial path and the corresponding single mushroom feature parameter set extracted, the maturity score and corresponding maturity level of edible mushrooms at each position in the preset initial path of any inspection robot are obtained through the maturity growth prediction model and the pre-trained expert evaluation system; the single mushroom feature parameters include cap diameter parameter, cap edge curvature parameter, cap color RGB mean parameter, gill clarity parameter, and stem height parameter; Based on the maturity level of edible mushrooms at each position in the preset initial path of any inspection robot and the corresponding single mushroom feature parameters, the ratio of single mushroom feature parameter similarity to maturity score deviation is used as the clustering density parameter, and the adaptive clustering algorithm is used to divide the preset initial path into regions to obtain the edible mushroom evaluation cluster set on the current preset initial path; Based on the edible mushroom evaluation cluster set on the current preset initial path and the preset to-be-picked evaluation threshold, the to-be-picked edible mushroom evaluation cluster set and the to-be-mature edible mushroom evaluation cluster set are obtained.
7. The method of claim 6, wherein the robot cooperative work control method is used in a mushroom cultivation process. The process of obtaining the to-be-picked task list further includes: Based on the ratio of the corresponding maturity score, the number of to-be-picked edible mushroom evaluation clusters, and the area mushroom total count in each to-be-picked edible mushroom evaluation cluster, the preset edible mushroom growth curve, and the expert evaluation algorithm, the to-be-picked priority of each to-be-picked edible mushroom evaluation cluster is obtained. Meanwhile, the number of edible fungi in the clustering cluster is evaluated according to each edible fungus to be picked, and the area picking density of the clustering cluster of each edible fungus to be picked is calculated. The picking priority of the edible fungus evaluation clustering cluster in each preset initial path and the corresponding area picking density and the position coordinate information of the edible fungus evaluation clustering cluster are used to construct a picking task list in each preset initial path.
8. A robot cooperative work control system for use in a process for cultivating edible mushrooms, for implementing the robot cooperative work control method for use in a process for cultivating edible mushrooms according to any one of claims 1 to 7, characterized by It comprises: a data acquisition module, a recognition module, an instruction module, a response module and a feedback confirmation module; The data acquisition module is used for the mushroom bed to be scanned by the inspection robot along the preset initial path to collect the environmental perception data of the edible fungi; The recognition module determines the maturity of at least one edible fungus and calculates the area picking density based on the environmental perception data of the edible fungi combined with the image recognition algorithm, and generates a picking task list containing the picking area coordinates, maturity level and area picking density; The environmental perception data of the edible fungi at least contains the image and three-dimensional space information of one edible fungus; The instruction module generates a coordinated picking task control instruction based on the picking task list combined with the load balancing strategy and the preset maturity-gripping posture parameter table, maturity-gripping force curve and force-pulling speed curve; The coordinated picking task control instruction at least contains the target picking coordinates, the number of picking robots and the corresponding gripping posture, gripping force and pulling speed control parameters of each picking robot; The response module responds to the coordinated picking task control instruction, and executes the picking operation through the end gripper of the picking robot with the gripping posture, gripping force and pulling speed, and feeds back the picking completion signal to the inspection robot closest to the picking area after picking; The feedback confirmation module is used to trigger the secondary imaging confirmation of the picking area. If there is picking residue, a supplementary picking task list is generated according to the residue area picking density and the corresponding coordinated picking task control instruction is repeatedly responded.
Citation Information
Patent Citations
Agaricus bisporus automatic picking method, device and equipment based on artificial intelligence and medium
CN120642735A
Tomato picking robot device
CN223428901U