Selective combing harvesting method of tagetes based on visual perception and comb-plant interaction
By using visual perception and comb-plant interaction, the flower envelope sphere and stem orientation are reconstructed using RGB and depth images. This optimizes the combing harvesting plane and comb trajectory posture, solving the problems of positioning difficulties and damage during marigold harvesting and achieving low-damage harvesting.
Patent Information
- Application Number
- CN202611256330.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-19
- Publication Date
- 2026-11-24
AI Technical Summary
Existing technologies struggle to accurately locate marigold flower picking points in unstructured environments, leading to broken flower stalks or damaged branches during picking. This technology is ill-suited to the varying heights of plants and the mechanical limits of flower stalks.
By using visual perception and comb-plant interaction, RGB and depth images are acquired, flower occlusion rate labels are extracted, and dual feature weight allocation with occlusion rate adaptation is performed to reconstruct the center coordinates of the flower's envelope sphere and the stem direction. The comb harvesting plane and comb trajectory posture are optimized by combining the flower stalk tensile strength threshold.
It enables accurate location of picking points even when branches and leaves are obstructing the view, reducing missed and incorrect picking, avoiding broken flower stalks or damaged branches, and achieving low-damage harvesting.
Smart Images

Figure CN123160658A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of agricultural mechanized harvesting technology, specifically to a selective combing harvesting method for marigolds based on visual perception and comb-plant interaction. Background Technology
[0002] Marigolds are perennial herbaceous plants characterized by numerous branches, dense flowers, and a long flowering period. They are harvested using a selective batch harvesting method with multiple harvests.
[0003] The existing technology has the following shortcomings: In unstructured environments, marigold flowers exhibit incomplete phenotypic characteristics due to dense obscuring by leaves and branches, making the spatial location of the picking point invisible. At the same time, the existing comb teeth, operating with a fixed trajectory and posture, cannot adapt to the uneven distribution of plant heights and the mechanical bearing limits of the flower stalks, resulting in the failure of picking point positioning, flower stalk breakage due to excessive tensile stress during combing, or damage to branches. Summary of the Invention
[0004] The purpose of this invention is to provide a selective combing and harvesting method for marigolds based on visual perception and comb-plant interaction, in order to solve the problems mentioned above.
[0005] The objective of this invention can be achieved through the following technical solutions: A selective combing harvesting method for marigolds based on visual perception and comb-plant interaction includes the following steps: S1: Collect the RGB image and corresponding depth image of the marigold in the target area as the data to be processed; S2: Extract the visible phenotypic features of marigolds from the data to be processed and estimate the occlusion degree of each flower to obtain the occlusion rate label. Then, perform adaptive dual feature weight allocation based on the occlusion rate label to obtain the instance segmentation mask of the pickable flowers and the spatial pose of the invisible area. S3: Based on the instance segmentation mask and spatial pose, perform spatial reconstruction of the spherical envelope surface and stem direction for the invisible picking area, and calculate the center coordinates, radius and stem direction vector of the flower's envelope sphere. S4: Based on the center coordinates, radius, and stem direction vector, and with flower content, bud content, and leaf content as evaluation constraints, execute the optimal harvesting plane solution strategy under multi-objective constraints to obtain the spatial pose parameters of the optimal combing harvesting plane; S5: Based on the spatial pose parameters of the optimal combing and harvesting plane, and combined with the mechanical characteristics of the contact between the comb teeth and the plant, perform phased pose decoupling optimization of the four harvesting stages of combing in, picking, combing out, and tilting, and output the optimal comb tooth trajectory and posture parameters.
[0006] As a further aspect of the present invention: the process of obtaining the occlusion rate label is as follows: By iterating through each pixel of the RGB image, calculating the extreme values of the color difference in the red, green, and blue channels, the connected components where the flower is located are segmented accordingly. Extract the depth point cloud within the connected domain, calculate the cosine mean of the angle between the normal vector of each point cloud and the vertical direction, and use the cosine mean to characterize the integrity of the flower surface. The inverse of the cosine mean is normalized and used as the occlusion rate label.
[0007] As a further aspect of the present invention: obtaining the instance segmentation mask of the pluckable flower and the spatial pose of the invisible region specifically includes: Use the occlusion rate label as the baseline value for the depth feature weight, and set the color feature weight to 1 minus the baseline value; The local density gradient of the depth point cloud and the texture gradient of the color image are extracted separately, and the two gradients are superimposed according to their respective weights to generate a fused gradient field. Region growth is performed along the fusion gradient field, and the resulting connected components are used as segmentation masks for pickable flower instances. By performing spherical fitting on the nearest neighbor point cloud of the hole region within the mask, the resulting sphere center and radius represent the spatial pose of the invisible region.
[0008] As a further aspect of the present invention: S3 specifically includes: Based on the instance segmentation mask, extract the boundary contour point cloud with the largest depth jump within the mask, calculate the normal vector of each point in the boundary contour point cloud, and cluster the intersection of the extensions of all normal vectors and take the mean as the coordinate of the center of the envelope sphere. Calculate the mode of the distances from each point in the contour point cloud to the center of the sphere, and use the mode as the radius of the envelope sphere; Using the center of the sphere as the origin, search for continuous point cloud strips extending along the direction of gravity within the mask, fit the central axis of the continuous point cloud strips, and use the direction of the central axis as the stem direction vector.
[0009] As a further aspect of the present invention: the central axis of the fitted continuous point cloud strips specifically includes: With the center of the sphere as the origin, multiple horizontal cuts are generated along the negative direction of gravity with a fixed step size. The point cloud with the smallest horizontal distance from the center of the sphere on each cut is extracted as the seed point. Connect all seed points in depth order to form a spatial polyline. Collect neighboring point clouds with each point on the spatial polyline as the center and a preset radius as the threshold to form a continuous point cloud strip. Calculate the three-dimensional covariance structure of all points within a continuous point cloud strip, and take the eigendirection corresponding to the largest eigenvalue of the covariance as the stem direction vector.
[0010] As a further aspect of the present invention: S4 specifically includes: Project all the center coordinates of the spheres onto an initial plane that is perpendicular to the mean of the direction vector of the stem, and generate multiple parallel candidate planes with a preset step size in the normal direction of the initial plane. The number of sphere centers within one radius above and below each candidate plane is counted, and the proportion of these sphere centers to the total number of sphere centers is taken as the flower content rate. The ratio of the number of flower centers within the range below the candidate plane to the total number of flower centers is calculated as the bud content rate. The ratio of the number of stems cut off in the candidate plane to the total number of stems is used as the branch and leaf content. The optimal target is to have the highest flower content and the lowest bud content and leaf content. All candidate planes are traversed, and the plane position and normal deflection angle corresponding to the best plane are selected as the spatial pose parameters of the best combing and harvesting plane.
[0011] As a further aspect of the present invention: S5 specifically includes: The normal direction of the optimal combing and harvesting plane is used as the reference axis of the comb teeth, and the angle between the comb tooth axis and the reference axis is used as the stage attitude variable. The included angle during the combing stage is set to an acute angle of dive, the included angle is gradually reduced to zero degrees during the picking stage, the included angle is increased in the opposite direction to an acute angle of rise during the combing stage, and the included angle is instantly changed to an obtuse angle of dumping during the dumping stage. Based on the angle change at each stage, and combined with the tensile strength threshold of the flower stalk, the comb tooth spatial coordinates and axis direction at the start and end points of each stage are iteratively corrected. The corrected start and end points are then connected in series according to the harvesting sequence to generate the optimal comb tooth trajectory and attitude parameters.
[0012] As a further aspect of the present invention: the iterative correction of the comb tooth spatial coordinates and axis direction at the start and end points of each stage specifically includes: Using the direction of the comb tooth axis at each starting and ending point under the current stage of angle change as the initial value, calculate the estimated tensile stress at the contact point between the comb tooth and the flower stalk under the direction of the comb tooth axis. Compare the estimated tensile stress with the flower stalk tensile strength threshold. If it exceeds the flower stalk tensile strength threshold, deflect the axis direction of the start and end points around the axis perpendicular to the harvesting plane by a small step and recalculate the estimated tensile stress. Repeat the deflection until the estimated tensile stress is lower than the tensile strength threshold of the flower stalk, and use the final axial direction corresponding to the end position of the comb teeth as the corrected start and end point comb teeth spatial coordinates. The corrected start and end points are concatenated using cubic spline interpolation according to the harvesting sequence to generate the optimal comb tooth trajectory and attitude parameters.
[0013] The beneficial effects of this invention are: (1) By using the dual feature weight allocation with adaptive occlusion rate and the reconstruction of the spherical envelope surface, even when the flowers are partially or completely occluded by branches and leaves, the coordinates of the center of the sphere and the direction of the stem in the invisible picking area can still be calculated based on the visible phenotypic features and depth information. This solves the problem of difficulty in locating picking points due to incomplete phenotypic features, thereby reducing missed picking and incorrect picking.
[0014] (2) Based on the spatial pose parameters of the optimal combing and harvesting plane, and combined with the tensile strength threshold of the flower stalk, the starting and ending point poses of the four harvesting stages of combing in, picking, combing out and tilting are iteratively corrected so that the comb tooth trajectory and posture can dynamically adapt to the contact mechanical characteristics of the plant, avoid flower stalk breakage or branch damage caused by excessive tensile stress during the comb tooth movement, and achieve low-loss harvesting. Attached Figure Description
[0015] The invention will now be further described with reference to the accompanying drawings.
[0016] Figure 1 This is a flowchart of the method of the present invention; Figure 2 This is a flowchart of the process of obtaining the occlusion rate label in this invention. Detailed Implementation
[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0018] Please see Figure 1 As shown, this invention is a selective combing and harvesting method for marigolds based on visual perception and comb-plant interaction, comprising the following steps: S1: Collect the RGB image and corresponding depth image of the marigold in the target area as the data to be processed; S2: Extract the visible phenotypic features of marigolds from the data to be processed and estimate the occlusion degree of each flower to obtain the occlusion rate label. Then, perform adaptive dual feature weight allocation based on the occlusion rate label to obtain the instance segmentation mask of the pickable flowers and the spatial pose of the invisible area. S3: Based on the instance segmentation mask and spatial pose, perform spatial reconstruction of the spherical envelope surface and stem direction for the invisible picking area, and calculate the center coordinates, radius and stem direction vector of the flower's envelope sphere. S4: Based on the center coordinates, radius, and stem direction vector, and with flower content, bud content, and leaf content as evaluation constraints, execute the optimal harvesting plane solution strategy under multi-objective constraints to obtain the spatial pose parameters of the optimal combing harvesting plane; S5: Based on the spatial pose parameters of the optimal combing and harvesting plane, and combined with the mechanical characteristics of the contact between the comb teeth and the plant, perform phased pose decoupling optimization of the four harvesting stages of combing in, picking, combing out, and tilting, and output the optimal comb tooth trajectory and posture parameters.
[0019] In S1, the RGB image and corresponding depth image of the marigold in the target area are acquired as data to be processed, specifically including: A real-sensing depth camera is fixed on the front crossbeam of the marigold harvesting platform. The camera's RGB lens and infrared depth projector are angled downwards, with the camera's optical axis at an angle of 35 to 45 degrees to the vertical. The camera is positioned 60 to 80 centimeters off the ground. As the harvesting platform moves at a constant speed along the marigold planting rows, the camera's frame rate is set to 15 frames per second. Each time a capture is triggered, a 1920 x 1080 pixel RGB image and a depth image spatially aligned with the RGB image are simultaneously acquired. The value of each pixel in the depth image represents the Euclidean distance from the corresponding spatial point to the camera lens. During the acquisition process, no additional lighting is provided under natural field lighting conditions; imaging is achieved solely through the reflection signals from the marigold plants themselves. The RGB and depth images acquired each time are stored in pairs according to the acquisition timestamp. Each pair of RGB and depth images serves as the processing data for one iteration. In the processing data, the RGB image is used to identify the color and texture features of the marigold flowers, while the depth image provides distance information and geometric contours of the flowers and leaves in three-dimensional space.
[0020] Please see Figure 2 As shown, in S2, the visible phenotypic features of marigolds are extracted based on the data to be processed, and the occlusion degree of each flower is estimated to obtain an occlusion rate label. Based on the occlusion rate label, an adaptive dual-feature weight allocation is performed to obtain the instance segmentation mask of pluckable flowers and the spatial pose of the invisible region. Specifically, this includes: The RGB image is read from the data to be processed, and all pixels of the image are traversed. For each pixel, the red, green, and blue channel values are extracted. The absolute values of the differences between the red and green channels, and the absolute values of the differences between the red and blue channels are calculated. The maximum of the two absolute values is taken as the extreme value of the color difference for that pixel. After traversal, a histogram of the distribution of extreme values of color difference for all pixels in the image is plotted. The color difference value corresponding to the valley between the two peaks in the histogram is used as the segmentation threshold. Pixels with extreme values of color difference greater than the segmentation threshold are marked as flower pixels. All adjacent flower pixels are connected to form several disconnected regions, and each region is the connected component of a flower.
[0021] For each connected component of a flower, point cloud data within the corresponding coordinate range of that component is extracted from the depth image to obtain a 3D point cloud cluster for that flower. The normal vector of each point in the cluster is calculated as follows: A local plane is fitted between the point and its eight nearest neighboring point clouds, and the unit normal of this plane is used as the normal vector of that point. Then, the angle between this normal vector and the vertical direction (i.e., the direction of gravity, coordinates 0, 0, 1) is calculated, and the cosine of this angle is obtained across all point clouds. Finally, the arithmetic mean of these cosine values is calculated to obtain the cosine mean. This cosine mean is used to characterize the integrity of the flower surface; a larger value indicates a more complete flower surface and less occlusion.
[0022] Take the reciprocal of the cosine mean above, and then normalize the result. The normalization method is as follows: First, calculate the maximum and minimum values of the cosine mean of all flowers in the dataset. Then, subtract the minimum value from the reciprocal of the cosine mean of the current flower, and divide the result by the difference between the maximum and minimum values. The resulting value is between 0 and 1, and this value is the occlusion rate label for that flower. The closer the occlusion rate label is to 1, the more severe the occlusion.
[0023] The occlusion rate label is used as the weight benchmark for the depth feature, and the weight for the color feature is set to 1 minus this benchmark value. For example, if the occlusion rate of a flower is 0.6, then the weight of the depth feature is 0.6, and the weight of the color feature is 0.4.
[0024] Extracting the local density gradient of depth point clouds: For each point cloud in a point cloud cluster, count the number of points within a sphere with a radius of 1 cm centered on that point cloud. Use this count as the density value, and calculate the difference between the density values of that point cloud and its neighboring point clouds to obtain the density gradient direction. Extracting the texture gradient of color images: Convert the RGB image to a grayscale image, and use the Sobel operator to calculate the gradient magnitude of each pixel in the horizontal and vertical directions. Combine these to obtain the texture gradient direction.
[0025] The density gradient vector and texture gradient vector of each pixel are multiplied by their respective weights and then summed to obtain the fused gradient vector. The fused gradient vectors of all pixels constitute the fused gradient field. Starting from a seed pixel at the center of the flower's connected components, region growing is performed along the gradient descent direction in the fused gradient field (i.e., towards the flower's edge). Each time growing occurs, only adjacent pixels with a gradient direction deviation of less than 30 degrees are merged, until no further growing is possible. The connected component formed by all the grown pixels is the instance segmentation mask for the flower.
[0026] For the void regions created by occlusion within the instance segmentation mask (i.e., the set of pixels in the mask that are not marked as flower pixels but are surrounded by flower pixels), the corresponding point cloud in the depth image is extracted for these void regions. A sphere is fitted using the least squares method from the void point cloud and its 15 nearest neighbors to obtain the 3D coordinates of the sphere's center and its radius. The center coordinates represent the spatial location of the invisible picking area, and the radius represents the spatial pose scale of the invisible area. The center coordinates and radius are then used as the spatial pose of the invisible area.
[0027] In S3, based on the instance segmentation mask and spatial pose, spatial reconstruction of the spherical envelope surface and stem direction is performed on the invisible picking area to calculate the coordinates of the flower's envelope sphere, radius, and stem direction vector. Specifically, this includes: Based on the instance segmentation mask, the depth value corresponding to each pixel within the mask region is extracted from the depth image. For two adjacent pixels within the mask, the difference in their depth values is calculated and its absolute value is taken. If the absolute value is greater than 5 mm, the pixel with the larger depth value is marked as a depth transition boundary point. All adjacent pixels within the mask are traversed, and all boundary points are collected to form a boundary contour point cloud.
[0028] For each point cloud in the boundary contour point cloud, select the 10 point clouds with the closest Euclidean distance to it, and fit a local plane using the least squares method. Use the unit normal of this plane as the normal vector of the point cloud. After obtaining the normal vector of each point cloud, extend each normal vector along its direction to form a spatial straight line. For any two spatial straight lines, if the angle between their directions is less than 10 degrees and the shortest distance between the lines is less than 2 millimeters, calculate the coordinates of the intersection point of the two lines. Repeat the above operation for all pairs of lines to obtain the set of intersection points.
[0029] The mean-shift clustering algorithm is applied to the intersection point set: A bandwidth of 3 mm is set, and an intersection point is randomly selected as the initial cluster center. The mean of all intersection points within the bandwidth is calculated as the new center, and this process is repeated iteratively until the centers converge. Clusters with convergent centers less than 2 mm apart are merged, and the number of intersection points in each cluster is counted. The cluster with the most intersection points is selected. The arithmetic mean of the coordinates of all intersection points in this cluster is calculated, and this mean is used as the center coordinates of the envelope sphere. The formula for calculating the center coordinates is: ;in, This represents the three-dimensional coordinate vector of the center of the envelope sphere. This represents the total number of intersections contained in the cluster with the most intersections. Indicates the first in this cluster The summation symbol represents the summation of the three-dimensional coordinate vectors of all intersection points. The coordinate vectors of the intersection points are added dimension by dimension and then divided. .
[0030] For each point in the boundary contour point cloud, calculate the Euclidean distance from that point to the center of the sphere, obtaining a set of distance values. Count the frequency of each distance value in the entire data set, and take the distance value with the highest frequency as the mode. Determine this mode as the radius of the envelope sphere. If multiple distance values have the same highest frequency, take the arithmetic mean of these distance values as the radius.
[0031] Using the center of the envelope sphere as the origin, multiple horizontal planes are generated sequentially along the negative direction of gravity (i.e., vertically downward, represented by coordinates 0, 0, and -1) with a fixed step size of 2 millimeters. Each horizontal plane is a plane perpendicular to the direction of gravity, and its equation is that the coordinates of the gravity direction vector point are equal to the current depth value. For each horizontal plane, the point cloud with the smallest horizontal distance from the center of the sphere (i.e., the planar distance ignoring the vertical coordinates) is extracted as the seed point. If multiple point clouds on the same horizontal plane have the same minimum horizontal distance from the center of the sphere, the one with the smallest depth value is selected.
[0032] Connect all seed points sequentially according to their depth values in ascending order (i.e., from top to bottom) to obtain a spatial polyline. Using each point on the spatial polyline as the center, collect all point clouds within a radius threshold of 5 millimeters. Merge all collected point clouds, remove duplicates, and form a continuous point cloud strip.
[0033] Calculate the 3D covariance matrix of all points within the continuous point cloud strip. Assume there are a total of [missing information - likely referring to a number of points within the continuous point cloud strip]. There are point clouds, and the three-dimensional coordinates of each point cloud are as follows: ,in Take from 1 Calculate the average coordinates for each dimension. The formula for calculating each element in the covariance matrix is: ; where subscript and The values 1, 2, and 3 represent the three dimensions of the three-dimensional coordinate system. =1 or =1 corresponds to coordinate, =2 or =2 corresponds to coordinate, =3 or =3 corresponds to coordinate; Indicates the first The point cloud in the first Coordinates in the dimension Indicates the first The point cloud in the first Coordinates in the dimension; This indicates that all point clouds are in the [missing information] th [missing information]. Average coordinates in dimensional space. This indicates that all point clouds are in the [missing information] th [missing information]. The average of the coordinates in the dimensional dimension. This formula represents the ... Wei and Di Covariance between dimensions. Calculate all and The combination yields a 3x3 covariance matrix.
[0034] The covariance matrix above is subjected to eigenvalue decomposition, yielding three eigenvalues and their corresponding eigenvectors. The three eigenvalues are compared, and the eigenvalue with the largest value is selected. The direction of the eigenvector corresponding to this largest eigenvalue is determined as the stem direction vector. The three components of this direction vector represent the stem's orientation in the direction of rotation. , , The direction cosine on the axis. At this point, the coordinates of the center of the flower's envelope sphere, its radius, and the direction vector of the stem are calculated.
[0035] In S4, based on the sphere center coordinates, radius, and stem direction vector, and with flower content, bud content, and leaf content as evaluation constraints, a multi-objective constraint-based optimal harvesting plane solution strategy is executed to obtain the spatial pose parameters of the optimal combing harvesting plane, specifically including: The coordinates of the centers of the flower-enveloping spheres are aggregated into a cloud of center points. The arithmetic mean of the stem direction vectors corresponding to all center points is calculated to obtain the average stem direction vector. An initial plane is constructed, which is perpendicular to the average stem direction vector and passes through the geometric centroid of the cloud of center points. Using this initial plane as a reference, five parallel candidate planes are generated in both the positive and negative directions along its normal (i.e., the direction of the average stem direction vector) with a step size of 5 mm, resulting in a total of 11 parallel candidate planes including the initial plane.
[0036] For each candidate plane, calculate the number of sphere centers within a radius range above and below the plane. The radius range is taken from the radius of the envelope sphere corresponding to the flower; if different flowers have different radii, the arithmetic mean of all radii is used. Add the number of sphere centers within the two ranges to obtain the total number of sphere centers within each radius range above and below the candidate plane. Divide this total by the total number of sphere centers in the cloud of all sphere centers, and the resulting ratio is the flower content rate.
[0037] Calculate the number of sphere centers below each candidate plane (i.e., on the side along the negative direction of gravity), divide this number by the total number of sphere centers, and use the resulting ratio as the bud-bearing rate. The larger this ratio, the more unopened buds are below the candidate plane.
[0038] Calculate the intersection point of each candidate plane with the direction vector of each stem. Specifically, for each stem corresponding to a flower, treat the stem direction vector as a straight line and find the coordinates of the intersection point between this line and the candidate plane. If the intersection point is located within 20 mm of the center of the flower's envelope extending positively along the stem direction, then the stem is considered to have been truncated by the candidate plane. Count the number of truncated stems, divide it by the total number of stems, and use the resulting ratio as the branch and leaf content.
[0039] The optimal target was to have the highest flower content, the lowest bud content, and the lowest branch and leaf content. All 11 candidate planes were traversed and screened. If multiple candidate planes simultaneously met the criteria of having the highest flower content and the lowest bud and branch / leaf content, the plane with the largest difference between the flower content and bud content was selected. The spatial position of this optimal plane (i.e., its coordinates in 3D space) and the angle (in degrees) between its normal and the average stem direction vector were used as the spatial pose parameters of the best combing and harvesting plane. The angle was calculated by taking the dot product of the optimal plane's normal and the average stem direction vector, dividing the dot product by the product of their magnitudes, and then taking the inverse cosine to obtain the angle.
[0040] In S5, based on the spatial pose parameters of the optimal combing harvesting plane and combined with the mechanical characteristics of the contact between the comb teeth and the plant, stage-by-stage pose decoupling optimization is performed for the four harvesting stages: combing in, picking, combing out, and tilting. The optimal comb tooth trajectory and posture parameters are output, specifically including: The normal direction of the optimal combing and harvesting plane is defined as the comb tooth reference axis. The stage attitude variable is defined as the angle between the comb tooth's own axis and this reference axis, ranging from 0 to 180 degrees. At the start of the combing-in stage, the angle between the comb tooth axis and the reference axis is set to 30 degrees, with the direction being downward; this value is the acute angle of attack. During the harvesting stage, the angle remains at 30 degrees, gradually decreasing as the comb teeth approach the reference axis, until it reaches 0 degrees at the end of the harvesting stage. In the combing-out stage, the angle starts at 0 degrees and gradually increases in the opposite direction to a 30-degree elevation angle; this value is the acute angle of elevation. In the pouring stage, the angle starts at 30 degrees and jumps instantaneously to 110 degrees when the comb teeth reach their highest point; this value is the obtuse angle of pouring, used to pour the flowers into the collection container.
[0041] For each harvesting stage, iterative corrections are performed at the start and end points. The change in the angle between the start and end points of the current stage is taken (e.g., the start point of the combing stage is 30 degrees, and the end point is 0 degrees, with a change of 30 degrees), and the direction of the comb tooth axis corresponding to this angle is taken as the initial direction. The estimated tensile stress at the contact point between the comb tooth and the flower stalk under this initial direction is calculated. The method for calculating the estimated tensile stress is as follows: the projected area of the contact area between the front end of the comb tooth and the flower stalk is measured, with an area of 2 square millimeters; the tensile force exerted on the flower stalk by the comb tooth when moving along the current axis and trajectory is measured. This tensile force is obtained by pre-calibrating a miniature tensile force sensor installed at the root of the comb tooth. The calibration curve is a linear relationship between the tensile force and the angle, with a slope of 0.5 Newtons per degree; the estimated tensile force value is obtained by multiplying the difference between the current angle and the initial angle by the slope; the estimated tensile force value is divided by the contact area to obtain the estimated tensile stress, in megapascals.
[0042] To determine the tensile strength threshold of marigold flower stalks, 100 marigolds were harvested under laboratory conditions. A universal testing machine was used to measure the maximum tensile stress at which the flower stalks broke at a tensile speed of 5 mm / s. The average value was calculated, and one standard deviation was subtracted from this average value. This average value was taken as the tensile strength threshold of the flower stalks, which was 2.0 MPa. The estimated tensile stress calculated in the previous step was compared with the 2.0 MPa threshold: if the estimated tensile stress was less than 2.0 MPa, the current axial direction remained unchanged; if the estimated tensile stress was greater than or equal to 2.0 MPa, the axial direction of the starting and ending points was deflected by 1 degree around an axis perpendicular to the optimal combing and harvesting plane. The deflection direction was chosen to reduce the contact force between the comb teeth and the flower stalk. The estimated tensile stress under the new direction was then recalculated.
[0043] Repeat the above deflection operation, recalculating the estimated tensile stress after each deflection, until the estimated tensile stress is below 2.0 MPa, at which point the deflection stops. Record the direction of the comb tooth axis at this point, and based on the spatial geometric relationship between this axis direction and the comb tooth reference axis, solve for the three-dimensional coordinates of the comb tooth end in space. The specific solution method is as follows: Given the coordinates of the fixed hinge point of the comb tooth and the comb tooth length (taken as 80 mm), calculate the offset of the end point relative to the hinge point based on the axis direction. Add the hinge point coordinates to the offset to obtain the coordinates of the comb tooth end, and use these coordinates as the corrected spatial coordinates of the start and end points of the comb tooth in this stage.
[0044] The corrected start and end points are arranged sequentially according to the harvesting time sequence (i.e., combing entry point, combing entry / harvesting start point, harvesting / combing exit point, combing exit / tipping start point, and tipping end point). A cubic spline interpolation method is used, setting the number of interpolation points between each adjacent pair to 20. A piecewise cubic polynomial function is constructed so that the trajectory curve passes through all corrected start and end points and its first derivative is continuous. The continuous spatial point sequence obtained by interpolation is taken as the optimal comb tooth trajectory. The comb tooth axis direction corresponding to each spatial point is obtained by linear interpolation of the included angle of the stage in which that point is located, forming complete attitude parameters. This optimal comb tooth trajectory and attitude parameters are output to drive the electromechanical actuator to complete the harvesting action.
[0045] The working principle of this invention is as follows: RGB and depth images of marigolds are acquired as data to be processed; visible phenotypic features are extracted from the data to be processed, and the occlusion degree of each flower is estimated to obtain an occlusion rate label; adaptive dual-feature weight allocation is performed based on the occlusion rate label to obtain the instance segmentation mask and the spatial pose of the invisible region; spatial reconstruction of the spherical envelope surface and stem direction is performed based on the mask and spatial pose to calculate the center coordinates, radius, and stem direction vector of the flower envelope sphere; based on the center coordinates, radius, and stem direction vector, the spatial pose parameters of the optimal combing and harvesting plane are solved with flower content, bud content, and leaf content as evaluation constraints; based on these spatial pose parameters and the mechanical properties of the contact between the comb teeth and the plant, staged pose decoupling optimization is performed for the four harvesting stages of combing in, picking, combing out, and tilting, and the optimal comb tooth trajectory and posture parameters are output.
[0046] The foregoing has provided a detailed description of one embodiment of the present invention, but this description is merely a preferred embodiment and should not be construed as limiting the scope of the invention. All equivalent variations and modifications made within the scope of the claims of this invention should still fall within the patent coverage of this invention.
Claims
1. A selective combing and harvesting method for marigolds based on visual perception and comb-plant interaction, characterized in that, Includes the following steps: S1: Collect the RGB image and corresponding depth image of the marigold in the target area as the data to be processed; S2: Extract the visible phenotypic features of marigolds from the data to be processed and estimate the occlusion degree of each flower to obtain the occlusion rate label. Then, perform adaptive dual feature weight allocation based on the occlusion rate label to obtain the instance segmentation mask of the pickable flowers and the spatial pose of the invisible area. S3: Based on the instance segmentation mask and spatial pose, perform spatial reconstruction of the spherical envelope surface and stem direction for the invisible picking area, and calculate the center coordinates, radius and stem direction vector of the flower's envelope sphere. S4: Based on the center coordinates, radius, and stem direction vector, and with flower content, bud content, and leaf content as evaluation constraints, execute the optimal harvesting plane solution strategy under multi-objective constraints to obtain the spatial pose parameters of the optimal combing harvesting plane; S5: Based on the spatial pose parameters of the optimal combing and harvesting plane, and combined with the mechanical characteristics of the contact between the comb teeth and the plant, perform phased pose decoupling optimization of the four harvesting stages of combing in, picking, combing out, and tilting, and output the optimal comb tooth trajectory and posture parameters.
2. The selective combing and harvesting method for marigolds based on visual perception and comb-plant interaction according to claim 1, characterized in that, The process of obtaining the occlusion rate label is as follows: By iterating through each pixel of the RGB image, calculating the extreme values of the color difference in the red, green, and blue channels, the connected components where the flower is located are segmented accordingly. Extract the depth point cloud within the connected domain, calculate the cosine mean of the angle between the normal vector of each point cloud and the vertical direction, and use the cosine mean to characterize the integrity of the flower surface. The inverse of the cosine mean is normalized and used as the occlusion rate label.
3. The selective combing and harvesting method for marigolds based on visual perception and comb-plant interaction according to claim 1, characterized in that, The process of obtaining the instance segmentation mask of the pluckable flower and the spatial pose of the invisible region specifically includes: Use the occlusion rate label as the baseline value for the depth feature weight, and set the color feature weight to 1 minus the baseline value; The local density gradient of the depth point cloud and the texture gradient of the color image are extracted separately, and the two gradients are superimposed according to their respective weights to generate a fused gradient field. Region growth is performed along the fusion gradient field, and the resulting connected components are used as segmentation masks for pickable flower instances. By performing spherical fitting on the nearest neighbor point cloud of the hole region within the mask, the resulting sphere center and radius represent the spatial pose of the invisible region.
4. The selective combing and harvesting method for marigolds based on visual perception and comb-plant interaction according to claim 1, characterized in that, S3 specifically includes: Based on the instance segmentation mask, extract the boundary contour point cloud with the largest depth jump within the mask, calculate the normal vector of each point in the boundary contour point cloud, and cluster the intersection of the extensions of all normal vectors and take the mean as the coordinate of the center of the envelope sphere. Calculate the mode of the distances from each point in the contour point cloud to the center of the sphere, and use the mode as the radius of the envelope sphere; Using the center of the sphere as the origin, search for continuous point cloud strips extending along the direction of gravity within the mask, fit the central axis of the continuous point cloud strips, and use the direction of the central axis as the stem direction vector.
5. The selective combing and harvesting method for marigolds based on visual perception and comb-plant interaction according to claim 4, characterized in that, The central axis of the fitted continuous point cloud strips specifically includes: With the center of the sphere as the origin, multiple horizontal cuts are generated along the negative direction of gravity with a fixed step size. The point cloud with the smallest horizontal distance from the center of the sphere on each cut is extracted as the seed point. Connect all seed points in depth order to form a spatial polyline. Collect neighboring point clouds with each point on the spatial polyline as the center and a preset radius as the threshold to form a continuous point cloud strip. Calculate the three-dimensional covariance structure of all points within a continuous point cloud strip, and take the eigendirection corresponding to the largest eigenvalue of the covariance as the stem direction vector.
6. The selective combing and harvesting method for marigolds based on visual perception and comb-plant interaction according to claim 1, characterized in that, S4 specifically includes: Project all the center coordinates of the spheres onto an initial plane that is perpendicular to the mean of the direction vector of the stem, and generate multiple parallel candidate planes with a preset step size in the normal direction of the initial plane. The number of sphere centers within one radius above and below each candidate plane is counted, and the proportion of these sphere centers to the total number of sphere centers is taken as the flower content rate. The ratio of the number of flower centers within the range below the candidate plane to the total number of flower centers is calculated as the bud content rate. The ratio of the number of stems cut off in the candidate plane to the total number of stems is used as the branch and leaf content. The optimal target is to have the highest flower content and the lowest bud content and leaf content. All candidate planes are traversed, and the plane position and normal deflection angle corresponding to the best plane are selected as the spatial pose parameters of the best combing and harvesting plane.
7. The selective combing and harvesting method for marigolds based on visual perception and comb-plant interaction according to claim 1, characterized in that, S5 specifically includes: The normal direction of the optimal combing and harvesting plane is used as the reference axis of the comb teeth, and the angle between the comb tooth axis and the reference axis is used as the stage attitude variable. The included angle during the combing stage is set to an acute angle of dive, the included angle is gradually reduced to zero degrees during the picking stage, the included angle is increased in the opposite direction to an acute angle of rise during the combing stage, and the included angle is instantly changed to an obtuse angle of dumping during the dumping stage. Based on the angle change at each stage, and combined with the tensile strength threshold of the flower stalk, the comb tooth spatial coordinates and axis direction at the start and end points of each stage are iteratively corrected. The corrected start and end points are then connected in series according to the harvesting sequence to generate the optimal comb tooth trajectory and attitude parameters.
8. The selective combing and harvesting method for marigolds based on visual perception and comb-plant interaction according to claim 1, characterized in that, The iterative correction of the comb tooth spatial coordinates and axis direction at the start and end points of each stage specifically includes: Using the direction of the comb tooth axis at each starting and ending point under the current stage of angle change as the initial value, calculate the estimated tensile stress at the contact point between the comb tooth and the flower stalk under the direction of the comb tooth axis. Compare the estimated tensile stress with the flower stalk tensile strength threshold. If it exceeds the flower stalk tensile strength threshold, deflect the axis direction of the start and end points around the axis perpendicular to the harvesting plane by a small step and recalculate the estimated tensile stress. Repeat the deflection until the estimated tensile stress is lower than the tensile strength threshold of the flower stalk, and use the final axial direction corresponding to the end position of the comb teeth as the corrected start and end point comb teeth spatial coordinates. The corrected start and end points are concatenated using cubic spline interpolation according to the harvesting sequence to generate the optimal comb tooth trajectory and attitude parameters.
