Visual recognition method and application for asparagus picking

By using image processing technology to separate daylily plants from the background at the pixel level and determine their maturity, and combining the YOLO model and maturity grading model, the harvesting of daylilies has been made more precise and intelligent, improving harvesting efficiency and standardization, and meeting the needs of large-scale daylily cultivation.

CN122156973APending Publication Date: 2026-06-05NOBOT INTELLIGENT EQUIP (SHANDONG) CO LTD +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NOBOT INTELLIGENT EQUIP (SHANDONG) CO LTD
Filing Date
2026-03-05
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Currently, daylily harvesting mainly relies on manual labor, which is inefficient, labor-intensive, and the maturity determination is easily affected by subjective factors, making it difficult to adapt to the needs of large-scale and standardized production. Existing visual recognition technology has poor adaptability when daylily plants are slender and flower buds and stems and leaves easily overlap.

Method used

Image processing techniques are used to separate daylily plants from the background at the pixel level. Region growth and K-means clustering are combined to process the edge transition area. The YOLO model is used to divide the occluded and non-occluded areas. A lightweight maturity grading model is constructed, and the maturity is determined by integrating RGB three-channel color features. The pixel coordinates of the picking point are output to enable robot picking.

Benefits of technology

It has enabled precise and intelligent harvesting of daylilies, improved harvesting efficiency and standardization, solved the problems of low efficiency and subjective judgment in manual harvesting, and met the needs of large-scale daylily cultivation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122156973A_ABST
    Figure CN122156973A_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of image processing, and particularly relates to a visual recognition method for harvesting day lily and application. The method comprises the following steps: collecting day lily images and preliminarily dividing plant and background regions, realizing pixel-level separation through clustering and neighborhood optimization; dividing the occlusion and non-occlusion regions through a YOLO model, and completing the day lily integrity discrimination through double parallel branches; inputting qualified samples into a pre-trained maturity grading model to screen harvestable targets, and outputting the harvesting point pixel coordinates to connect the control system of the harvesting robot. The present application improves the accuracy and efficiency of day lily recognition, realizes the intelligent connection of visual recognition and execution, and adapts to the large-scale and standardized planting production requirements of day lily.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of image processing technology, and in particular relates to a visual recognition method and application for daylily harvesting. Background Technology

[0002] Daylily is an important economic crop in my country, and its harvesting requires extremely high timeliness and precision. Daylily buds mature quickly and have a short flowering period; if not harvested in time, they easily open and lose their commercial value. Currently, daylily harvesting is still mainly done manually. Manual harvesting is not only inefficient and labor-intensive, but also faces the problem of rising labor costs year by year. Furthermore, the maturity judgment of manual harvesting is easily affected by subjective factors, resulting in inconsistent harvest quality, which is difficult to adapt to the needs of large-scale and standardized planting and production. Upgrading the daylily industry to automated and intelligent harvesting has become an urgent need for the industry's development. Moreover, the existing visual recognition technology used in daylily harvesting has many compatibility issues when applied to the slender shape of daylily plants and the tendency for buds and stems to overlap. Summary of the Invention

[0003] In view of the technical problems existing in the background art, the present invention proposes a visual recognition method and application for daylily harvesting.

[0004] To achieve the above objectives, the technical solution adopted by the present invention includes the following steps:

[0005] S1. Collect images of each daylily plant and perform preliminary regional division of the collected images to distinguish the daylily plant from the background area;

[0006] S2. Based on the plant and background regions of the preliminary region division, the edge regions of the two regions are set, and the pixel gray values ​​in the edge regions are clustered to complete the pixel-level separation of the foreground and background of the daylily plant, and only the foreground image of the daylily plant region is retained.

[0007] S3. Divide the foreground image into two categories: non-occluded area and occluded area. Set up a parallel fast judgment branch for non-occluded area and an analysis and judgment branch for occluded area to complete the daylily integrity judgment for the two types of areas respectively, and select qualified samples that meet the preset admission criteria.

[0008] S4. For the standard qualified samples, input them into the pre-trained maturity grading model to complete the maturity level judgment and screen out the harvestable targets that meet the preset picking standards.

[0009] S5. For harvestable targets, obtain the pixel coordinates of the harvesting point in the two-dimensional image coordinate system, and input the obtained pixel coordinates of the harvesting point into the harvesting robot control system to complete the visual recognition and harvesting execution.

[0010] Preferably, step S1, which involves acquiring images of each daylily plant and performing preliminary region segmentation on the acquired images to distinguish the daylily plants from the background region, includes:

[0011] S11. Perform Gaussian filtering to denoise the acquired daylily RGB image, and then perform channel normalization processing pixel by pixel to obtain the normalized channel values: ;

[0012] S12. The prior distribution of daylily ratios was obtained through large-scale field calibration. By defining its effective interval, the mean and standard deviation of the ratio prior distribution of multiple daylily images are obtained, and an enhancement index is constructed.

[0013] S13. Based on the exponentially enhanced image, perform grayscale projection in the horizontal and vertical directions respectively to generate a horizontal projection curve. Detect the global peak of the projection curve. The coordinates corresponding to the peak are the shape center. Within a circular area with a preset radius centered on the peak, select pixels whose exponentially enhanced image values ​​are greater than the adaptive threshold as initial seed points.

[0014] S14. Construct a comprehensive confidence map. Starting from the initial seed point, perform a single round of fast region growth with an 8-neighborhood as the search range. For the neighboring pixels of the current seed point, if its comprehensive confidence is greater than the global adaptive confidence threshold, then mark the pixel as the foreground region of the daylily plant and add it to the seed point queue to continue growing; otherwise, mark it as the background region and do not grow it.

[0015] S15. Perform morphological closing operation on the finally generated foreground binary mask to fill the tiny holes in the plant area; remove isolated noise areas with an area smaller than the preset minimum area threshold; and finally output the preliminary segmentation result.

[0016] Preferably, step S2, based on the initially divided plant and background regions, sets the edge regions of the two regions, clusters the pixel grayscale values ​​in the edge regions, and completes pixel-level separation of the foreground and background of the daylily plant, retaining only the foreground image of the daylily plant region. This includes:

[0017] S21. Based on the preliminary division of the foreground binary mask, extract the outer contour of the plant foreground region; using the outer contour as a reference, extend the preset width to the interior of the foreground and the exterior of the background to generate an edge transition region containing transition pixels.

[0018] S22. Extract multi-dimensional feature vectors for each pixel within the edge transition region;

[0019] S23. Using the preliminary division results as a priori, within the edge transition region, select the pixel set belonging to the preliminary foreground and the pixel set belonging to the preliminary background respectively, and calculate the feature mean of the two as the initial cluster center.

[0020] S24. Based on the initial cluster centers, perform K-means clustering on all pixels in the edge transition area to obtain pixel-level foreground and background classification results;

[0021] S25. Perform neighborhood continuity optimization on the classification results of the edge transition region obtained by clustering. For each pixel in the edge transition region, count the number of pixels belonging to the foreground category and the number of pixels belonging to the background category in its 8 neighborhoods. If the number of pixels in the foreground category is greater than the number of pixels in the background category, then mark the pixel as the foreground; otherwise, mark it as the background. Only retain the foreground image of daylily.

[0022] Preferably, the division of the foreground image into two categories, unoccluded region and occluded region, in step S3 is achieved by detecting and dividing the region using a pre-trained YOLO model.

[0023] Preferably, the parallel non-occluded region fast determination branch and occluded region analysis and determination branch set in step S3 specifically include:

[0024] The fast determination branch is to extract the outer contour of the daylily image in each non-occluded region with a single pixel width, perform equal-interval resampling on the outer contour to obtain a standardized contour, calculate the curvature of each point on the standardized contour, construct a curvature feature vector, calculate its cosine similarity with the calibrated qualified complete feature vector, and if the cosine similarity is greater than the preset threshold, it is determined to be qualified; otherwise, it is unqualified.

[0025] The analysis and judgment branch first splits the image of the occluded area into individual daylily images, and then performs a rapid judgment to determine the integrity.

[0026] Preferably, the implementation of splitting the image of the occluded area into individual daylily images is as follows:

[0027] S31. For the occluded area, extract its single-pixel width outer contour and use principal component analysis to calculate the principal axis direction of the outer contour.

[0028] S32. Perform equal-interval sampling along the main axis direction. At each sampling position, measure the actual width of the contour along the direction perpendicular to the main axis to obtain the visible width sequence.

[0029] S33. Construct a width distribution model, and use the least squares method to fit the model parameters with the visible width sequence as a constraint to obtain the complete width curve;

[0030] S34. Generate symmetrical contour points for each position based on the fitted full width curve; stitch these completed contour points with the visible contour to obtain the completed closed contour, thus completing the splitting of the occluded daylily.

[0031] Preferably, the pre-trained maturity grading model in step S4 consists of an input layer, a feature extraction layer, a classification decision layer, and an output layer connected sequentially.

[0032] The input layer is used to input the filtered samples that meet the required integrity level;

[0033] The feature extraction layer performs channel-dimensional feature fusion on the color information of the RGB three channels through convolution, and outputs a color feature map.

[0034] The classification decision layer includes a fully connected layer, which converts the output color feature map into a color feature vector through global average pooling, and then maps it to two levels: maturity.

[0035] The output layer uses the Softmax activation function to normalize the output of the classification decision layer, obtaining the probability value of each maturity level, and selecting the level with the highest probability value as the maturity result.

[0036] Preferably, in step S5, the pixel coordinates of the picking point are the positions where the daylily is broken off at the bottom.

[0037] Compared with existing technologies, the advantages and positive effects of this invention are as follows: It achieves pixel-level precise separation of foreground and background; it solves the problems of edge misjudgment and insufficient accuracy in traditional methods by initially dividing the region through region growing combined with K-means clustering and neighborhood optimization to process the edge transition area; it uses YOLO to divide occluded and unoccluded regions, designs a parallel dual-branch to complete the integrity judgment, and achieves the splitting of occluded regions through contour fitting and completion, adapting to the slender and easily overlapping morphological characteristics of daylilies; it constructs a lightweight maturity grading model, integrating RGB three-channel color features to achieve accurate maturity determination; and it outputs precise picking point pixel coordinates to connect with the robot system, realizing intelligent connection between recognition and picking, significantly improving picking efficiency and standardization, effectively solving the problems of low efficiency and subjective judgment in manual picking, and adapting to the needs of large-scale daylily planting and production. Attached Figure Description

[0038] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0039] Figure 1 This is a flowchart illustrating a visual recognition method and its application for daylily harvesting. Detailed Implementation

[0040] To better understand the above-mentioned objectives, features, and advantages of the present invention, the present invention will be further described below in conjunction with the accompanying drawings and embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.

[0041] Numerous specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways than those described herein, and therefore the invention is not limited to the specific embodiments disclosed in the following specification.

[0042] In this embodiment, existing visual recognition technologies for crop harvesting are mostly designed for fruits and vegetables with regular shapes and minimal occlusion. However, their application to daylily harvesting presents several compatibility issues: daylily plants are slender, and buds and stems easily overlap; traditional recognition methods can only achieve region-level segmentation, lacking sufficient pixel-level separation accuracy, and are prone to misjudgment in edge transition areas. This invention discloses a visual recognition method and application for daylily harvesting, referring to… Figure 1 .

[0043] First, images of each daylily plant were collected, and the collected images were initially divided into regions to distinguish the daylily plants from the background area.

[0044] Furthermore, the preliminary region segmentation of the acquired images to distinguish daylily plants from the background is specifically implemented by performing a 5×5 Gaussian filter to denoise the acquired daylily RGB image, and then performing channel normalization processing pixel by pixel to obtain normalized channel values. , , ,in, For pixel coordinates, These are the grayscale values ​​of the three channels of the original image. To avoid the minimum value where the denominator is zero.

[0045] The prior distribution of daylily ratios was obtained through large-scale field calibration. By defining its effective interval, the mean and standard deviation of the prior distribution of the ratios of multiple daylily images were obtained, and an enhancement index was constructed. The first part is the spectral enhancement term, which obtains the optimal discrimination coefficient through large-sample linear discriminant analysis, enhancing the green channel while retaining the positive contribution of the red channel; the second part is the prior constraint Gaussian kernel, which has a kernel function value close to 1 only when the ratio of pixels falls within the prior interval, thus preserving the exponential enhancement effect.

[0046] Based on exponentially enhanced images Grayscale projections are performed in both the horizontal and vertical directions to generate a horizontal projection curve. and Where H and W are the height and width of the image, respectively, the global peak of the projection curve is detected, and the coordinates of the peak are... With the shape center, Within a circular region of a preset radius r centered on [the target area], select... Pixels with values ​​greater than the adaptive threshold are used as initial seed points.

[0047] Then construct the comprehensive confidence plot. : ,in The spatially constrained bandwidth (typically 1 / 4 of the image width) is used. The closer a pixel is to the center of the shape, the higher its spatial weight; the farther away from the center, the lower the weight.

[0048] Starting from the initial seed point, a single round of fast region growing is performed with an 8-neighborhood as the search range. For the neighboring pixels of the current seed point... If its overall confidence level is: If the value is greater than the global adaptive confidence threshold, the pixel is marked as a foreground region of the daylily plant and added to the seed point queue to continue growing; otherwise, it is marked as a background region and no growth occurs. The adaptive confidence threshold is calculated on the comprehensive confidence map using the Otsu method.

[0049] A morphological closing operation is performed on the generated foreground binary mask to fill the tiny holes within the plant area; isolated noise regions with an area smaller than the preset minimum area threshold are removed; and the preliminary segmentation result is finally output.

[0050] Next, after dividing the plant and background areas, based on the initial division of the plant and background areas, the edge regions of the two regions are set, and the pixel gray values ​​in the edge regions are clustered to complete the pixel-level separation of the foreground and background of the daylily plant, retaining only the foreground image of the daylily plant area.

[0051] Specifically, based on the initial foreground binary mask, the outer contour of the plant's foreground region is extracted; using the outer contour as a reference, a preset width is extended both inside the foreground and outside the background. (Typically 3 to 5 pixels) Generate an edge transition region containing transition pixels. For the edge transition region Each pixel within Extracting multi-dimensional feature vectors: ,in, The gradient magnitude of the pixel. This is the normalized channel value obtained.

[0052] Using the preliminary division results as a priori, in the edge transition region Within, select the pixel sets belonging to the initial foreground. and the set of pixels belonging to the initial background The mean of the features of both is calculated as the initial cluster centers. and ,in, , In the formula, Sets and The number of pixels. Based on the initial cluster centers, for the edge transition region. K-means clustering is performed on all pixels within the range to obtain pixel-level foreground classification results. and background classification results The neighborhood continuity optimization is performed on the classification results of the edge transition regions obtained by clustering. For each pixel in the edge transition region... Statistics show that its 8 neighboring regions belong to the foreground category. Number of pixels and belongs to the background category Number of pixels ,like > If the pixel is positive, it is marked as foreground; otherwise, it is marked as background, and only the foreground image of the daylily is retained.

[0053] Then, the foreground image is divided into two categories, non-occluded region and occluded region, by using a pre-trained YOLO model. Parallel branches are set up for fast determination of non-occluded region and analysis and determination of occluded region to complete the determination of the integrity of daylily in the two types of regions, and qualified samples that meet the preset admission criteria are selected.

[0054] The fast determination branch involves extracting the outer contour of the daylily image in each non-occluded region, with a width of one pixel. Where N is the total number of contour points, equal-interval resampling is performed on the outer contour to obtain a standardized contour with a fixed number of points. Calculate the standardized contour. curvature at each point The curvature feature vector is constructed, and its cosine similarity with the calibrated qualified complete feature vector is calculated. If the cosine similarity is greater than the preset threshold, it is judged as qualified; otherwise, it is unqualified.

[0055] The analysis and judgment branch first splits the image of the occluded area into individual daylily images, and then performs a rapid judgment to determine the integrity.

[0056] Furthermore, the process of splitting the image of the occluded region into individual daylily images involves extracting the outer contour of the occluded region with a single pixel width and calculating the principal axis direction of the outer contour using principal component analysis; performing equal-interval sampling along the principal axis direction; and measuring the actual width of the contour at each sampling position along a direction perpendicular to the principal axis to obtain a visible width sequence; and constructing a width distribution model. The model parameters, including the maximum width A, are obtained by fitting the model using the least squares method with the visible width sequence as a constraint. Average width The standard deviation of the width is used to obtain the complete width curve; symmetrical contour points are generated at each position based on the fitted complete width curve; these completed contour points are spliced ​​with the visible contour to obtain the completed closed contour, thus completing the disassembly of the occluded daylily.

[0057] In addition, after selecting qualified samples that meet the preset admission criteria, the qualified samples are input into a pre-trained maturity grading model to complete the maturity level judgment and select harvestable targets that meet the preset picking criteria.

[0058] The pre-trained maturity grading model consists of an input layer, a feature extraction layer, a classification decision layer, and an output layer connected sequentially. The input layer receives samples that have passed the initial screening for maturity. The feature extraction layer performs channel-dimensional feature fusion on the RGB three-channel color information through convolution, outputting a color feature map. The classification decision layer includes a fully connected layer that converts the output color feature map into a color feature vector through global average pooling, and then maps it to two maturity levels (whether it's mature or not). The output layer uses a Softmax activation function to normalize the output of the classification decision layer, obtaining a probability value for each maturity level, and selecting the level with the highest probability value as the maturity result. Specifically, the input layer is the model's entry point, and its core task is to receive samples that pass the maturity screening and standardize the data, laying the foundation for subsequent feature extraction. First, the samples received by the input layer need to undergo pre-screening and be standardized to 224×224 pixels, excluding invalid samples that do not pass the maturity screening. After receiving qualified samples, the input layer performs two key preprocessing steps: first, pixel value normalization; second, dimension normalization, which converts a single image into a tensor with dimensions [1, 224, 224, 3] (for batch input, it is [batch_size, 224, 224, 3], where batch_size is the number of samples in the batch, and 3 corresponds to the three RGB channels).

[0059] The feature extraction layer uses two-dimensional convolution (Conv2D) as the core operator. The specific parameter design takes into account both feature representation and computational efficiency: the convolution kernel size is set to 3×3 with a stride of 1; the number of convolution kernels is set to 32 to expand the channel dimension and realize multi-dimensional feature fusion. During execution, the 32 3×3 convolution kernels perform a weighted summation of the input RGB three-channel tensor pixel by pixel: each convolution kernel contains 3 sets of weights (corresponding to the three RGB channels), and the red, green, and blue pixel values ​​in the local 3×3 region are weighted and summed, plus a bias term, and finally output a single-channel feature map with fused channel features; the 32 convolution kernels output a 32-channel color feature map with dimensions [batch_size, 224, 224, 32]. To enhance feature representation, a ReLU activation function is applied after the convolution operation to prevent the model from getting stuck in linear fitting. Simultaneously, batch normalization is added to normalize the mean and variance of the feature values ​​for each channel, accelerating model training convergence and reducing distributional differences between different batches of samples. The final output is a 32-channel color feature map.

[0060] The core of the classification decision layer is to transform high-dimensional feature maps into classification results, which includes two key steps: global average pooling and a fully connected layer. The first step is global average pooling: transforming the 32-channel, 224×224 two-dimensional feature map output from the feature extraction layer into a one-dimensional feature vector. Specifically, this involves averaging the pixel values ​​of each channel. For example, in a 32-channel feature map, averaging the 224×224 pixels in each channel yields one value, ultimately generating a 32-dimensional feature vector (dimension [batch_size, 32]). Compared to traditional flattening and fully connected methods, global average pooling significantly reduces the number of parameters (avoiding overfitting) while preserving channel-level global color features. The second step is fully connected layer mapping: setting up a fully connected layer with a 32-dimensional feature vector as input and a 2-dimensional output (corresponding to "mature" and "immature" levels). The fully connected layer maps the 32-dimensional color features to a binary classification space using a trainable weight matrix and bias vector.

[0061] The output layer normalizes the classification results using the Softmax activation function, outputting the probability value for each maturity level and determining the final result. The Softmax function calculates the probability value for the 2D vector output by the fully connected layer, and the sum of the probabilities for the two levels is 1. The model selects the level with the highest probability value as the maturity result. During the pre-training phase, the output layer also calculates the error between the predicted probability and the true label using the cross-entropy loss function, updating the parameters of the convolutional and fully connected layers through backpropagation until the model loss converges and the classification accuracy reaches the target. The pre-trained maturity grading model then determines the maturity level and selects harvestable targets that meet the preset picking criteria.

[0062] Finally, for harvestable targets, the pixel coordinates of the harvesting point in a two-dimensional image coordinate system are obtained, and these coordinates are input into the harvesting robot control system to complete visual recognition and harvesting execution. The pixel coordinates of the harvesting point refer to the location where the bottom of the daylily is broken off.

[0063] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments for application in other fields. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.

Claims

1. A visual recognition method for daylily harvesting, characterized in that, Includes the following steps: S1. Collect images of each daylily plant and perform preliminary regional division of the collected images to distinguish the daylily plant from the background area; S2. Based on the plant and background regions of the preliminary region division, the edge regions of the two regions are set, and the pixel gray values ​​in the edge regions are clustered to complete the pixel-level separation of the foreground and background of the daylily plant, and only the foreground image of the daylily plant region is retained. S3. Divide the foreground image into two categories: non-occluded area and occluded area. Set up parallel fast determination branch for non-occluded area and analysis and determination branch for occluded area to complete the daylily integrity judgment in the two types of areas respectively, and screen out qualified samples that meet the preset admission criteria. S4. For the standard qualified samples, input them into the pre-trained maturity grading model to complete the maturity level judgment and screen out the harvestable targets that meet the preset picking standards. S5. For harvestable targets, obtain the pixel coordinates of the harvesting point in the two-dimensional image coordinate system, and input the obtained pixel coordinates of the harvesting point into the harvesting robot control system to complete the visual recognition and harvesting execution.

2. The visual recognition method for daylily harvesting according to claim 1, characterized in that, Step S1, which involves acquiring images of each daylily plant and performing preliminary region segmentation to distinguish the daylily plants from the background region, includes: S11. Perform Gaussian filtering to denoise the acquired daylily RGB image, and then perform channel normalization processing pixel by pixel to obtain the normalized channel values: ; S12. The prior distribution of daylily ratios was obtained through large-scale field calibration. By defining its effective interval, the mean and standard deviation of the ratio prior distribution of multiple daylily images are obtained, and an enhancement index is constructed. S13. Based on the exponentially enhanced image, perform grayscale projection in the horizontal and vertical directions respectively to generate a horizontal projection curve. Detect the global peak of the projection curve. The coordinates corresponding to the peak are the shape center. Within a circular area with a preset radius centered on the peak, select pixels whose exponentially enhanced image values ​​are greater than the adaptive threshold as initial seed points. S14. Construct a comprehensive confidence map. Starting from the initial seed point, perform a single round of fast region growth with an 8-neighborhood as the search range. For the neighboring pixels of the current seed point, if its comprehensive confidence is greater than the global adaptive confidence threshold, then mark the pixel as the foreground region of the daylily plant and add it to the seed point queue to continue growing; otherwise, mark it as the background region and do not grow it. S15. Perform morphological closing operation on the finally generated foreground binary mask to fill the tiny holes in the plant area; remove isolated noise areas with an area smaller than the preset minimum area threshold; and finally output the preliminary segmentation result.

3. The visual recognition method for daylily harvesting according to claim 1, characterized in that, Step S2, based on the initially divided plant and background regions, defines the edge regions of the two regions, clusters the pixel grayscale values ​​in the edge regions, and completes pixel-level separation of the foreground and background of the daylily plant, retaining only the foreground image of the daylily plant region. This includes: S21. Based on the preliminary division of the foreground binary mask, extract the outer contour of the plant foreground region; using the outer contour as a reference, extend the preset width to the interior of the foreground and the exterior of the background to generate an edge transition region containing transition pixels. S22. Extract multi-dimensional feature vectors for each pixel within the edge transition region; S23. Using the preliminary division results as a priori, within the edge transition region, select the pixel set belonging to the preliminary foreground and the pixel set belonging to the preliminary background respectively, and calculate the feature mean of the two as the initial cluster center. S24. Based on the initial cluster centers, perform K-means clustering on all pixels in the edge transition area to obtain pixel-level foreground and background classification results; S25. Perform neighborhood continuity optimization on the classification results of the edge transition region obtained by clustering. For each pixel in the edge transition region, count the number of pixels belonging to the foreground category and the number of pixels belonging to the background category in its 8 neighborhoods. If the number of pixels in the foreground category is greater than the number of pixels in the background category, then mark the pixel as the foreground; otherwise, mark it as the background. Only retain the foreground image of daylily.

4. The visual recognition method for daylily harvesting according to claim 1, characterized in that, The division of the foreground image into two categories, unoccluded and occluded regions, in step S3 is achieved by detecting and dividing the region using a pre-trained YOLO model.

5. The visual recognition method for daylily harvesting according to claim 1, characterized in that, The parallel non-occluded region fast determination branch and occluded region analysis and determination branch set in step S3 specifically include: The fast determination branch is to extract the outer contour of the daylily image in each non-occluded region with a single pixel width, perform equal-interval resampling on the outer contour to obtain a standardized contour, calculate the curvature of each point on the standardized contour, construct a curvature feature vector, calculate its cosine similarity with the calibrated qualified complete feature vector, and if the cosine similarity is greater than the preset threshold, it is determined to be qualified; otherwise, it is unqualified. The analysis and judgment branch first splits the image of the occluded area into individual daylily images, and then performs a rapid judgment to determine the integrity.

6. The visual recognition method for daylily harvesting according to claim 5, characterized in that, The implementation of splitting the image of the occluded area into individual daylily images is as follows: S31. For the occluded area, extract its single-pixel width outer contour and use principal component analysis to calculate the principal axis direction of the outer contour. S32. Perform equal-interval sampling along the main axis direction. At each sampling position, measure the actual width of the contour along the direction perpendicular to the main axis to obtain the visible width sequence. S33. Construct a width distribution model, and use the least squares method to fit the model parameters with the visible width sequence as a constraint to obtain the complete width curve; S34. Generate symmetrical contour points for each position based on the fitted full width curve; stitch these completed contour points with the visible contour to obtain the completed closed contour, thus completing the splitting of the occluded daylily.

7. The visual recognition method for daylily harvesting according to claim 1, characterized in that, The maturity grading model pre-trained in step S4 consists of an input layer, a feature extraction layer, a classification decision layer, and an output layer connected sequentially. The input layer is used to input the filtered samples that meet the required integrity level; The feature extraction layer performs channel-dimensional feature fusion on the color information of the RGB three channels through convolution, and outputs a color feature map. The classification decision layer includes a fully connected layer, which converts the output color feature map into a color feature vector through global average pooling, and then maps it to two levels: maturity. The output layer uses the Softmax activation function to normalize the output of the classification decision layer, obtaining the probability value of each maturity level, and selecting the level with the highest probability value as the maturity result.

8. The visual recognition method for daylily harvesting according to claim 1, characterized in that, In step S5, the pixel coordinates of the picking point are the positions where the bottom of the daylily is broken off.

9. The application of the visualization recognition method for daylily harvesting as described in any one of claims 1-8 in the field of crop harvesting.