Tea row boundary vector high-precision automatic extraction method based on tea garden unmanned aerial vehicle image

By using drone images and high-precision extraction methods in tea gardens, the problems of unclear boundaries and low standardization of tea shops are solved, and the accuracy of high-precision tea shop boundary extraction and classification data is improved.

CN119919841AActive Publication Date: 2025-05-02ZHEJIANG UNIV OF WATER RESOURCES & ELECTRIC POWER
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510413347.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-03
Publication Date
2025-05-02
Estimated Expiration
2045-04-03

AI Technical Summary

Technical Problem

The prior art has problems in tea shop extraction with unclear boundaries and low standardization. Especially after tea trees are affected by pests and diseases, the boundaries of tea shops are blurred, resulting in misclassification and misclassification.

Method used

A high-precision automatic extraction method for tea row boundary vectors based on drone images is used to generate a regular binary mask that conforms to the distribution of ridges and actual planting conditions of tea gardens through steps such as threshold segmentation, boundary contour extraction, linear detection, parallel sampling path generation, regional merging and filling.

Benefits of technology

The high-precision extraction of tea shop boundaries was achieved, and the problem of tea trees being wrongly classified as soil in traditional methods was overcome. The gaps and discontinuous areas of tea shops in the tea garden images were repaired, which significantly improved the accuracy and standardization of tea garden classification data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119919841A_ABST
    Figure CN119919841A_ABST
Patent Text Reader

Abstract

The invention discloses a tea row boundary vector high-precision automatic extraction method based on a tea garden unmanned aerial vehicle image, and the method comprises the following steps: obtaining an unmanned aerial vehicle multispectral image, marking a region of interest, and obtaining a tea garden plot ROI mask; performing binary classification processing based on threshold segmentation to obtain a tea tree-soil primary classification image; boundary contour extraction and straight line detection are carried out on the tea tree-soil primary classification image, and the main direction slope of tea rows of tea trees is obtained through calculation; parallel sampling paths are generated and classified based on the main direction slope of the tea rows; grouping the parallel sampling paths according to the same category to obtain scanning line groups of continuous tea tree or soil categories; and filling the soil area to complete high-precision extraction of the tea row boundary. According to the method, by optimizing the segmentation boundary and eliminating the discrete misclassification plaques, high-precision vector extraction of the tea row boundary is achieved, and the problem that in existing tea row extraction of a tea garden, the tea row boundary is not clear when tea trees are absent, branches are deadwood and leaves change color is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of smart agriculture, and in particular to a method for automatically extracting tea row boundary vectors with high precision based on unmanned aerial vehicle (UAV) images of tea gardens. Background Art

[0002] In modern tea gardens, tea trees are usually planted in strips to form neat rows. This planting pattern is designed based on the growth characteristics of tea trees and the convenience of tea garden management. Tea trees are planted at fixed intervals on flat or terraced land according to the requirements of row spacing and plant spacing to form an orderly tea row structure. The planting method of tea row arrangement not only improves the space utilization rate of tea gardens, but also provides a basis for standardized management and mechanized operations of tea gardens. It is one of the important characteristics of efficient production in modern tea gardens.

[0003] Tea row vector data is the core foundation of smart tea garden operations and precise monitoring, but its extraction process is often disturbed. At present, the general method relies on pixel analysis, usually by obtaining multispectral images through drones, and then extracting and identifying through threshold segmentation or deep learning. However, both methods face the problems of misclassification and omission. This is because pests and diseases cause tea leaves to fade, branches to wither, and plants to be missing, making the spectral characteristics of tea trees similar to the soil background, and its separability is reduced, resulting in the defects of misclassification and omission, resulting in blurred boundaries, discrete patches and other phenomena; although deep learning is better than the threshold segmentation method that relies on vegetation index and bands, it is limited by the tea garden annotation data and still cannot completely overcome the problems of misclassification and omission. In addition, the objects extracted by the above methods are tea trees with complete canopy structures, which are not completely consistent with the actual tea row structure in the tea garden, and the complete tea row cannot be extracted, resulting in deviations between the extraction results and the actual tea row structure, which restricts the reliability of precise monitoring of the tea garden. Summary of the invention

[0004] The first purpose of the present invention is to overcome the problems existing in the prior art of tea garden tea row extraction, such as unclear tea row boundaries and low standardization due to stress factors such as missing tea trees, dead branches, and leaf discoloration caused by pests and diseases, analyze the continuous structural characteristics of the tea tree arrangement, optimize the segmentation boundaries, eliminate discrete misclassified patches, and generate a regularized binary mask that conforms to the tea garden ridge distribution and actual planting conditions, in which the tea tree area is the foreground and the soil is the background, and the tea row boundary vector is extracted with high precision in the tea tree area.

[0005] In order to achieve the above object, the present invention adopts the following technical solutions: A high-precision automatic extraction method of tea row boundary vectors based on tea garden drone images includes the following steps: Step S1, obtaining a multispectral image of the tea garden from a drone, marking the region of interest to obtain a ROI mask of the tea garden plot; using a threshold segmentation method to perform binary classification processing to obtain a tea tree-soil initial classification image; Step S2, performing boundary contour extraction and straight line detection on the tea tree-soil initial classification image, and calculating the main direction slope of the tea row; Step S3, generating parallel sampling paths based on the main direction slope of the tea row, and classifying the parallel sampling paths; Step S4, detecting the category changes of adjacent parallel sampling paths, merging continuous similar areas, obtaining a scanning line group of continuous tea tree or soil categories, filling the soil area therein, and completing the extraction of the tea row boundary vector.

[0006] Among them, step S3 converts the tea garden image data into a structured array to achieve data standardization collection and tea row feature extraction.

[0007] The second object of the present invention is to provide a tea shop identification device for implementing the above method, comprising the following modules: Image acquisition module, using drones to acquire multispectral images of tea gardens; The image preprocessing module is used to mark the region of interest of the tea garden multispectral image and process it to obtain the tea tree-soil preliminary classification image and the tea garden plot ROI mask; The edge extraction and line detection module is used to extract the tea tree-soil boundary in the tea tree-soil preliminary classification image and calculate the main direction of the tea row; The parallel resampling module uses the tea garden plot ROI mask as the target classification area, generates parallel sampling paths and classifies them according to the main direction of the tea row; The region merging and filling module detects the category changes of adjacent parallel sampling paths, merges continuous similar regions, and fills the soil region; The output module generates the final tea row and soil segmentation map based on the filling results and outputs the visualization results.

[0008] A third object of the present invention is to provide an electronic device, comprising a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the above method.

[0009] A fourth object of the present invention is to provide a machine-readable storage medium storing machine-executable instructions, which, when called and executed by a processor, prompt the processor to implement the above method.

[0010] Compared with the prior art, the present invention has the following beneficial effects: The present invention is based on the initial classification result of threshold segmentation and the unique ridge planting pattern of the tea garden. Scan lines are generated through the main direction of the tea row in the UAV image, and the continuous scan line classification and area filling technology are combined to accurately extract the tea row area, which overcomes the problem that some tea trees are misclassified as soil in the traditional classification method, repairs the gaps and discontinuous areas in the tea row in the tea garden image, realizes efficient and accurate tea row extraction, and generates a regularized binary classification map that conforms to the actual planting situation of the tea garden. The accuracy and standardization of the tea garden classification data are significantly improved, and a new idea is provided for tea tree image processing and tea row boundary extraction.

[0011] The present invention integrates multi-spectral analysis with the ridge structure characteristics of the tea garden, analyzes the continuous spatial structural characteristics of the tea tree arrangement, ensures the integrity and boundary accuracy of the tea row vector, provides reliable support for the intelligent management of the tea garden, and can quickly and automatically perform large-scale monitoring on remote sensing platforms such as drones, saving labor costs and improving farmland management efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 The figure is a flow chart of the method of the present invention.

[0013] Figure 2 It is the image processed in step S1, where A is the multispectral image of the tea garden, B is the tea tree-soil preliminary classification image, and C is the ROI mask of the tea garden plot.

[0014] Figure 3 It is the image processed in step S2, where A is a schematic diagram of edge detection and contour extraction, and B is a schematic diagram of straight line detection.

[0015] Figure 4 This is the image processed in step S3.

[0016] Figure 5 It is a reclassification effect diagram, where A is the original multispectral image of the tea garden, B is the initial classification image after threshold segmentation, and C is the optimized binary classification image obtained by the method of the present invention. DETAILED DESCRIPTION

[0017] The present invention is further described below in conjunction with the accompanying drawings and embodiments.

[0018] like Figure 1 As shown, the present invention provides a method for high-precision automatic extraction of tea row boundary vectors based on tea garden drone images, comprising the following steps: Step S1: input the multispectral image of the tea garden collected by the drone, wherein the multispectral image contains four bands, namely red, green, blue and near infrared (NIR); take each independent tea garden plot as a processing unit, and perform the following operations: The tea garden plots were manually marked as regions of interest (ROIs) as input data for subsequent classification processing (e.g. Figure 2 ), and generate a tea garden plot ROI mask (as shown in Figure 2 as shown in C in the figure).

[0019] In addition, the threshold segmentation method is used to perform binary classification on the tea garden plot image: Green band image I is obtained from the multispectral image Green (x,y), where (x,y) is the pixel coordinate.

[0020] According to the spectral separability of tea trees and soil in the Green band, the classification threshold T is set. class =0.08 (determined by statistically analyzing the reflectance distribution of tea trees and soil samples), and establishing a binary classification decision rule:

[0021] Where 1 represents the vegetation area and 0 represents the soil area. Based on the classification result C(x,y), the tea tree-soil initial classification image is output (such as Figure 2 The vegetated area is marked as 1 (green) and the soil area is marked as 0 (black).

[0022] Step S2, obtaining the slope of the tea row; specifically: For the tea tree-soil initial classification image in step S1, the Canny edge detection algorithm is used to extract the boundary contour of the tea tree area-soil background (such as Figure 3 Specifically, after suppressing noise through Gaussian filtering, the image gradient amplitude and direction are calculated, and double thresholds are used for non-maximum suppression and hysteresis threshold processing to output pixel-level continuous edge contours.

[0023] Map the edge contour pixel points from the Cartesian coordinate system to the Hough parameter space (ρ-θ space) to establish a straight line parameterized model:

[0024] Where (x, y) is the edge point coordinate, ρ is the distance from the line to the origin, and θ is the angle between the line and the x-axis. Traverse all edge points, perform cumulative voting for each (ρ, θ) in the parameter space, and generate a voting distribution matrix in the parameter plane.

[0025] Set the minimum voting threshold T vote = 200 (the threshold is positively correlated with the input image resolution and is dynamically adjusted according to the actual size of the ROI). The number of votes in the screening parameter space exceeds T vote The candidate point set {(ρ i ,θ i )}. Each candidate point corresponds to a straight line in the Cartesian coordinate system, whose equation is:

[0026] Output the detected straight line set (such as Figure 3 The original detection line is optimized for directional consistency, the abnormal slopes outside the interquartile range are eliminated, the candidate slope subset that conforms to the spatial distribution law of tea rows is retained, and the average value is taken as the main direction slope k of the tea rows in the region.

[0027] Step S3: Scan line classification, specifically: The tea garden plot ROI mask generated in step S1 is used as the target classification area; Based on the main direction slope k of the tea row obtained in step S2, an index line perpendicular to the main direction of the tea row is generated (slope k'=-1 / k), and its starting and ending points are dynamically selected according to the sign of k: When k>0, the starting point (0,0) of the left boundary of the tea garden plot ROI mask is used as the initial position.

[0028] When k≤0, the starting point of the right boundary of the tea garden ROI mask (right, 0) is taken as the initial position.

[0029] Vertical scan line L i Extend along the k' direction to the opposite side boundary to form the initial index line {L i}.

[0030] Traverse the index line L i All pixel points (x j ,y j ), through each point, a parallel scan line is generated along the main direction of the tea row with a slope k (the equation is y=k(xx j )+y j ), forming the main direction scanning line set {L m}.

[0031] For each scan line L m The intersection point with the ROI mask boundary of the tea garden plot (x start ,y start ) and (x end ,y end ), intercept the effective scanning line segment S according to the two intersection points m (like Figure 4 As shown). On the tea tree-soil initial classification image, along the line segment S m Take the pixel set P m ={P1,P2,P3···,P N}, where p i ∈{0,1} (0 is soil, 1 is tea tree).

[0032] Statistics Pm Number of tea tree pixels:

[0033] Calculate the proportion:

[0034] Set the experience threshold T proportion = 0.7, allowing adjustment according to tea plantation density, T proportion ∈[0.7,0.8]; if tea_proportion ≥ T proportion , determine the scan line segment S m For tea tree area, determine the line type tea tree (value 1); if tea_proportion <T proportion , determine the scan line segment S m For the tea ridge area, determine the line type soil (value 0).

[0035] In the present invention, "tea tree pixel" refers to a single pixel whose spectral classification result is vegetation, "tea row" refers to a farming belt formed by continuous tea tree pixels arranged in a linear pattern, and "tea ridge" refers to the soil gap between adjacent tea rows.

[0036] Step S4, graphic image filling; specifically, comprising the following steps: In step S3, the attributes (x start ,y start ) and (x end ,y end ) and scan line type (tea tree / soil), therefore, traverse all classified scan lines and detect the category attributes (tea tree / soil) of adjacent scan lines in real time. When the category attributes of adjacent scan lines are inconsistent or the list is traversed to the end, the current continuous similar line segment group is determined to be over. For each continuous similar line segment group, extract the starting point and ending point of its first scan line, and the starting point and ending point of the last scan line to form a four-vertex coordinate set.

[0037] Construct a quadrilateral region based on the coordinates of the four vertices. The vertex order follows the following rule: the starting point of the first scan line → the end point of the first scan line → the end point of the last scan line → the starting point of the last scan line.

[0038] If the line segment group category is soil, the fillPoly method of the OpenCV library in Python is used to fill the quadrilateral area in the ROI mask of the tea garden plot with 0; if it is a tea tree, no processing is done.

[0039] At the end of the traversal, a closing operation is performed on the last set of consecutive similar line segments to ensure that all areas are completely filled.

[0040] Finally, the classified optimized image is output.

[0041] The multispectral images of tea gardens in different regions were processed according to the method of the present invention, and the results are as follows: Figure 5 As shown; Figure 5 A in is the false color image of the original four-band image. Figure 5 B in the figure is the initial classification image obtained after processing based on the threshold segmentation method. Figure 5 C in is the optimized binary classification image obtained after being processed by the method of the present invention. Figure 5 It can be seen that the present invention optimizes the traditional classification method and can extract the complete tea row area. Compared with the threshold segmentation-based method, it can avoid misclassification and omission, and significantly improves the accuracy of tea garden classification data.

[0042] The above embodiments are not intended to limit the present invention, and the present invention is not limited to the above embodiments. As long as the requirements of the present invention are met, they all belong to the protection scope of the present invention. In addition, it should be understood that after reading the above description of the present invention, those skilled in the art can make various changes or modifications to the present invention, and these equivalent forms also fall within the scope defined by the claims attached to this application.

Claims

1. A high-precision automatic extraction method of tea row boundary vectors based on tea garden drone images, characterized in that: The following steps are involved: Step S1, obtaining a multispectral image of the tea garden from a drone, marking the region of interest to obtain a ROI mask of the tea garden plot; using a threshold segmentation method to perform binary classification processing to obtain a tea tree-soil initial classification image; Step S2, performing boundary contour extraction and straight line detection on the tea tree-soil initial classification image, and calculating the main direction slope of the tea row; Step S3, generating parallel sampling paths based on the main direction slope of the tea row, and classifying the parallel sampling paths; Step S4, detecting the category changes of adjacent parallel sampling paths, merging continuous similar areas, obtaining a scanning line group of continuous tea tree or soil categories, filling the soil area therein, and completing the extraction of the tea row boundary vector.

2. The method for high-precision automatic extraction of tea row boundary vectors based on tea garden drone images according to claim 1 is characterized in that: In step S1, the UAV multispectral image contains four bands, and the Green band image is selected to perform binary classification processing through the threshold segmentation method to obtain the tea tree-soil initial classification image.

3. The method for high-precision automatic extraction of tea row boundary vectors based on tea garden drone images according to claim 1 is characterized in that: In step S2, the boundary contour is extracted using the Canny edge detection algorithm.

4. The method for high-precision automatic extraction of tea row boundary vectors based on tea garden drone images according to claim 3 is characterized in that: In step S2, Hough transform is used for line detection; the original detected line is optimized for directional consistency, abnormal slopes outside the interquartile range are eliminated, a subset of candidate slopes that conform to the spatial distribution law of the tea row are retained, and the average value is taken as the main direction slope of the tea row.

5. The method for high-precision automatic extraction of tea row boundary vectors based on tea garden drone images according to claim 1 is characterized in that: In step S3, the parallel sampling paths are generated by using a scan line method.

6. The method for high-precision automatic extraction of tea row boundary vectors based on tea garden drone images according to claim 5 is characterized in that: Step S3 includes the following steps: 3-1 Based on the main direction slope k of the tea row obtained in step S2, an index line perpendicular to the main direction of the tea row is generated; 3-2 Take the tea garden plot ROI mask as the target classification area, traverse all pixels on the vertical index line, generate parallel scan lines along the main direction slope of the tea row through each pixel, and form a main direction scan line set covering the entire target classification area; 3-3 For each main direction scanning line in the main direction scanning line set, it has two intersection points with the boundary of the target classification area, and the scanning line between the two intersection points is intercepted as a valid scanning line segment; 3-4 maps the effective scanning line segment to the tea tree-soil initial classification image, counts the number of tea tree pixels in the effective scanning line segment and calculates the proportion, and determines the category of the effective scanning line segment according to the proportion, which is tea tree or soil.

7. The method for high-precision automatic extraction of tea row boundary vectors based on tea garden drone images according to claim 6 is characterized in that: In step S4, when the adjacent scan line category attributes are inconsistent or the list is traversed to the end, it is determined that the current continuous similar line segment group ends; for each continuous similar line segment group, the starting point and the ending point of the first scan line, and the starting point and the ending point of the last scan line are extracted to form the coordinates of the four vertices, and then a quadrilateral area is constructed; If the line segment group category is soil, the pixel values ​​in the quadrilateral area are set to zero in the ROI mask of the tea garden plot; If the line segment group category is tea tree, no processing is done; At the end of the traversal, a closing operation is performed on the last set of continuous similar line segments, and the final classified image is output.

8. A tea brand identification device for implementing the method according to any one of claims 1 to 7, characterized in that: Includes the following modules: Image acquisition module, using drones to acquire multispectral images of tea gardens; The image preprocessing module is used to mark the region of interest of the tea garden multispectral image and process it to obtain the tea tree-soil preliminary classification image and the tea garden plot ROI mask; The edge extraction and line detection module is used to extract the tea tree-soil boundary in the tea tree-soil preliminary classification image and calculate the main direction of the tea row; The parallel resampling module uses the tea garden plot ROI mask as the target classification area, generates parallel sampling paths and classifies them according to the main direction of the tea row; The region merging and filling module detects the category changes of adjacent parallel sampling paths, merges continuous similar regions, and fills the soil region; The output module generates the final tea row and soil segmentation map based on the filling results and outputs the visualization results.

9. An electronic device, characterized in that: The invention comprises a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the method according to any one of claims 1 to 7.

10. A machine-readable storage medium, characterized in that: The machine-readable storage medium stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Intelligent agricultural machine navigation system and method based on machine vision

    CN110243372A

  • Unmanned aerial vehicle high-resolution image-based land parcel extraction method

    CN113887477A

  • Tea garden tea picking position planning method, device, equipment and medium

    CN118195111A

  • Tea ridge-straddling type tea picking machine

    JP2008035704A