An agricultural field water level observation device and observation method based on UAV scanning measurement

Through the drone equipped with image acquisition components and convolutional neural network recognition model, remote automated measurement of farmland water level is realized, solving the problems of low efficiency and large error in traditional methods, and providing efficient and accurate water level data acquisition.

CN117671529BActive Publication Date: 2025-08-01HYDRAULIC SCI RES INST OF SICHUAN PROVINCE +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311613164.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-27
Publication Date
2025-08-01
Estimated Expiration
2043-11-27

AI Technical Summary

Technical Problem

Traditional farmland water level observation methods are inefficient, costly and susceptible to environmental factors, making it difficult to achieve accurate remote automated measurements.

Method used

A farmland water level observation device based on drone scanning measurement is adopted, combining image acquisition components and convolutional neural network target recognition model to realize remote automated identification and data acquisition of water level observation rulers.

Benefits of technology

Improve measurement efficiency, reduce manual measurement requirements, reduce measurement errors, and provide more reliable water level data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117671529B_ABST
    Figure CN117671529B_ABST
Patent Text Reader

Abstract

The present invention discloses a farmland water level observation device and an observation method based on UAV scanning measurement. The device includes a water level observation ruler, a UAV, an image acquisition component and a control component; the method includes obtaining multiple sample pictures; obtaining a target recognition model for identifying the water level observation ruler; controlling the UAV to obtain real-time pictures; inputting the real-time pictures into the target recognition model, and the target recognition model determines whether there is a water level observation ruler in the real-time pictures; obtaining a telephoto picture of the water level observation ruler through the telephoto lens of the image acquisition component, then obtaining basic information by identifying a QR code and obtaining water level data through a water level scale; the present invention uses a UAV in combination with an image acquisition component for remote measurement, greatly reducing the need for manual on-site measurement, providing a remote and unattended water level monitoring method. At the same time, due to the use of a UAV for rapid overflight, the water levels of large areas of farmland can be observed in a short time, significantly improving the measurement efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of agricultural water conservancy measurement, and particularly relates to a farmland water level observation device and an observation method based on unmanned aerial vehicle (UAV) scanning measurement. Background Art

[0002] Irrigation management of farmland is a key link to ensure the growth of crops and improve the yield of agricultural products. Among them, timely and accurate measurement and monitoring of the water level of farmland are of great significance for irrigation decision-making and water resource management of farmland.

[0003] Traditional methods for observing the water level of farmland usually require staff to conduct on-site inspections and directly observe the water level in the field. This method has low efficiency, is time-consuming and laborious, and may be difficult to observe under specific conditions (such as bad weather or unsmooth farmland roads), and a large amount of data needs to be manually recorded, increasing the possible errors in data recording.

[0004] If the fixed sensor method is adopted, that is, a water level sensor is fixedly installed in the field to automatically measure the water level. Although this method can obtain water level data in real time and automatically, its installation and maintenance costs are relatively high, and it is easily affected by environmental factors such as sludge and vegetation occlusion, resulting in inaccurate data. Summary of the Invention

[0005] The technical problem to be solved by the present invention is the difficulty in observing the water level of farmland. The purpose is to provide a farmland water level observation device and an observation method based on UAV scanning measurement, which realizes remote observation and automatic measurement of the water level of typical farmland.

[0006] The present invention is achieved through the following inventions:

[0007] In a first aspect, a farmland water level observation device based on UAV scanning measurement includes:

[0008] A water level observation ruler, which is fixedly arranged at the water level observation point of the farmland;

[0009] A UAV, which is communicatively connected to the control component of the observation station through a wireless communication network;

[0010] An image acquisition component, which is fixedly arranged on the UAV and is communicatively connected to the control component through a wireless communication network;

[0011] On the water level observation ruler, there are provided: a water level scale for water level observation and a two-dimensional code for basic information recording;

[0012] In the image acquisition component, there are provided: a wide-angle lens for determining the position of the water level observation ruler and a telephoto lens for obtaining pictures of the water level scale;

[0013] The image acquisition component is used to determine the position of the water level observation ruler and collect the water level scale and the two-dimensional code.

[0014] Specifically, the water level observation ruler is a rectangular rod with four vertical surfaces, and both the water level scale and the two-dimensional code are printed on the vertical surfaces; the two-dimensional code is located at the top of the vertical surface.

[0015] Optionally, the basic information includes: typical field block number, typical crop type, basic information of the observer, irrigation date, irrigation sequence, water ruler number, water level acquisition for irrigation;

[0016] The water level scale includes a plurality of regular triangular blocks, and the plurality of regular triangular blocks are arranged on the vertical surface in sequence from bottom to top, and the regular triangular block and the vertical surface are complementary colors.

[0017] In a second aspect, a method for observing farmland water level based on unmanned aerial vehicle (UAV) scanning measurement is applicable to the farmland water level observation device based on UAV scanning measurement as described above. The observation method includes:

[0018] Obtain multiple sample pictures, where the sample pictures are photos containing the water level observation ruler taken at various angles, various time periods, various weather conditions, and various crops at various distances;

[0019] Construct an object recognition model based on a convolutional neural network, and train the convolutional neural network with the sample pictures to obtain an object recognition model for recognizing the water level observation ruler;

[0020] Control the UAV to fly to the typical field block area, and obtain real-time images through the wide-angle lens of the image acquisition component, and perform frame extraction on the real-time images to obtain real-time pictures;

[0021] Input the real-time pictures into the object recognition model, and the object recognition model determines whether there is a water level observation ruler in the real-time pictures; if there is no water level observation ruler, discard the corresponding real-time pictures, re-perform frame extraction on the real-time images, obtain new real-time pictures and re-recognize them through the object recognition model; if there is a water level observation ruler, output the position coordinates of the water level observation ruler;

[0022] Obtain a telephoto picture of the water level observation ruler through the telephoto lens of the image acquisition component, and determine whether the water level observation ruler in the telephoto picture is blocked; if it is blocked, change the position of the UAV to re-take pictures; if it is not blocked, obtain the basic information by recognizing the two-dimensional code and obtain the water level data through the water level scale.

[0023] Optionally, the target recognition model runs within the control component. The real-time picture is transmitted to the control component through a wireless communication network, and the telephoto picture is transmitted to the control component through a wireless communication network. The control component controls the work of the drone and the image acquisition component, and the control component outputs water level data.

[0024] Specifically, the training method of the target recognition model includes:

[0025] Manually annotate the water level observation ruler in the sample pictures;

[0026] Place the annotated sample pictures into the original sample set;

[0027] Train the target recognition model through the original sample set to obtain an initial model;

[0028] Use the grid division method to split the sample pictures into multiple sample sub-pictures, remove the sample sub-pictures without target objects, and add the sample sub-pictures containing target objects to the original sample set to form a new sample set;

[0029] Adopt transfer learning to continue training the initial model through the new sample set until the model converges to obtain the target recognition model.

[0030] Specifically, the method of splitting the sample pictures includes:

[0031] (a) If the water level observation ruler is completely within a certain sample sub-picture, then assign the water level observation ruler to this sample sub-picture;

[0032] (b) If the water level observation ruler is located in two adjacent sample sub-pictures, then divide the water level observation ruler into two parts, and obtain the first area and the second area. The first area is the area where the water level observation ruler is located in one of the sample sub-pictures, and the second area is the area where the water level observation ruler is located in the other sample sub-picture;

[0033] Set a discard threshold. If the first area or the second area is less than the discard threshold, then discard the corresponding sample sub-picture;

[0034] If both the first area and the second area are not less than the discard threshold, then divide the water level observation ruler into two parts, and respectively assign the corresponding parts to the sample sub-pictures;

[0035] (c) If the water level observation ruler is located in four adjacent sample sub-pictures, then divide the water level observation ruler into four parts, and respectively obtain the first area, the second area, the third area, and the fourth area;

[0036] If the first area, the second area, the third area, or the fourth area is less than the discard threshold, then discard the corresponding sample sub-picture;

[0037] If the first area, the second area, the third area, or the fourth area is not less than the discard threshold, the corresponding part is allocated to the sample sub-image.

[0038] Specifically, the method for the target recognition model to judge the real-time image includes:

[0039] Obtain a real-time image and perform coordinate annotation on the real-time image;

[0040] Split the real-time image into multiple real-time sub-images and retain the coordinates annotated on the real-time image;

[0041] Input both the real-time image and the real-time sub-images into the target recognition model to obtain the position of the water level observation ruler in the real-time image or / and the real-time sub-images;

[0042] Determine the coordinates of the water level observation ruler through the annotated coordinates.

[0043] Specifically, the method for judging whether it is occluded includes:

[0044] Remove the noise of the long-focus image through Gaussian filtering to obtain an enhanced image;

[0045] Traverse the pixel points of the enhanced image and perform graying on each pixel point in turn: Gray = R * 0.299 + G * 0.587 + B * 0.114, where Gray is the gray value of the pixel point, R is the pixel value of the red channel, G is the pixel value of the green channel, and B is the pixel value of the blue channel;

[0046] Use the K-means clustering algorithm to segment the grayed enhanced image to obtain a segmented image;

[0047] Perform binarization on the segmented image, extract and draw the contours, and then perform contour approximation to obtain a binary image;

[0048] Judge whether there is a complete QR code and an uninterrupted water level scale from top to bottom in the binary image; if not, it is judged that the water level observation ruler is occluded; if so, it is judged that the water level observation ruler is not occluded.

[0049] Specifically, the water level scale includes multiple regular triangular blocks, and the multiple regular triangular blocks are arranged on the water level observation ruler from bottom to top in sequence. The lower end of the water level scale is flush with the bottom surface of the basic field block. The method for obtaining water level data includes:

[0050] Obtain the number m of large triangles in the binary image;

[0051] Identify the smallest triangle in the binary image and calculate to obtain the height h';

[0052] Calculate the current water level data: H = L - m * h - h', where L is the total height of the water level scale and h is the height of the regular triangle.

[0053] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0054] The present invention uses a drone equipped with an image acquisition component for telemetry, greatly reducing the need for on-site manual measurement, providing a remote and unattended water level monitoring method. At the same time, due to the use of a drone for rapid overflight, the water levels of large areas of farmland can be observed within a short time, significantly improving the measurement efficiency.

[0055] At the same time, the present invention uses an object recognition model based on a convolutional neural network, which can accurately identify the water level observation ruler in a complex farmland environment under various weather, crop, and lighting conditions, obtain water level data through the water level scale, and directly obtain the basic information corresponding to the water level observation ruler by identifying the two-dimensional code, avoiding errors that may be caused by negligence, line of sight problems, or other human factors in traditional manual observations. By using drones and automatic recognition technology, measurement errors can be significantly reduced, providing more reliable data. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] The drawings illustrate exemplary embodiments of the present invention and, together with the description thereof, are used to explain the principles of the present invention. These drawings are included to provide a further understanding of the present invention, and the drawings are included in this specification and form a part of this specification, and do not constitute a limitation on the embodiments of the present invention.

[0057] Figure 1 It is a schematic structural diagram of a farmland water level observation device based on drone scanning measurement according to the present invention.

[0058] Figure 2 It is a schematic flow diagram of a farmland water level observation method based on drone scanning measurement according to the present invention.

[0059] Reference numerals: 1 - water level observation ruler, 11 - water level scale, 12 - two-dimensional code, 2 - drone, 3 - image acquisition component, 4 - control component. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0060] To make the objectives, inventions, and advantages of the present invention clearer and more understandable, the present invention will be further described in detail below with reference to the drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the relevant content and do not limit the present invention.

[0061] In addition, it should be noted that for the sake of convenience of description, only parts related to the present invention are shown in the drawings.

[0062] Without conflict, the embodiments and features in the embodiments of the present invention can be combined with each other. The present invention will be described in detail below with reference to the drawings and in combination with the embodiments.

[0063] The control component 4 in the present invention can be a computer, a dedicated controller, etc. installed in the main observation station, or can be controlled by a mobile phone, a tablet computer, a portable computer and a drone 2 that can follow the operator. At the same time, the control component 4 can be a combination of the above two or more electronic devices. In the embodiments of the present invention, the control component 4 will be uniformly used for replacement.

[0064] The control component 4 has functions such as remotely controlling the drone 2, remotely controlling the image acquisition component 3, and processing the images acquired by the image acquisition component 3.

[0065] Embodiment 1

[0066] A farmland water level observation device based on drone 2 scanning measurement, comprising: a water level observation ruler 1, a drone 2, an image acquisition component 3 and a control component 4.

[0067] The water level observation ruler 1 is fixedly arranged at the water level observation point of the farmland, and the position of the water level observation ruler 1 is determined according to the actual situation.

[0068] The drone 2 is communicatively connected to the control component 4 of the observation station through a wireless communication network; the image acquisition component 3 is fixedly arranged on the drone 2 and is communicatively connected to the control component 4 through a wireless communication network; the drone 2 and the image acquisition component 3 can transmit signals through the same wireless module or through different wireless modules. The wireless communication signal can be a 4G or 5G signal, or other suitable near-field signals.

[0069] The image acquisition component 3 is provided with: a wide-angle lens for determining the position of the water level observation ruler 1 and a telephoto lens for obtaining pictures of the water level scale 11; the image acquisition component 3 is used to determine the position of the water level observation ruler 1 and to collect the water level scale 11 and the two-dimensional code 12. Because the area of a typical farmland is large, in order to quickly locate the water level observation ruler 1, a large-area image is obtained through the wide-angle lens, and then the water level observation ruler 1 is identified from it, which can reduce the positioning process. After the positioning of the water level observation ruler 1 is completed, a magnified image of the water level observation ruler 1 is obtained through the telephoto lens, and subsequent processing can be carried out.

[0070] The water level observation ruler 1 is provided with: a water level scale 11 for water level observation and a two-dimensional code 12 for basic information recording; the basic information includes: typical plot number, typical crop type, basic information of the observer, irrigation date, irrigation order, water gauge number, and irrigation water level collection.

[0071] Such asFigure 1 As shown, the water level observation ruler 1 is a rectangular rod with four vertical surfaces. The water level scale 11 and the two-dimensional code 12 are both printed and arranged on the vertical surfaces; the two-dimensional code 12 is located at the top of the vertical surface.

[0072] The water level scale 11 includes a plurality of equilateral triangular blocks, and the plurality of equilateral triangular blocks are sequentially arranged on the vertical surface from bottom to top. The equilateral triangular blocks and the vertical surface are complementary colors.

[0073] In this embodiment, the water level scale 11 is set as a stacked triangular block structure. Compared with the traditional water level scale 11, the water level scale 11 in this embodiment is designed by selecting a graph that can be easily recognized by a visual terminal according to the principle of image processing, such as a circle, a triangle, a square, etc. The water level can be cleverly recognized and converted through the shape and number of the graphs; a background color that can greatly reduce the influence of environmental factors is selected, and the equilateral triangular blocks and the vertical surface are complementary colors to ensure the accuracy and reliability of water level measurement; thereby improving the efficiency of the image recognition water level observation ruler 1.

[0074] Embodiment Two

[0075] As Figure 2 shown, this embodiment provides an observation method for a farmland water level observation device applicable to the above-mentioned drone scanning measurement. The observation method includes:

[0076] The first step is to obtain multiple sample pictures. The sample pictures are photos containing water level observation rulers taken at various angles, various time periods, various weather conditions, and various crops at various distances; the sample pictures cover various angles, time periods, weather conditions, crop types, and shooting distances, ensuring that when training the model, the model can learn various possible appearances of the water level observation ruler under various conditions. Thereby ensuring that the model can accurately identify the water level observation ruler under different environments and conditions.

[0077] The second step is to construct an object recognition model based on a convolutional neural network and train the convolutional neural network through the sample pictures to obtain an object recognition model for recognizing the water level observation ruler; utilize the powerful feature extraction ability of the convolutional neural network (CNN) to achieve accurate recognition of the water level observation ruler. The convolutional neural network learns the features of the image through multiple layers of convolution, pooling, and fully connected layers. In this embodiment, the model will be trained as a classifier that can identify whether the picture contains a water level observation ruler.

[0078] In the third step, control the drone to fly to the typical field area, and obtain real-time images through the wide-angle lens of the image acquisition component. Perform frame extraction on the real-time images to obtain real-time pictures. Fly the drone above the field area through the drone remote controller, etc., and obtain images in real time through the wide-angle lens of the image acquisition component it carries. Subsequently, the system performs frame extraction on the real-time video stream, converting the continuous video stream into individual pictures.

[0079] In the fourth step, input the real-time pictures into the target recognition model. The target recognition model determines whether there is a water level observation ruler in the real-time pictures. If there is no water level observation ruler, discard the corresponding real-time pictures, re-perform frame extraction on the real-time images, obtain new real-time pictures and re-recognize them through the target recognition model. If there is a water level observation ruler, output the position coordinates of the water level observation ruler. Each real-time picture is sent into the pre-trained target recognition model. If the model fails to recognize the water level observation ruler in the picture, the picture will be discarded, and pictures will be obtained again from new video frames. If the model successfully recognizes, output the precise position coordinates of the observation ruler.

[0080] In the fifth step, obtain the telephoto pictures of the water level observation ruler through the telephoto lens of the image acquisition component, and determine whether the water level observation ruler in the telephoto pictures is blocked. If it is blocked, change the position of the drone to re-take pictures. If it is not blocked, obtain the basic information by recognizing the QR code and obtain the water level data through the water level scale.

[0081] Once the position of the water level observation ruler is determined, the image acquisition component of the drone will use the telephoto lens to take pictures of it to obtain pictures with higher resolution and clarity. The system then checks the pictures to confirm whether the observation ruler is blocked by other objects (such as crops). If blocked, the drone will adjust its position to re-take pictures. If not blocked, the system will read the basic information from the QR code and read the water level data from the water level scale.

[0082] In this embodiment, in order to reduce the computing amount of the drone or the image acquisition component, the target recognition model runs in the control component. The real-time pictures are transmitted to the control component through the wireless communication network, and the telephoto pictures are transmitted to the control component through the wireless communication network. The control component controls the work of the drone and the image acquisition component, and finally the control component outputs the water level data.

[0083] Embodiment Three

[0084] For the second step in Embodiment Two, the training method of the target recognition model includes:

[0085] Manually annotate the water level observation ruler in the sample pictures; in the sample pictures, manually identify and circle the position of the water level observation ruler by the annotator, so as to ensure that the model can clearly know the accurate position of the water level observation ruler in the sample pictures, provide real data labels for the subsequent training of the model, and obtain a sample data set containing accurate labels as the basis for model training.

[0086] Place the annotated sample pictures into the original sample set; integrate the manually annotated pictures into the original picture data set, which is done to construct a more complete data set containing annotation information. When the data set is complete and contains annotation information, the model can receive richer data during training, so as to better learn how to identify the water level observation ruler.

[0087] Train the target recognition model through the original sample set to obtain an initial model; use the annotated original data set for the preliminary training of the model. The purpose of this step is to enable the model to initially learn how to identify the position of the water level observation ruler in the image. Through this preliminary training, a basic version of the model can be obtained, which has a certain ability to identify the water level observation ruler.

[0088] Use the grid division method to split the sample pictures into multiple sample sub-pictures, remove the sample sub-pictures without target objects, and add the sample sub-pictures containing target objects to the original sample set to form a new sample set; perform grid division on each sample picture, which can generate multiple small sample sub-pictures. Subsequently, the system will automatically remove those sub-pictures that do not contain the water level observation ruler. This method can further improve the diversity of the data set, and at the same time, it can reduce irrelevant or redundant data, ensuring the efficiency and accuracy of model training.

[0089] Adopt transfer learning to continue training the initial model through the new sample set until the model converges to obtain the target recognition model. Based on the model obtained from the first training, use the new sample data set for training again. Because transfer learning can apply the knowledge obtained by the model on one task to another related task, the strategy of transfer learning is adopted in this step, so as to accelerate the learning process and improve the performance of the model. Obtain a model that can more accurately identify the water level observation ruler.

[0090] In this embodiment, the method for splitting the sample pictures includes:

[0091] (a) If the water level observation ruler is completely within a certain sample sub-picture, then assign the water level observation ruler to this sample sub-picture; that is, when the overall shape and features of the water level observation ruler are included in this sample sub-picture. Therefore, in order to ensure that the training model can accurately identify and locate the water level observation ruler, assign this complete water level observation ruler to this sample sub-picture.

[0092] (b) If the water level observation ruler is located within two adjacent sample sub - figures, divide the water level observation ruler into two parts, and obtain the first area and the second area. The first area is the area of the water level observation ruler within one of the sample sub - figures, and the second area is the area of the water level observation ruler within the other sample sub - figure;

[0093] Set a discard threshold. If the first area or the second area is less than the discard threshold, discard the corresponding sample sub - figure;

[0094] If both the first area and the second area are not less than the discard threshold, divide the water level observation ruler into two parts, and respectively assign the corresponding parts to the sample sub - figures.

[0095] Due to the position or size of the water level observation ruler, it may span two adjacent sample sub - figures. To ensure effective learning, divide it into two parts and calculate the areas of the two parts respectively. If the area of one part is too small and lower than the preset discard threshold, it means that this part cannot provide enough information for the model, so it is discarded. When the area of a certain part is greater than the discard threshold, it is respectively assigned to the two sample sub - figures.

[0096] (c) If the water level observation ruler is located within four adjacent sample sub - figures, divide the water level observation ruler into four parts, and respectively obtain the 1st area, the 2nd area, the 3rd area, and the 4th area;

[0097] If the 1st area, the 2nd area, the 3rd area, or the 4th area is less than the discard threshold, discard the corresponding sample sub - figure;

[0098] If the 1st area, the 2nd area, the 3rd area, or the 4th area is not less than the discard threshold, assign the corresponding part to the sample sub - figure.

[0099] In addition, there is a more complex situation where the water level observation ruler is shared by four sample sub - figures. In this case, divide it into four parts and calculate the area of each part respectively. Similarly, any part with an area less than the discard threshold will be discarded, and only the parts with an area not less than the threshold will be assigned to the corresponding sample sub - figures.

[0100] Example 4

[0101] This example illustrates the utilization of the target recognition model. The method for the target recognition model to judge real - time pictures includes:

[0102] Obtain a real - time picture and perform coordinate annotation on the real - time picture; When the drone starts to collect real - time images, first obtain a real - time picture. For the convenience of subsequent processing, define a coordinate system on the picture and perform coordinate annotation on this real - time picture, so as to represent the position of the water level observation ruler on the picture with coordinates.

[0103] Split the real-time image into multiple real-time sub-images and retain the coordinates marked on the real-time image; to more accurately detect and locate the water level observation ruler, split the real-time image into multiple real-time sub-images. This enables the model to detect the water level observation ruler at different scales and perspectives. During the splitting process, ensure that the coordinate markings on the original image are retained so that the position of the object can be accurately determined in subsequent steps.

[0104] Input both the real-time image and the real-time sub-images into the target recognition model to obtain the position of the water level observation ruler in the real-time image or / and the real-time sub-images; input the entire real-time image and all the real-time sub-images into the target recognition model. The model will analyze each image and attempt to find the position of the water level observation ruler in it. When the model recognizes the water level observation ruler in a certain real-time image or real-time sub-image, it will output the position of the object, usually a coordinate or a bounding box.

[0105] Determine the coordinates of the water level observation ruler based on the marked coordinates. According to the position output by the model and the coordinate markings previously made on the real-time image, the coordinates of the water level observation ruler in the real-time image can be accurately determined. Further analysis and processing of the water level observation ruler can be carried out.

[0106] In addition, after completing the position recognition of the water level observation ruler, it is necessary to determine whether it is occluded. The methods include:

[0107] Remove the noise of the long-focus image through Gaussian filtering to obtain an enhanced image; when capturing a long-focus image, image noise may appear for various reasons, such as light, camera characteristics, etc. To process the image more accurately, first use Gaussian filtering to smooth the image and remove this noise. The obtained image is clearer and easier to analyze.

[0108] Traverse the pixel points of the enhanced image and perform grayscale conversion on each pixel point in turn: Gray = R * 0.299 + G * 0.587 + B * 0.114, where Gray is the grayscale value of the pixel point, R is the pixel value of the red channel, G is the pixel value of the green channel, and B is the pixel value of the blue channel;

[0109] Use the K-means clustering algorithm to segment the grayscale enhanced image to obtain a segmented image; the K-means clustering algorithm clusters pixel points with similar grayscale values together, which can segment the image into different regions. This can help identify and separate the main objects and the background in the image.

[0110] Binarize the segmented image, extract and draw the contours, and then perform contour approximation to obtain a binary image. Binarization converts the image into an image with only two values, making the contrast between the object and the background more distinct. Extracting the contours can help find all the objects in the image. Contour approximation can simplify the shape of the contours to make them closer to the actual object shape.

[0111] Determine whether there is a complete QR code and an uninterrupted water level scale from top to bottom in the binary image. If not, it is determined that the water level observation ruler is blocked. If so, it is determined that the water level observation ruler is not blocked. A complete QR code and a continuous water level scale indicate that the water level observation ruler is visible and not blocked by any object. Conversely, if it is incomplete or interrupted, it means that the observation ruler may be blocked by other objects.

[0112] Finally, when it is determined that the water level observation ruler is not blocked, the images of the water level scale and the QR code can be obtained, and then the water level is measured according to the water level scale, and the basic information is obtained from the QR code. The water level scale in this embodiment includes multiple equilateral triangular blocks, which are arranged on the water level observation ruler from bottom to top in sequence. The lower end of the water level scale is flush with the bottom surface of the basic field block. When the water level rises or falls, it will cover or expose some equilateral triangular blocks, thus providing us with intuitive information about the water level height.

[0113] The method for obtaining water level data includes:

[0114] Obtain the number m of large triangles in the binary image;

[0115] Identify the smallest triangle in the binary image and calculate to obtain the height h';

[0116] Calculate to obtain the current water level data: H = L - m * h - h', where L is the total height of the water level scale and h is the height of the equilateral triangle.

[0117] Embodiment 5

[0118] This embodiment provides a farmland water level observation terminal based on UAV scanning measurement, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the above-mentioned farmland water level observation method based on UAV scanning measurement.

[0119] The memory can be used to store software programs and modules. The processor executes various functional applications and data processing of the terminal by running the software programs and modules stored in the memory. The memory mainly includes a program storage area and a data storage area. Among them, the program storage area can store an operating system, execution programs required for at least one function, etc.

[0120] The data storage area can store data created according to the use of the terminal, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0121] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned method for observing farmland water level based on drone scanning measurement are implemented.

[0122] Without loss of generality, computer-readable media may include computer storage media and communication media. Computer storage media includes volatile and non-volatile, removable and non-removable media implemented by any method or technology for storing information such as computer-readable instructions, data structures, program modules, or other data. Computer storage media includes RAM, ROM, EPROM, EEPROM, flash memory or other solid-state storage technologies, CD-ROM, DVD or other optical storage, magnetic tape cartridges, magnetic tapes, magnetic disk storage or other magnetic storage devices. Of course, those skilled in the art will appreciate that computer storage media is not limited to the above several types. The above-mentioned system memory and mass storage devices may be collectively referred to as memory.

[0123] In the description of this specification, the descriptions referring to terms such as "one embodiment / way", "some embodiments / ways", "example", "specific example", or "some examples" mean that the specific features, structures, materials, or characteristics described in connection with the embodiment / way or example are included in at least one embodiment / way or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment / way or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any one or more embodiments / ways or examples in a suitable manner. In addition, without contradiction, those skilled in the art may combine and combine the different embodiments / ways or examples described in this specification and the features of different embodiments / ways or examples.

[0124] In addition, the terms "first" and "second" are used only for descriptive purposes and cannot be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present application, "a plurality of" means at least two, such as two, three, etc., unless otherwise specifically defined.

[0125] Those skilled in the art should understand that the above-described embodiments are merely for clearly illustrating the present invention and are not intended to limit the scope of the present invention. For those skilled in the art, other changes or modifications can be made based on the above invention, and these changes or modifications are still within the scope of the present invention.

Claims

1. A method for observing farmland water levels based on drone scanning measurement, characterized in that, The observation method includes: Obtain multiple sample pictures, which are pictures containing a water level observation ruler taken at various distances under various angles, at various time periods, in various weather conditions, and for various crops; Construct an object recognition model based on a convolutional neural network, and train the convolutional neural network with the sample pictures to obtain an object recognition model for identifying the water level observation ruler; Control the drone to fly to the typical field area, and obtain real-time images through the wide-angle lens of the image acquisition component, and perform frame extraction on the real-time images to obtain real-time pictures; Input the real-time pictures into the object recognition model, and the object recognition model determines whether there is a water level observation ruler in the real-time pictures; if there is no water level observation ruler, discard the corresponding real-time pictures, re-extract frames from the real-time images, obtain new real-time pictures and re-identify them through the object recognition model; if there is a water level observation ruler, output the position coordinates of the water level observation ruler; Obtain a long-focus picture of the water level observation ruler through the long-focus lens of the image acquisition component, and determine whether the water level observation ruler in the long-focus picture is blocked; if it is blocked, change the position of the drone to take pictures again; if it is not blocked, obtain basic information by identifying the QR code and obtain water level data through the water level scale; The method for the object recognition model to judge the real-time pictures includes: Obtain the real-time pictures and perform coordinate annotation on the real-time pictures; Split the real-time pictures into multiple real-time sub-pictures and retain the coordinates marked on the real-time pictures; Input both the real-time pictures and the real-time sub-pictures into the object recognition model to obtain the position of the water level observation ruler in the real-time pictures or / and the real-time sub-pictures; Determine the coordinates of the water level observation ruler through the marked coordinates; Among them, the method for judging whether it is blocked includes: Remove the noise of the long-focus picture through Gaussian filtering to obtain an enhanced image; Traverse the pixel points of the enhanced image, and sequentially perform graying on each pixel point Gray = R * 0.299 + G * 0.587 + B * 0.114, where Gray is the gray value of the pixel point, R is the pixel value of the red channel, G is the pixel value of the green channel, and B is the pixel value of the blue channel; Use the K-means clustering algorithm to segment the grayed enhanced image to obtain a segmented image; Perform binarization on the segmented image, extract and draw the contours, and then perform contour approximation to obtain a binary image; Judge whether there is a complete QR code and an uninterrupted water level scale from top to bottom in the binary image; if not, judge that the water level observation ruler is blocked; if so, judge that the water level observation ruler is not blocked.

2. The farmland water level observation method based on drone scanning measurement according to claim 1, characterized in that, The object recognition model runs in the control component, the real-time pictures are transmitted to the control component through a wireless communication network, the long-focus pictures are transmitted to the control component through a wireless communication network, the control component controls the work of the drone and the image acquisition component, and the control component outputs water level data.

3. A method for observing farmland water level based on drone scanning measurement according to claim 1, characterized in that, The training method of the object recognition model includes: Use manual annotation to annotate the water level observation ruler in the sample pictures; Place the annotated sample pictures in the original sample set; Train the object recognition model with the original sample set to obtain an initial model; Use the grid division method to split the sample image into multiple sample sub-images, remove the sample sub-images without the target object, and add the sample sub-images containing the target object to the original sample set to form a new sample set; Adopt transfer learning to continue training the initial model through the new sample set until the model converges to obtain the target recognition model.

4. A method for observing farmland water level based on drone scanning measurement according to claim 3, characterized in that, The method for splitting the sample image includes: (a)If the water level observation scale is completely within a certain sample sub-image, assign the water level observation scale to this sample sub-image; (b)If the water level observation scale is located within two adjacent sample sub-images, divide the water level observation scale into two parts, and obtain the first area and the second area. The first area is the area where the water level observation scale is located in one sample sub-image, and the second area is the area where the water level observation scale is located in the other sample sub-image; Set a discard threshold. If the first area or the second area is less than the discard threshold, discard the corresponding sample sub-image; If both the first area and the second area are not less than the discard threshold, divide the water level observation scale into two parts and assign the corresponding parts to the sample sub-images respectively; (c)If the water level observation scale is located within four adjacent sample sub-images, divide the water level observation scale into four parts, and obtain the first area, the second area, the third area, and the fourth area respectively; If the first area, the second area, the third area, or the fourth area is less than the discard threshold, discard the corresponding sample sub-image; If the first area, the second area, the third area, or the fourth area is not less than the discard threshold, assign the corresponding part to the sample sub-image.

5. A method for observing farmland water levels based on drone scanning and measurement according to claim 1, characterized in that, The water level scale includes a plurality of regular triangular blocks, which are arranged on the water level observation scale from bottom to top in sequence. The lower end of the water level scale is flush with the bottom surface of the basic field block. The method for obtaining water level data includes: Obtain the number m of large triangles in the binary image; Identify the smallest triangle in the binary image and calculate to obtain the height h'; Calculate the current water level data: H = L - m * h - h', where L is the total height of the water level scale and h is the height of the regular triangle.

6. The farmland water level observation method based on UAV scanning measurement according to claim 1, characterized in that Provide a farmland water level observation device applicable to the above observation method, including: A water level observation scale (1), which is fixedly arranged at the water level observation point of the farmland; A drone (2), which is communicatively connected to the control component (4) of the observation station through a wireless communication network; An image acquisition component (3), which is fixedly arranged on the drone (2) and is communicatively connected to the control component (4) through a wireless communication network; On the water level observation scale (1), there are provided: a water level scale (11) for water level observation and a two-dimensional code (12) for basic information recording; Inside the image acquisition component (3), there are provided: a wide-angle lens for determining the position of the water level observation scale (1) and a telephoto lens for obtaining a picture of the water level scale (11); The image acquisition component (3) is used to determine the position of the water level observation scale (1) and to collect the water level scale (11) and the two-dimensional code (12).

7. A method for observing farmland water level based on drone scanning measurement according to claim 6, characterized in that, The water level observation scale (1) is a rectangular rod with four vertical surfaces. The water level scale (11) and the two-dimensional code (12) are both printed on the vertical surfaces; the two-dimensional code (12) is located at the top of the vertical surface.

8. A method for observing farmland water level based on drone scanning measurement according to claim 7, characterized in that, The basic information includes: typical field block number, typical crop type, basic information of the observer, irrigation date, irrigation sequence, water gauge number, and collection of irrigation water level; The water level scale (11) includes a plurality of equilateral triangular blocks, which are sequentially arranged on the vertical plane from bottom to top, and the equilateral triangular blocks and the vertical plane are complementary colors.

Citation Information

Patent Citations

  • Water conservancy project monitoring system based on remote sensing image

    CN113959525A

  • Water gauge reading identification method based on semantic segmentation

    CN115880571A