Method and system for automatically identifying coverage of bermuda grass lawn, processing equipment and storage medium
The edge segmentation algorithm is used to process the lawn image and extract the vegetation coverage rate, which solves the subjectivity and accuracy of the traditional measurement methods, and achieves efficient and accurate measurement of lawn coverage.
Patent Information
- Application Number
- CN202411702470.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-03-21
AI Technical Summary
Traditional lawn coverage measurement methods have problems such as strong subjectivity, insufficient accuracy, and insufficient model generalization capabilities. The imaging principle of digital cameras leads to image distortion, affecting measurement accuracy.
The edge segmentation algorithm is used to process the lawn image of the dog tooth root to obtain the vegetation coverage. By extracting RGB values, calculating the CIVE plant index, and applying the Otsu threshold segmentation algorithm, a mask is generated and the vegetation occupied cells are marked, and the coverage rate is counted.
It improves the efficiency and accuracy of lawn coverage measurement, reduces the influence of human subjective factors, is suitable for large-scale lawn monitoring, and provides more comprehensive management suggestions.
Smart Images

Figure CN119672521A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of lawn measurement, and in particular to a method, system, processing equipment and storage medium for automatically identifying the coverage of bermudagrass lawn. Background Art
[0002] Turf cover is an important indicator for measuring the health and growth quality of turf, and is often used in agriculture, horticulture, ecological monitoring and other fields. Traditional turf cover measurement still mainly relies on empirical visual inspection or traditional image classification methods, which have problems such as strong subjectivity, insufficient accuracy, and insufficient model generalization ability, and seriously consume manpower and material resources.
[0003] With the rapid development of computer vision and artificial intelligence technology, the automatic identification method of lawn coverage based on image processing and machine learning algorithms has gradually become a research hotspot. Although there are studies devoted to exploring the extraction method of vegetation coverage information in grassland areas, there is still a lack of research on the efficient use of digital photography to accurately measure lawn coverage. In addition, the imaging principle of digital cameras is based on central projection. This feature causes the image distortion to increase with the expansion of the field of view, especially in the edge area of the image, where the deformation is most significant. This defect seriously restricts the application accuracy of digital photography in accurately obtaining lawn coverage. Summary of the invention
[0004] In view of the above problems, the purpose of the present invention is to provide a method, system, processing equipment and storage medium for automatically identifying the coverage of bermudagrass turf, which can accurately measure the turf coverage using digital photography.
[0005] To achieve the above object, the present invention adopts the following technical solutions: In a first aspect, a method for automatically identifying the coverage of bermudagrass turf is provided, characterized in that it comprises: Obtaining the Bermuda grass lawn image of the sample site to be identified and preprocessing it to determine the target object; The pre-processed Bermudagrass lawn image is processed by edge segmentation algorithm to obtain a mask, and the pixels occupied by vegetation in the mask are marked. The proportion of the pixels occupied by vegetation in the mask to the pixels of the entire image is counted to obtain the vegetation coverage rate of the target object; Restore the mask to an image with only green vegetation.
[0006] Further, the step of obtaining the Bermuda grass lawn image of the sample plot to be identified includes: Above the sample plot to be identified, use a drone or digital camera to obtain an image of the sample plot to be identified, ensuring that the image size is equal to the sample plot size.
[0007] Furthermore, the preprocessing includes: The acquired Bermuda grass lawn image was cropped to retain the size that matched the edge of the sample plot to be identified.
[0008] Furthermore, the edge segmentation algorithm is used to process the preprocessed Bermuda grass lawn image to obtain a mask, and the pixels occupied by the vegetation in the mask are marked, including: Extract the RGB value of each pixel in the preprocessed Bermudagrass lawn image; According to the characteristics and color distribution of bermudagrass lawn, the RGB threshold for distinguishing green area from non-green area is determined; According to the RGB value of each pixel, the CIVE plant index of each pixel is calculated to count all the pixels of the Bermudagrass lawn image; The Otsu threshold segmentation algorithm is used to binarize the preprocessed Bermuda grass lawn image to obtain the Bermuda grass lawn image mask. According to the extracted RGB values and the determined RGB threshold, each pixel of the mask is classified and marked to determine the pixels occupied by vegetation in the mask.
[0009] Furthermore, the step of classifying and marking each pixel of the mask according to the extracted RGB values and the determined RGB thresholds to determine the pixels occupied by vegetation in the mask includes: The extracted RGB value and the determined RGB threshold are judged to obtain a threshold judgment result; According to the threshold judgment result, each pixel of the mask is classified and marked, and different numerical values or color codes are used to represent the green area and non-green area of the pixel, among which the pixel where the green area is located is vegetation.
[0010] Furthermore, the method of classifying and marking each pixel of the mask according to the threshold judgment result, using different numerical values or color codes to represent the green area and non-green area of the pixel, includes: Create a 2D array or matrix of the same size as the original bermudagrass image, with different numeric values or color codes to represent green and non-green areas.
[0011] Further, the method of judging the extracted RGB value and the determined RGB threshold to obtain a threshold judgment result includes: When the extracted RGB value is greater than the RGB threshold, the corresponding pixel is defined as 1; when the extracted RGB value is not greater than the RGB threshold, the corresponding pixel is defined as 0 to obtain the threshold judgment result.
[0012] In a second aspect, a system for automatically identifying the coverage of bermudagrass turf is provided, comprising: An image acquisition module is used to acquire the image of the bermudagrass lawn of the sample site to be identified and perform preprocessing to determine the target object; The mask determination module is used to process the pre-processed Bermuda grass lawn image by using an edge segmentation algorithm to obtain a mask, and mark the pixels occupied by the vegetation in the mask; A statistical module is used to calculate the ratio of the pixels occupied by vegetation in the mask to the pixels of the entire image, and obtain the vegetation coverage rate of the target object; The restoration module is used to restore the mask to an image with only green vegetation.
[0013] In a third aspect, a processing device is provided, comprising computer program instructions, wherein the computer program instructions, when executed by the processing device, are used to implement the steps corresponding to the above-mentioned method for automatic identification of bermudagrass turf coverage.
[0014] In a fourth aspect, a computer-readable storage medium is provided, on which computer program instructions are stored, wherein the computer program instructions, when executed by a processor, are used to implement the steps corresponding to the above-mentioned method for automatic identification of bermudagrass turf coverage.
[0015] The present invention adopts the above technical solution, which has the following advantages: 1. The present invention can not only greatly improve the efficiency and accuracy of measurement by automatically identifying the coverage of bermudagrass turf, but also realize large-scale lawn monitoring, providing strong support for agricultural management and ecological research.
[0016] 2. The present invention can eliminate the influence of human subjective factors and provide evaluation results with higher consistency. Through algorithm analysis, more detailed features can be extracted, thereby improving the accuracy of coverage assessment.
[0017] 3. The present invention can quickly process a large number of images, saving time and human resources, and is suitable for large-scale lawn monitoring; the data generated by automatic identification can be conveniently stored and analyzed, facilitating long-term monitoring and trend analysis.
[0018] 4. The present invention has strong adaptability and can adapt to different environments and conditions. It is suitable for a variety of lawn types and growth states. It can be combined with other environmental data (such as soil moisture, light intensity, etc.) for comprehensive analysis to provide more comprehensive management suggestions.
[0019] In summary, the present invention can be widely used in the field of lawn measurement. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Throughout the accompanying drawings, the same reference numerals are used to represent the same components. In the accompanying drawings: Figure 1 It is a schematic diagram of a method flow provided by an embodiment of the present invention; Figure 2 is a schematic diagram of an image of a bermudagrass lawn to be identified provided by an embodiment of the present invention; Figure 3 An embodiment of the present invention provides Figure 2 Schematic diagram of the resulting mask. DETAILED DESCRIPTION
[0021] The exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present invention and to fully convey the scope of the present invention to those skilled in the art.
[0022] It should be understood that the terms used herein are only for the purpose of describing specific example embodiments and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used herein may also be meant to include plural forms. The terms "include", "comprise", "contain", and "have" are inclusive, and therefore specify the existence of stated features, steps, operations, elements and / or parts, but do not exclude the existence or addition of one or more other features, steps, operations, elements, parts, and / or combinations thereof. The method steps, processes, and operations described herein are not interpreted as necessarily requiring them to be performed in the specific order described or illustrated, unless the execution order is clearly indicated. It should also be understood that additional or alternative steps may be used.
[0023] Although the terms first, second, third, etc. can be used in the text to describe multiple elements, components, regions, layers and / or sections, these elements, components, regions, layers and / or sections should not be limited by these terms. These terms can only be used to distinguish an element, component, region, layer or section from another region, layer or section. Unless the context clearly indicates, terms such as "first", "second" and other numerical terms do not imply order or sequence when used in the text. Therefore, the first element, component, region, layer or section discussed below can be referred to as the second element, component, region, layer or section without departing from the teaching of the example embodiments.
[0024] Although there are studies devoted to exploring methods for extracting vegetation coverage information in grassland areas, there is still a lack of research on the efficient use of digital photography to accurately measure lawn coverage. In addition, the imaging principle of digital cameras is based on central projection. This feature causes the image distortion to increase with the expansion of the field of view, especially in the edge area of the image, where the deformation is most significant. This defect seriously restricts the application accuracy of digital photography in accurately obtaining lawn coverage. In recent years, the rapid development of computer vision and machine learning technology has provided new ways for automatic identification of lawn coverage. Python, as an efficient, flexible programming language with rich library support, has become the preferred tool for developing such intelligent systems. An embodiment of the present invention provides a method for automatic identification of bermudagrass lawn coverage, including: obtaining a bermudagrass lawn image of a sample plot to be identified and preprocessing it to determine a target object; using an edge segmentation algorithm to process the preprocessed bermudagrass lawn image to obtain a mask, and marking the pixels occupied by vegetation in the mask; calculating the proportion of the pixels occupied by vegetation in the mask to the pixels of the entire image to obtain the vegetation coverage of the target object; and restoring the mask to an image with only green vegetation. The whole process of the invention uses Python language, and researchers can combine image processing technology and machine learning algorithms to realize automatic identification and measurement of lawn coverage. This can not only greatly improve the efficiency and accuracy of measurement, but also realize large-scale lawn monitoring, providing strong support for agricultural management and ecological research.
[0025] Example 1 like Figure 1 As shown, this embodiment provides a method for automatically identifying the coverage of bermudagrass turf, comprising the following steps: 1) Obtain the Bermuda grass lawn image of the sample site to be identified and determine the target object.
[0026] Specifically, an unmanned aerial vehicle or a digital camera may be used to obtain an image of the bermudagrass lawn of the sample plot to be identified. More specifically, an unmanned aerial vehicle or a digital camera may be used to obtain an image of the sample plot to be identified above the 2m*2m sample plot to be identified, and the image size may be equal to the sample plot size as much as possible.
[0027] Specifically, the target object may be a lawn or bare land.
[0028] 2) Preprocessing the acquired Bermudagrass lawn images.
[0029] Specifically, the acquired Bermudagrass lawn image is cropped to retain the size that matches the edge of the sample plot to be identified, such as Figure 2 shown.
[0030] 3) Use edge segmentation algorithm to process the preprocessed Bermuda grass lawn image to obtain a mask, such as Figure 3As shown, the pixels occupied by vegetation in the mask are marked as follows: 3.1) Separation of RGB channels: Extract the RGB value of each pixel in the preprocessed Bermudagrass turf image.
[0031] 3.2) According to the characteristics and color distribution of bermudagrass lawn, the RGB threshold for distinguishing green areas from non-green areas is determined.
[0032] 3.3) According to the RGB value of each pixel, the CIVE plant index of each pixel is calculated to count all pixels of the Bermudagrass lawn image, laying the foundation for subsequent operations.
[0033] 3.4) Using the Otsu threshold segmentation algorithm, the preprocessed Bermuda grass lawn image is binarized to obtain a mask of the Bermuda grass lawn image.
[0034] 3.5) Classify and mark each pixel of the mask based on the extracted RGB values and the determined RGB thresholds to determine the pixels occupied by vegetation in the mask: 3.5.1) The extracted RGB value and the determined RGB threshold are judged to obtain the threshold judgment result.
[0035] Specifically, when the extracted RGB value is greater than the RGB threshold, the corresponding pixel is defined as 1 (maximum 255); when the extracted RGB value is not greater than the RGB threshold, the corresponding pixel is defined as 0, and the threshold judgment result is obtained.
[0036] 3.5.2) Based on the threshold judgment result, each pixel of the mask is classified and marked, and different numerical values or color codes are used to represent the green area and non-green area of the pixel, among which the pixel with the green area is vegetation.
[0037] Specifically, a two-dimensional array or matrix with the same size as the original bermudagrass lawn image is created, and different numerical values or color codes are used to represent green areas and non-green areas respectively.
[0038] 4) Use the function to count the proportion of pixels occupied by vegetation in the mask to the entire image pixels to obtain the vegetation coverage rate of the target object.
[0039] Specifically, the function numpy.sum is used to count the proportion of pixels occupied by vegetation in the mask to the entire image pixels, and the proportion is the vegetation coverage rate of the target object.
[0040] 5) Restore the mask to an image with only green vegetation.
[0041] Specifically, the RGB values of the mask pixels and the original image pixels are multiplied to obtain an image with only green vegetation.
[0042] Example 2 This embodiment provides a system for automatically identifying the coverage of bermudagrass turf, comprising: The image acquisition module is used to acquire the Bermuda grass lawn image of the sample site to be identified and perform preprocessing to determine the target object.
[0043] The mask determination module is used to process the pre-processed Bermuda grass lawn image by using an edge segmentation algorithm to obtain a mask and mark the pixels occupied by the vegetation in the mask.
[0044] The statistical module is used to count the proportion of pixels occupied by vegetation in the mask to the pixels of the entire image, and obtain the vegetation coverage rate of the target object.
[0045] The restoration module is used to restore the mask to an image with only green vegetation.
[0046] The system provided in this embodiment is used to execute the above-mentioned method embodiments. Please refer to the above-mentioned embodiments for specific processes and detailed contents, which will not be repeated here.
[0047] Example 3 This embodiment provides a processing device corresponding to the method for automatically identifying the coverage of bermudagrass turf provided in Embodiment 1. The processing device can be applicable to a client processing device, such as a mobile phone, a laptop computer, a tablet computer, a desktop computer, etc., to execute the method of Embodiment 1.
[0048] The processing device includes a processor, a memory, a communication interface and a bus, and the processor, the memory and the communication interface are connected through the bus to complete mutual communication. The memory stores a computer program that can be run on the processing device, and when the processing device runs the computer program, the method for automatically identifying the coverage of bermudagrass turf provided in this embodiment 1 is executed.
[0049] In some implementations, the memory may be a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage.
[0050] In some other implementations, the processor may be a central processing unit (CPU), a digital signal processor (DSP), or other general-purpose processors of various types, which are not limited herein.
[0051] In addition, the logic instructions in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on such an understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0052] Those skilled in the art will understand that the structure of the above-mentioned computing device is only a partial structure related to the solution of the present invention, and does not constitute a limitation on the computing device to which the solution of the present invention is applied. The specific computing device may include more or fewer components, or combine certain components, or have a different arrangement of components.
[0053] Example 4 This embodiment provides a computer program product corresponding to the method for automatically identifying the coverage of bermudagrass turf provided in Embodiment 1. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing the method for automatically identifying the coverage of bermudagrass turf described in Embodiment 1.
[0054] Computer readable storage media can be tangible devices that hold and store instructions used by instruction execution devices. Computer readable storage media can be, for example, but not limited to, electronic storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any combination thereof.
[0055] The above embodiment provides a computer-readable storage medium, whose implementation principle and technical effect are similar to those of the above method embodiment, and will not be repeated here.
[0056] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0057] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0058] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0059] The above embodiments are only used to illustrate the present invention, wherein the structure, connection mode and manufacturing process of each component may be changed. Any equivalent transformations and improvements based on the technical solution of the present invention should not be excluded from the protection scope of the present invention.
Claims
1. A method for automatically identifying the coverage of Bermudagrass turf, characterized in that: include: Obtaining the Bermuda grass lawn image of the sample site to be identified and preprocessing it to determine the target object; The pre-processed Bermudagrass lawn image is processed by edge segmentation algorithm to obtain a mask, and the pixels occupied by vegetation in the mask are marked. The proportion of the pixels occupied by vegetation in the mask to the pixels of the entire image is counted to obtain the vegetation coverage rate of the target object; Restore the mask to an image with only green vegetation.
2. The method for automatically identifying the coverage of Bermudagrass turf as claimed in claim 1, characterized in that: The step of obtaining the bermudagrass lawn image of the sample plot to be identified includes: Above the sample plot to be identified, use a drone or digital camera to obtain an image of the sample plot to be identified, ensuring that the image size is equal to the sample plot size.
3. The method for automatically identifying the coverage of Bermudagrass turf as claimed in claim 1, characterized in that: The preprocessing comprises: The acquired Bermuda grass lawn image was cropped to retain the size that matched the edge of the sample plot to be identified.
4. The method for automatically identifying the coverage of Bermudagrass turf as claimed in claim 1, characterized in that: The edge segmentation algorithm is used to process the pre-processed Bermuda grass lawn image to obtain a mask, and the pixels occupied by the vegetation in the mask are marked, including: Extract the RGB value of each pixel in the preprocessed Bermudagrass lawn image; According to the characteristics and color distribution of bermudagrass lawn, the RGB threshold for distinguishing green area from non-green area is determined; According to the RGB value of each pixel, the CIVE plant index of each pixel is calculated to count all the pixels of the Bermudagrass lawn image; The Otsu threshold segmentation algorithm is used to binarize the preprocessed Bermuda grass lawn image to obtain the Bermuda grass lawn image mask. According to the extracted RGB values and the determined RGB threshold, each pixel of the mask is classified and marked to determine the pixels occupied by vegetation in the mask.
5. The method for automatically identifying the coverage of Bermudagrass turf as claimed in claim 4, characterized in that: The step of classifying and marking each pixel of the mask according to the extracted RGB values and the determined RGB thresholds to determine the pixels occupied by vegetation in the mask comprises: The extracted RGB value and the determined RGB threshold are judged to obtain a threshold judgment result; According to the threshold judgment result, each pixel of the mask is classified and marked, and different numerical values or color codes are used to represent the green area and non-green area of the pixel, among which the pixel where the green area is located is vegetation.
6. The method for automatically identifying the coverage of Bermudagrass turf as claimed in claim 5, characterized in that: According to the threshold judgment result, each pixel of the mask is classified and marked, and different numerical values or color codes are used to represent the green area and non-green area of the pixel, including: Create a 2D array or matrix of the same size as the original bermudagrass image, with different numeric values or color codes to represent green and non-green areas.
7. The method for automatically identifying the coverage of Bermudagrass turf as claimed in claim 5, characterized in that: The method of judging the extracted RGB value and the determined RGB threshold to obtain a threshold judgment result includes: When the extracted RGB value is greater than the RGB threshold, the corresponding pixel is defined as 1; when the extracted RGB value is not greater than the RGB threshold, the corresponding pixel is defined as 0 to obtain the threshold judgment result.
8. A system for automatically identifying the coverage of Bermudagrass turf, characterized in that: include: An image acquisition module is used to acquire the image of the bermudagrass lawn of the sample site to be identified and perform preprocessing to determine the target object; The mask determination module is used to process the pre-processed Bermuda grass lawn image by using an edge segmentation algorithm to obtain a mask, and mark the pixels occupied by the vegetation in the mask; A statistical module is used to calculate the ratio of the pixels occupied by vegetation in the mask to the pixels of the entire image, and obtain the vegetation coverage rate of the target object; The restoration module is used to restore the mask to an image with only green vegetation.
9. A processing device, characterized in that: It comprises computer program instructions, wherein when the computer program instructions are executed by a processing device, they are used to implement the steps corresponding to the method for automatically identifying the coverage of bermudagrass turf as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, wherein the computer program instructions, when executed by a processor, are used to implement the steps corresponding to the method for automatically identifying the coverage of bermudagrass turf according to any one of claims 1 to 7.