Reconnaissance method for irrigation area gate measurement and control integrated design
By carrying a variety of sensors and image processing algorithms on the drone, high-precision and all-round survey of the irrigation gates are achieved, and the problems of low efficiency, poor safety and insufficient data accuracy of traditional survey methods are solved, and detailed survey and design reports are generated.
Patent Information
- Application Number
- CN202510383376.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-28
- Publication Date
- 2025-07-11
AI Technical Summary
The traditional irrigation gate survey method is inefficient, poor safety and insufficient data accuracy, making it difficult to meet the accuracy and efficiency needs of modern agriculture, especially in complex terrain and severe weather conditions, which is difficult to achieve comprehensive and reliable survey.
The drone is equipped with a variety of sensors such as high-definition cameras, vision sensors, infrared thermal imagers and lidars, combined with GPS and Beidou satellite navigation system, and through image enhancement processing, feature extraction and recognition algorithms, high-precision survey and automated report generation of gates are achieved.
It improves survey accuracy and efficiency, reduces safety risks, and generates high-quality survey reports and preliminary design reports to support subsequent decision-making and control.
Smart Images

Figure CN120298932A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of irrigation district gate detection, and particularly to a survey method for integrated design of measurement and control of irrigation district gates. Background Art
[0002] Traditional irrigation district gates have problems such as aging, improper design, and low operating efficiency. At the same time, the conventional manual operation method can no longer meet the requirements of modern agriculture for irrigation accuracy, timeliness, and efficiency. Therefore, through informatization transformation, realizing remote control and automatic adjustment of irrigation district gates has become an important means to improve agricultural production efficiency and water resource utilization rate. And the survey method, as the basis of informatization transformation, its accuracy and reliability directly affect the design and implementation effect of subsequent transformation plans.
[0003] At present, the problems faced by traditional survey methods are at least in the following aspects: 1. Inefficient and time-consuming, it is difficult to ensure timely response to the gate status. 2. Traditional survey methods are also severely restricted by road conditions and visual range; many irrigation districts are located in remote areas with complex terrain, rough roads, and even inaccessible areas; this not only increases the difficulty of personnel arriving at the scene, but also limits the coverage of the survey; in addition, due to the limitation of the visual range, it is often difficult for manual surveys to observe all details of the gate, especially high or hidden parts, and potential safety hazards are easily overlooked. 3. In complex terrain or bad weather conditions, the efficiency and safety of traditional survey methods are greatly reduced; for example, in mountainous areas or swampy areas, it is difficult for personnel to move forward, and there are safety risks such as landslides and collapses; in bad weather such as heavy rain and strong winds, not only is it difficult to carry out survey work, but it may also pose a threat to personnel safety; these adverse factors seriously restrict the effectiveness and reliability of traditional survey methods. 4. Traditional survey methods also have problems of insufficient informatization level and data accuracy. Due to the lack of advanced survey technologies and data analysis means, traditional survey methods often rely on the experience and judgment of survey personnel, are easily affected by environmental factors, resulting in low data accuracy. At the same time, due to limited recording means, it is difficult for survey results to form systematic and traceable data records, which is not conducive to subsequent analysis and decision-making.
[0004] Therefore, traditional survey methods have many deficiencies and limitations in the management of gates in existing irrigation districts. In order to improve survey efficiency, ensure personnel safety, and improve data accuracy, it is urgent to introduce new technical means and methods to improve and optimize gate survey work. Summary of the Invention
[0005] In view of the problems existing in the prior art, the present invention provides a survey method for integrated design of measurement and control of irrigation district gates.
[0006] The present invention provides a survey method for the integrated measurement and control design of irrigation district gates, adopting the following technical solutions:
[0007] A survey method for the integrated measurement and control design of irrigation district gates includes the following steps:
[0008] Collect the survey data of the irrigation district, divide the key areas, and obtain data for the key areas through drones;
[0009] Use histogram equalization and contrast adjustment methods to enhance the collected images, improve the image quality and clarity, and perform filtering processing on the images with Gaussian filtering to smooth the images;
[0010] Extract image features, including edge information, corner points, and textures;
[0011] Perform image recognition and matching processing through the features to determine the identity and status of the gates, and further judge whether the gate status is normal;
[0012] Visualize and output the judgment results.
[0013] In a specific feasible implementation, using histogram equalization and contrast adjustment methods to enhance the collected images, improve the image quality and clarity, and performing filtering processing on the images with Gaussian filtering to smooth the images includes the following steps:
[0014] Calculate the histogram of the image, redistribute the gray values according to the histogram distribution, adjust the image contrast, and highlight the key features of the gates;
[0015] Perform weighted averaging on the gray values of the pixel points to be filtered and their neighborhood points through Gaussian blur according to certain parameter rules, and the calculation formula is:
[0016]
[0017] In the formula, (x,y) is the coordinate of the pixel point, and σ is the standard deviation, which determines the width of the Gaussian function.
[0018] In a specific feasible implementation, extracting image features includes the following steps:
[0019] Extract the outline and details of the gates through the edge algorithm,
[0020] Adopt the Shi-Tomasi corner detection algorithm for corner detection,
[0021] Adopt the local binary pattern to recognize and extract the texture features of the gates.
[0022] In a specific feasible implementation, extracting the outline and details of the gates through the edge algorithm includes the following steps:
[0023] Convert the color image to a grayscale image, and perform weighted averaging on the pixel values of the red, green, and blue channels. The calculation formula is as follows:
[0024] I gray = 0.299 × I R + 0.587 × I G + 0.114 × I B
[0025] In the formula, I gray represents the pixel value after grayscale conversion, I R represents the pixel value on the red channel, I G represents the pixel value on the green channel, I B represents the pixel value on the blue channel;
[0026] Use the Sobel operator to calculate the gradient values of the gate grayscale image in the horizontal and vertical directions, and then obtain the gradient magnitude and direction. The calculation formulas for the gradient values in the horizontal and vertical directions are as follows:
[0027]
[0028] In the above formula, G x represents the gradient value in the horizontal direction, G y represents the gradient value in the vertical direction; The calculation process for the gradient magnitude of each pixel is:
[0029]
[0030] In the above formula, M(x, y) represents the gradient magnitude, and θ(x, y) represents the gradient direction;
[0031] Compare the gradient magnitude with the magnitude threshold, and mark and connect the pixels whose gradient magnitude is greater than the magnitude threshold.
[0032] In a specific feasible implementation, the corner detection using the Shi-Tomasi corner detection algorithm includes the following steps:
[0033] Calculate the response value of the point. The calculation formula is:
[0034] R = min(λ1, λ2)
[0035] In the above formula, R is the response value, and λ1 and λ2 are the two eigenvalues of the autocorrelation matrix at a certain point in the image;
[0036] Compare the response value R with the set threshold R′. If R > R′, then this point is a corner.
[0037] In a specific feasible implementation, the recognition and extraction of the texture features of the gate using the local binary pattern include the following steps:
[0038] Select a 3×3 window and use the gray value of the central pixel of the window as the threshold I c ,
[0039] For each neighborhood pixel, use the gray value I p Compare it with the gray value I of the central pixel c If I p ≥I c , mark the corresponding position as 1; if I p <I c , mark the corresponding position as 0;
[0040] For each central pixel, an 8-bit binary number can be obtained, that is, the LBP code. Convert this 8-bit binary number to a decimal number to get the LBP value of the central pixel. The calculation formula of the LBP value is:
[0041] LBP(xc,yc) = Σ _ (p = 0)p
[0042] In the above formula, (xc,yc) represents the coordinates of the central pixel;
[0043] Statistically calculate the LBP values of the entire image and generate an LBP histogram as the texture feature.
[0044] In a specific feasible implementation, perform image recognition and matching processing through features, including the following steps:
[0045] Calculate the normalized cross-correlation coefficient of the pixel intensity values of the corresponding windows in the image and the template through the NCC algorithm to measure the similarity. The NCC value is between -1 and 1, where 1 means the two images are completely matched, -1 means the two images are completely unmatched, and 0 means there is no correlation between the two images. Screen out the images similar to the template; the calculation formula of the NCC value is:
[0046]
[0047] In the above formula, A(x,y) and B(x,y) respectively represent the pixel values of the two images at the corresponding coordinates (x,y), and respectively represent the means of all pixel values within the two image windows, and ∑ (x,y) represents the summation over all coordinates (x,y).
[0048] In a specific feasible implementation, determine the identity and status of the gate, and further determine whether the gate status is normal, including the following steps:
[0049] Using the support vector machine machine learning algorithm, convert the various parameters and data of the gate image into feature vectors, and determine their belonging categories according to the positions of the feature vectors. The calculation formula is as follows:
[0050]
[0051] In the above formula, x is the input feature vector, f(x) is the output of the SVM, which is used to determine the category of the input sample, N is the number of support vectors, α i is the coefficient of the support vector, y i is the category label of the support vector, K(x i , x) is the kernel function, which is used to calculate the similarity between the support vector x i and the input sample, and b is the bias term.
[0052] In a specific feasible implementation, for complex image recognition tasks or when the gate features are not obvious, a deep learning algorithm can be used for feature extraction, including the following steps:
[0053] Extract local features such as edges, textures, and shapes in the image through convolution operations;
[0054] Use an activation function to increase the non-linear expression ability of the network. The activation function ReLU sets all negative values to 0 while retaining all positive values;
[0055] Max pooling selects the maximum value in each pooling window as the output, removes redundant information, and reduces the size of the feature map;
[0056] Map the extracted features to the output categories;
[0057] Measure the difference between the model output and the true label through a loss function to improve its prediction accuracy.
[0058] In a specific feasible implementation, after further determining whether the gate state is normal, perform anomaly detection on the processed data using the isolation forest algorithm, including the following steps:
[0059] Randomly select a feature and a value as the splitting point, and divide the data point feature vectors into left and right subsets according to the splitting point, and recursively divide the left and right subsets until the stopping condition is met;
[0060] For each data point of the gate image, start from the root node and traverse downward in the isolation tree according to its feature value until reaching the leaf node, and record the path length of the feature vector data point in the isolation tree;
[0061] According to the preset path threshold, if the path length is less than the path threshold, the data point is considered abnormal.
[0062] In summary, the present invention includes the following beneficial effects:
[0063] 1. High-precision multi-dimensional data acquisition: By combining multiple sensors such as high-definition cameras, vision sensors, infrared thermal imagers, and lidar, and integrating satellite navigation systems such as GPS and Beidou, multi-dimensional information such as the position, size, and category of the gate can be accurately extracted, improving the survey accuracy.
[0064] 2. Multi-source data fusion technology: A variety of sensors carried by the UAV will generate a large amount of data, which need to be processed and analyzed through data fusion technology. The data fusion technology can integrate and fuse data from different sensors, thereby improving the accuracy and reliability of identification. Through data fusion, the UAV can comprehensively understand the information of the gate, such as position, shape, size, etc., providing strong support for subsequent decision-making and control.
[0065] 3. Automatic generation of survey reports: After the UAV completes the survey task of the irrigation area gates, the collected data and information are automatically converted and organized into a survey report using automated report generation technology. Through this technology, the UAV can automatically organize and analyze the data and information collected during the survey process, and generate a survey report containing detailed information about the gate, location map, analysis results, etc. This can not only greatly improve the report generation efficiency but also ensure the accuracy and integrity of the report.
[0066] 4. Automatic generation of preliminary design reports: Based on the generated survey report, using information-based preliminary design report automatic generation technology, corresponding information-based preliminary design reports can be automatically generated according to the data and information in the survey report. This technology usually combines automated design software, database management systems, and artificial intelligence technology, enabling rapid analysis and processing of survey data and automatically generating design reports according to the analysis results. The design report usually includes design ideas, design schemes, equipment selection, engineering quantity calculation, etc., providing strong support for subsequent project implementation.
[0067] 5. Significantly improve efficiency: The UAV quickly covers large areas, shortens the survey cycle, and improves work efficiency. The use of UAV flight technology avoids the limitations of manual inspections and enables rapid and comprehensive surveys.
[0068] 6. Comprehensive monitoring: Overcoming terrain limitations, realizing all-round monitoring of the gate and its surrounding environment. Equipped with multiple sensors, it can obtain images, temperature distributions, and three-dimensional structure information of the gate, providing all-round survey data.
[0069] 7. Reduce safety risks: Reduce the need for personnel to enter dangerous areas and enhance operation safety. The UAV is remotely operated, avoiding personnel entering dangerous areas and reducing safety risks.
[0070] 8. Improve data accuracy: The combination of high-precision sensors and algorithms ensures data accuracy. The high-precision positioning system ensures the accuracy of data collection, and the data analysis algorithm further improves the accuracy and reliability of the data.
[0071] 9. Reduce costs: The long-term operating cost is much lower than the traditional method, and the economic benefit is significant. The UAV survey method reduces the use of manual labor and ground vehicles, reduces the maintenance cost, and improves the economic benefit. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] Figure 1 is a flowchart of the survey method of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0073] The present invention will be further described and explained below in conjunction with the drawings and specific embodiments. The technical features of each embodiment of the present invention can be combined correspondingly without conflict.
[0074] In order to make the above objects, features and advantages of the present invention more obvious and understandable, the specific embodiments of the present invention will be described in detail below with reference to the drawings. Many specific details are set forth in the following description in order to fully understand the present invention. However, the present invention can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without departing from the connotation of the present invention. Therefore, the present invention is not limited by the specific embodiments disclosed below. The technical features of each embodiment of the present invention can be combined correspondingly without conflict.
[0075] Combined with Figure 1 , this embodiment provides a survey method for the integrated design of gate measurement and control in irrigation areas, including a preparation stage, an implementation stage and a result sorting stage. The preparation stage includes the following steps:
[0076] S11. Collect and sort out the preliminary data to understand the overall situation of the irrigation area. The preliminary data includes the preliminary project data of the irrigation area, mainly including the design data of the irrigation area, engineering design drawings, the geographical location of the gates, and the surrounding topographic map data. In this embodiment, a UAV can be used to collect relevant data of the irrigation area. It should be noted that the UAV provides a flexible aerial platform that can take off and land autonomously, hover and cruise, ensuring accurate survey of the gates in complex environments. Moreover, the flight control system and navigation system of the UAV ensure that it can fly according to the predetermined route and altitude to obtain high-quality survey data.
[0077] S12. The drone is prepared and calibrated to ensure that the drone platform is equipped with a variety of correct sensors, and necessary calibration and tests are carried out to ensure the accuracy and reliability of data collection. It should be noted that sensors such as high-definition cameras, vision sensors, infrared thermal imagers, and lidar are carried to obtain images, temperature distributions, and three-dimensional structure information of the gate.
[0078] S13. According to the obtained results, the survey plan and route are set. Specifically, based on the survey data obtained in S11, key areas are divided, and the drone is flown over the key areas. That is, according to the geographical location, structure, and surrounding environment of the gate, a detailed survey plan is formulated, including parameters such as flight route, altitude, and speed, to ensure the comprehensiveness and efficiency of data collection. Then, the drone is dispatched for data collection.
[0079] For easy understanding, three different cases are listed below for further illustration.
[0080] Case 1: The surrounding environment of the gate is an open plain
[0081] Flight route: Adopt grid flight to cover the gate and its surrounding areas to ensure no dead angles.
[0082] Flight altitude: 50 - 100 meters, adjusted according to the specific situation.
[0083] Flight speed: 5 - 10 m / s to ensure clear images.
[0084] Shooting angle: Shoot vertically and at a 45-degree oblique angle to obtain the overall and detailed views of the gate.
[0085] Case 2: The surrounding environment of the gate is a mountainous area or hilly land
[0086] Flight route: Fly along the contour line to avoid obstacles and fly in sections if necessary.
[0087] Flight altitude: Adjust according to the terrain, maintaining a relative altitude of 50 - 100 meters.
[0088] Flight speed: 3 - 5 m / s to ensure safety.
[0089] Shooting angle: Shoot from multiple angles to obtain the overall and detailed views of the gate and capture the relationship between the gate and the terrain.
[0090] Case 3: The surrounding environment of the gate is dense buildings or vegetation
[0091] Flight route: Adopt circular flight to avoid obstacles and manually control if necessary.
[0092] Flight altitude: 30 - 50 meters to ensure safety.
[0093] Flying speed: 2 - 4 m / s to ensure clear images.
[0094] Shooting angle: Shoot from multiple angles to obtain the overall and detailed views of the gate and capture the relationship between the gate and the surrounding environment.
[0095] The implementation stage specifically includes the following steps:
[0096] S21. Obtain the position, geometric dimensions, structural features, and surrounding environment information of the gate through various sensors such as high - definition cameras, infrared thermal imagers, and lidar.
[0097] In this embodiment, the high - definition camera can capture high - definition images of the gate, which are used to check the surface condition of the gate, such as rust, cracks, or foreign object attachment, etc., providing an intuitive basis for the daily maintenance of the gate. The vision sensor can capture images of the gate through the camera. For example, a binocular vision sensor can simulate human eyes and calculate the differences between the images captured by two cameras to obtain the depth information of the gate, realizing three - dimensional reconstruction and precise positioning. Another example is that a monocular vision sensor mainly uses image - processing techniques such as edge detection and contour extraction to identify the shape and position of the gate. The infrared thermal imager can measure the temperature distribution of the gate and its surrounding environment, identify potential overheating areas, indicating possible electrical faults or mechanical wear, and helping to take preventive measures in advance to prevent accidents. The lidar can measure the distance and azimuth between the drone and the gate by emitting laser beams and receiving the reflected signals. By scanning the gate and its surroundings with laser beams, high - precision three - dimensional structure information is generated, which helps to evaluate the deformation of the gate and monitor its structural health status.
[0098] In this embodiment, the drone also uses a high - precision positioning system for positioning. For example, it combines satellite navigation systems such as GPS and Beidou to ensure the precise positioning of the drone in complex environments. Specifically, by combining advanced satellite navigation systems such as GPS and Beidou, the high - precision positioning system ensures the precise positioning of the drone under complex terrain and weather conditions. This not only improves the accuracy of data collection but also ensures that the drone can execute the predetermined tasks safely and accurately, avoiding accidents caused by positioning errors.
[0099] S22. Transmit the acquired data to the control center platform that is communicatively connected to the drone in real - time and securely.
[0100] S23. The control center platform analyzes and processes the received data: Use data - analysis algorithms to process and analyze the collected data, extract comprehensive, accurate, and valuable information, identify abnormal states of the gate, predict potential faults, and provide support for decision - making.
[0101] In this embodiment, the analysis and processing process is as follows:
[0102] S231. Perform image preprocessing on the received data. Further, perform enhancement processing and filtering and denoising processing on the collected original image. Use methods such as histogram equalization and contrast adjustment to enhance the collected image, improving the image quality and clarity. Use Gaussian filtering to filter the image, smooth the image, and reduce the influence of noise on the edge detection result.
[0103] Specifically, in this embodiment, the following steps are included:
[0104] S2311. Perform image enhancement processing: Use methods such as histogram equalization and contrast adjustment to enhance the collected image, improving the image quality and clarity. Specifically, the following steps are included:
[0105] Import the image of the gate taken by the high-definition camera carried by the drone into Photoshop. Open the image and select the histogram equalization function. Photoshop will automatically calculate the histogram of the image and redistribute the gray values according to the distribution of the histogram. After adjustment, the gray distribution of the image will be more uniform, and the details will be more obvious.
[0106] According to the specific situation of the image, select the contrast adjustment function in Photoshop, and manually adjust the contrast parameter according to the actual situation of the image to highlight the key features of the gate.
[0107] S2312. Perform filtering and denoising processing; specifically, use Gaussian filtering to filter the enhanced image, smooth the image, and reduce the influence of noise on the edge detection result. Gaussian filtering performs weighted averaging according to the gray values of the pixel point to be filtered and its neighboring points according to certain parameter rules. This can effectively filter out the superimposed high-frequency noise in the image. The calculation process is as follows:
[0108]
[0109] where (x, y) is the coordinate of the pixel point, and σ is the standard deviation, which determines the width of the Gaussian function (i.e., the smoothness of the filter). Specifically, the following steps are included:
[0110] Select the Filter menu in Photoshop, select "Gaussian Blur", and adjust the size of the Gaussian kernel by adjusting the "Radius" slider, so that the gate image will become smoother, and the noise and interference will be reduced.
[0111] Step 232: Extract features from the preprocessed data; specifically, extract useful features from the preprocessed data, use the Canny edge detection algorithm to extract the edge information in the gate image, and extract the contour and details of the gate. Use the Shi-Tomasi corner detection algorithm and local binary pattern (LBP) to extract information such as the corners and texture features of the gate. These features can be used for subsequent classification, recognition, and anomaly detection.
[0112] Specifically, in this embodiment, the following steps are included:
[0113] S2321: Perform edge detection; specifically, use the edge detection algorithm (Canny algorithm) to extract the edge information in the gate image and extract the contour and details of the gate.
[0114] Step A: Perform grayscale processing. Convert the color gate image into a grayscale image. The grayscale image can retain the structural and shape features of the gate in the image, thereby simplifying the calculation amount and improving the efficiency. Specifically, use image processing software such as OpenCV and PIL to convert the color gate image into a grayscale image; according to the characteristics that the human eye is most sensitive to green, followed by red, and least sensitive to blue, the pixel values on the red, green, and blue channels are weighted and averaged, and its calculation formula is:
[0115] I gray = 0.299×I R + 0.587×I G + 0.114×I B
[0116] where, I gray represents the pixel value after grayscale processing, I R represents the pixel value on the red channel, I G represents the pixel value on the green channel, I B represents the pixel value on the blue channel.
[0117] Step B: Calculate the gradient magnitude and direction. Use the Sobel operator to calculate the gradient values of the gate grayscale image in the horizontal and vertical directions, and then obtain the gradient intensity and direction.
[0118] The gradient intensity reflects the sharpness of the edges in the image: in the gate image, the areas with larger gradient intensity usually correspond to the edges of the gate. By setting an appropriate threshold, the pixel points with gradient intensity greater than the threshold can be marked as edge points, thereby extracting the contour of the gate. By measuring the length and width of the contour, the size information of the gate can be obtained.
[0119] The gradient direction provides the orientation information of the edge: In the image processing of the gate, the gradient direction can be used to judge parameters such as the opening direction and tilt angle of the gate. By calculating the change of the gradient direction, the tilt angle of the gate can be obtained, so as to judge whether the gate is in a normal state. At the same time, the dynamic information of the gate, such as the opening speed and tilt rate, can also be further extracted.
[0120] Specifically, the Sobel operator is used to calculate the gradient values of the gate grayscale image in the horizontal and vertical directions. The calculation formula is as follows:
[0121]
[0122] In the above formula, G x represents the gradient value in the horizontal direction, and G y represents the gradient value in the vertical direction. Combining the gradient values in the horizontal and vertical directions, the gradient amplitude of each pixel is calculated. The calculation process is as follows:
[0123]
[0124] In the above formula, M(x, y) represents the gradient amplitude, and θ(x, y) represents the gradient direction.
[0125] Step C: Perform thresholding processing: Set an amplitude threshold, and mark and connect the pixels whose gradient amplitude is greater than the threshold as edges.
[0126] S2322. Extract feature points: Extract key feature points in the image, such as corner points and texture features. These feature points can be used for subsequent matching and recognition tasks.
[0127] Specifically, in this embodiment, the following steps are included:
[0128] Step a: Use the Shi-Tomasi corner detection algorithm to detect corner points. These corner points usually correspond to key parts such as the corners, hinge positions or support structures of the gate. By extracting these corner points, a geometric model of the gate is constructed, and then its structural features, such as size, shape and angle, are analyzed. The calculation process is as follows:
[0129] R = min(λ1, λ2)
[0130] In the above formula, λ1 and λ2 are the two eigenvalues of the autocorrelation matrix at a certain point in the image. Among them, the criterion for judging corner points is based on the comparison of the corner response value R with the set threshold: If the response value R is greater than the set threshold, then this point is considered a corner point. The calculation process is as follows:
[0131] R′ = quaklityLevel × λ max
[0132] In the above formula, R′ is the set threshold value, and λ max is the maximum value among all the smaller eigenvalues, and the quaklityLevel is the quality level parameter.
[0133] Step b. Texture feature extraction: Use the local binary pattern (LBP) to identify and extract the texture features of the gate, which are used to identify the material, surface treatment, and pollution degree of the gate, etc.
[0134] Specifically, select a 3×3 window, and use the gray value of the central pixel in the window as the threshold I c , and compare the gray value I p (p = 0, 1, … 7) of each neighboring pixel with the gray value I c of the central pixel. If I p ≥I c , the corresponding position is marked as 1; if I p <I c , the corresponding position is marked as 0. For each central pixel, an 8-bit binary number, that is, the LBP code, can be obtained. Convert this 8-bit binary number into a decimal number to get the LBP value of the central pixel. Count the LBP values of the entire image and generate an LBP histogram as the texture feature.
[0135] LBP(xc, yc) = ∑ - (p = 0)p
[0136] In the above formula, (xc, yc) represents the coordinates of the central pixel, I p represents the gray value of the p-th neighboring pixel, I c represents the gray value of the central pixel, and S(x) is the sign function, which is defined as:
[0137] S233. Perform image recognition and matching processing on the extracted data.
[0138] In this embodiment, it specifically includes the following steps:
[0139] S2331. Perform template matching. Specifically, use normalized cross-correlation (NCC) to match the extracted features with predefined templates to determine the identity and status of the gate. The similarity is measured by calculating the normalized cross-correlation coefficient of the pixel intensity values of the corresponding windows in two images. The NCC algorithm can capture the subtle differences in the size and shape of the gate images. The NCC value ranges from -1 to 1, where 1 indicates that the two images are exactly the same, -1 indicates that the two images are completely different, and 0 indicates that there is no correlation between the two images. As a preliminary image recognition method, the output result of template matching (such as the NCC value) can be regarded as a preliminary feature extraction result, quickly screening out candidate images similar to the template image and reducing the computational complexity of subsequent SVM processing.
[0140]
[0141] In the above formula, A(x, y) and B(x, y) respectively represent the pixel values of the two images at the corresponding coordinates (x, y). and respectively represent the means of all pixel values within the two image windows, and ∑ (x,y) represents the summation over all coordinates (x, y).
[0142] S2332. Use the support vector machine (SVM) machine learning algorithm to convert the parameters and data of the gate image into feature vectors. These feature vectors can be the pixel values of the image, color histograms, texture features, edge features, etc., or advanced features extracted by a deep learning network. By training a large amount of sample data, SVM learns the feature patterns in the gate image and can construct an optimal hyperplane in the high-dimensional feature space. When the feature vector of the image to be recognized is projected into the high-dimensional feature space, SVM can determine its category according to its position, thus realizing the classification and recognition of the gate.
[0143]
[0144] In the above formula, x is the input feature vector, f(x) is the output of SVM, used to judge the category of the input sample. N is the number of support vectors, α i is the coefficient of the support vector, y i is the category label of the support vector, K(x i , x) is the kernel function, used to calculate the similarity between the support vector x i and the input sample, and b is the bias term.
[0145] S2333. For complex image recognition tasks or when the gate features are not obvious, deep learning algorithms such as convolutional neural networks (CNNs) can be used for processing. Through a series of structures such as convolutional layers, pooling layers, and fully connected layers, CNNs can automatically extract hierarchical feature representations from the original images, thereby realizing automatic image recognition and high-precision classification.
[0146] Specifically, convolutional layer: Local features such as edges, textures, and shapes in the image are extracted through convolutional operations. The convolutional operation is achieved by sliding one or more convolutional kernels (filters) over the input image and calculating the dot product of the convolutional kernel and the local area of the image. Each convolutional kernel generates an output feature map, which represents the intensity and position of the features in the input image that match the convolutional kernel.
[0147]
[0148] Among them, Y(x, y, c) is the value of the output feature at position (x, y) and channel c. X(x, y, c′) is the value of the input feature map at position (x, y) and channel c′. W(i, j, c′, c) is the weight of the convolutional kernel from input channel c′ to output channel c at position (i, j). b(c) is the bias term for output channel c. k h and k w are the height and width of the convolutional kernel respectively.
[0149] Specifically, activation function ReLU: The convolutional operation is linear, and the activation function is used to increase the non-linear expression ability of the network. The activation function ReLU sets all negative values to 0 while retaining all positive values.
[0150] f(x) = max(0, x)
[0151] Specifically, pooling layer: It is used to reduce the dimension of the feature map. By selecting the maximum value in each pooling window as the output through max pooling, it helps to retain the most important features while removing redundant information, reducing the size of the feature map and the computational complexity.
[0152]
[0153] Among them, X(i, j, c) is the value of the input feature map at position (i, j) and channel c. R x and R y are the ranges of the pooling window in the x and y directions respectively.
[0154] Specifically, fully connected layer: It is used to map the extracted features to the output classes. It is achieved by flattening the output feature map of the previous layer into a vector and multiplying it by a weight matrix.
[0155]
[0156] Among them, Y(i) is the value of output neuron i. X(j) is the value of input neuron j (usually a vector obtained by flattening the output feature map of the previous layer). W(j, i) is the weight from input neuron j to output neuron i. b(i) is the bias term on output neuron i.
[0157] Specifically, the loss function: used to measure the difference between the model output and the true label, and improve its prediction accuracy.
[0158]
[0159] Among them, N is the number of samples, and y i is the true label of sample i (usually 0 or 1). is the predicted probability of sample i.
[0160] The SVM itself does not perform feature learning, but relies on manually designed feature extraction methods such as pixel values, color histograms, texture features, edge features, etc. For complex images or those with unclear features, such as some subtle features of the gate, like texture and shape changes, when they may not be effectively represented by simple color histograms or edge features, the manually designed features may not be able to fully capture them. When the image contains more noise and variations, such as lighting, perspective, occlusion, etc., the feature extraction is insufficient or inaccurate, and the classification effect of the SVM will be greatly affected.
[0161] Deep learning algorithms can perform more accurate feature extraction through learning with a large number of samples, as well as consuming a large amount of computing resources and computing time, so as to achieve feature extraction for complex images. Similarly, deep learning algorithm models have a high complexity, and for simple picture feature extraction, they also require a long computing time and a large amount of computing resources. By combining deep learning and SVM, using SVM to handle the feature extraction of simple images and using deep learning to handle the feature extraction of complex images, the computing resources can be reasonably allocated to improve the feature extraction efficiency.
[0162] S24. Perform anomaly detection on the processed data; specifically, use template matching to match the features such as the shape, size, and texture of the extracted gate with a predefined template to determine the identity and status of the gate. Use machine learning and deep learning models to classify and identify the extracted feature vectors. According to the output results of the model, judge whether the status of the gate is normal or there are anomalies.
[0163] The specific process is as follows: The isolation forest algorithm is used to detect outliers or abnormal patterns in the data. In the monitoring of the gate state, the anomaly detection algorithm can timely detect the abnormal situation of the gate and trigger the warning mechanism. Specifically, it includes the following steps:
[0164] S241. Construct an isolation tree: Randomly select a feature and a value as the splitting point, divide the data point feature vector into left and right subsets according to the splitting point, and recursively divide the left and right subsets until the stopping condition is met (such as the subset is empty or the maximum depth is reached).
[0165] S242. Calculate the path length: For each feature vector (i.e., the data point of the gate image), start from the root node, traverse down in the isolation tree according to its feature value until reaching the leaf node, and record the path length (i.e., the number of nodes passed) of the feature vector data point in the isolation tree.
[0166] S243. Judge outliers: Points with shorter path lengths are considered abnormal because they are easier to be isolated. Usually, the path lengths of all data points are calculated, and a path threshold is used to judge which point feature vectors (i.e., the gate images) are abnormal.
[0167] In this embodiment, the data is further post-processed and the results are output. The specific process is as follows:
[0168] Result verification: Verify the recognition results to ensure the accuracy and reliability of the results. Multiple verification methods can be adopted, such as cross-validation, multi-model fusion, etc.
[0169] Result output: Output the recognition results in the form of images, texts or data for subsequent analysis and processing.
[0170] The specific steps in the achievement sorting stage are as follows:
[0171] Visually present the output results. Further, present the analysis results in the form of texts, images or videos, etc. Provide a visual interface for displaying the inspection results, abnormal states and warning information of the gate.
[0172] Specifically, in this embodiment, the specific sorting process includes the following steps:
[0173] S31. Generate an inspection report: Use software such as Lizheng Surveying and Mapping Software, which has functions such as data import, processing, analysis, and report generation, to automatically identify and parse the imported gate data, preset the template and style of the report, and generate an inspection report.
[0174] S32. Generate a preliminary design report: Based on the generated exploration report, by using the automatic generation technology of information-based preliminary design reports, the integrated measurement and control design of the gate can be carried out according to the data and information of the gate in the exploration report, and the corresponding information-based preliminary design report can be automatically generated. This technology usually combines automated design software, database management systems, and artificial intelligence technology, enabling rapid analysis and processing of exploration data and automatically generating design reports according to the analysis results. The design report usually includes design ideas, design schemes, equipment selection, engineering quantity calculation, etc., providing strong support for subsequent project implementation.
[0175] In summary, this method greatly improves the modernization level of irrigation district gate management, providing strong guarantee for the safe operation and efficient management of water conservancy facilities.
[0176] Finally, it should be noted that the above content is only used to illustrate the technical solution of the present invention, rather than a limitation on the protection scope of the present invention. Any simple modification or equivalent replacement of the technical solution of the present invention by those of ordinary skill in the art shall not depart from the essence and scope of the technical solution of the present invention.
Claims
1. An exploration method for the integrated design of gate measurement and control in irrigation areas, characterized in that: It includes the following steps: Collect the survey data of the irrigation area, divide the key areas, and obtain data for the key areas through drones. Use histogram equalization and contrast adjustment methods to enhance the collected images, improve the image quality and clarity, and use Gaussian filtering to filter the images to smooth the images. Extract image features, including edge information, corners, and textures. Perform image recognition and matching processing through the features to determine the identity and status of the gate, and further judge whether the gate status is normal. Visualize and output the judgment result.
2. The survey method for the integrated design of gate measurement and control in irrigation areas according to claim 1, characterized in that: Using histogram equalization and contrast adjustment methods to enhance the collected images, improve the image quality and clarity, and using Gaussian filtering to filter the images to smooth the images includes the following steps: Calculate the histogram of the image, reassign the gray values according to the histogram distribution, adjust the image contrast, and highlight the key features of the gate. Perform weighted averaging on the gray values of the pixel points to be filtered and their neighborhood points through Gaussian blur, and the calculation formula is: In the formula, (x, y) is the coordinate of the pixel point, and σ is the standard deviation, which determines the width of the Gaussian function.
3. The exploration method for the integrated design of gate measurement and control in irrigation areas according to claim 1, characterized in that: Extracting image features includes the following steps: Extract the contour and details of the gate through the edge algorithm. Use the Shi-Tomasi corner detection algorithm to detect corners. Use the local binary pattern to identify and extract the texture features of the gate.
4. The survey method for the integrated design of gate measurement and control in irrigation areas according to claim 3, characterized in that: Extracting the contour and details of the gate through the edge algorithm includes the following steps: Convert the color image to a grayscale image, and perform weighted averaging on the pixel values of the red, green, and blue channels. The calculation formula is: I gray = 0.299 × I R + 0.587 × I G + 0.114 × I B Where, I gray represents the pixel value after grayscale conversion, I R represents the pixel value on the red channel, I G represents the pixel value on the green channel, I B represents the pixel value on the blue channel; Use the Sobel operator to calculate the gradient values of the gate grayscale image in the horizontal and vertical directions, and then obtain the gradient magnitude and direction. The calculation formulas for the gradient values in the horizontal and vertical directions are: In the above formula, G x represents the gradient value in the horizontal direction, and G y represents the gradient value in the vertical direction; the calculation process of the gradient magnitude of each pixel is as follows: In the above formula, M(x, y) represents the gradient magnitude, and θ(x, y) represents the gradient direction. Compare the gradient magnitude with the magnitude threshold, and mark and connect the pixels whose gradient magnitude is greater than the magnitude threshold as edges.
5. The exploration method for the integrated measurement and control design of irrigation district gates according to claim 3, characterized in that: Using the Shi-Tomasi corner detection algorithm to detect corners includes the following steps: Calculate the response value of the point, and the calculation formula is: R = min(λ1, λ2) In the above formula, R is the response value, and λ1 and λ2 are the two eigenvalues of the autocorrelation matrix at a certain point in the image. Compare the response value R with the set threshold R′. If R > R′, then this point is a corner.
6. The exploration method for integrated measurement and control design of irrigation district gates according to claim 3, characterized in that: Using the local binary pattern to identify and extract the texture features of the gate includes the following steps: Select a 3×3 window and use the gray value of the central pixel of the window as the threshold I c , The gray value I of each neighborhood pixel p is compared with the gray value I of the central pixel c . If I p ≥I c , the corresponding position is marked as 1; if I p <I c , the corresponding position is marked as 0; For each central pixel, an 8-bit binary number, that is, the LBP code, can be obtained. Convert this 8-bit binary number to a decimal number to obtain the LBP value of the central pixel. The calculation formula for the LBP value is: LBP(xc,yc) = ∑ - (p = 0)p In the above formula, (xc, yc) represents the coordinates of the central pixel. Statistical the LBP values of the entire image and generate the LBP histogram as the texture feature.
7. The exploration method for the integrated design of gate measurement and control in irrigation areas according to claim 1, wherein: Performing image recognition and matching processing through the features includes the following steps: The similarity is measured by calculating the normalized cross - correlation coefficient of the pixel intensity values of the corresponding windows in the image and the template using the NCC algorithm. The NCC value ranges from - 1 to 1, where 1 indicates that the two images are exactly the same, - 1 indicates that the two images are completely different, and 0 indicates that there is no correlation between the two images. Images similar to the template are selected. The calculation formula for the NCC value is: In the above formula, A(x, y) and B(x, y) respectively represent the pixel values of two images at the corresponding coordinates (x, y). and respectively represent the means of all pixel values within two image windows, and ∑ (x,y) represents the summation over all coordinates (x, y).
8. The exploration method for the integrated measurement and control design of irrigation district gates according to claim 7, characterized in that: Determine the identity and status of the gate. Further judging whether the gate status is normal includes the following steps: Use the support vector machine machine learning algorithm to convert the parameters and data of the gate image into feature vectors, and judge its category according to the position of the feature vector. The calculation formula is: In the above formula, x is the input feature vector, f(x) is the output of the SVM, which is used to determine the class of the input sample, N is the number of support vectors, α i is the coefficient of the support vector, y i is the class label of the support vector, K(x i , x) is the kernel function, which is used to calculate the similarity between the support vector x i and the input sample, and b is the bias term.
9. The exploration method for the integrated measurement and control design of irrigation district gates according to claim 8, characterized in that: For complex image recognition tasks or when the gate features are not obvious, deep learning algorithms can be used for feature extraction, including the following steps: Extract local features such as edges, textures, and shapes in the image through convolution operations; The activation function is used to increase the non - linear expression ability of the network. The ReLU activation function sets all negative values to 0 while retaining all positive values; Max - pooling selects the maximum value in each pooling window as the output, removes redundant information, and reduces the size of the feature map; Map the extracted features to the output categories; Measure the difference between the model output and the true label through the loss function to improve its prediction accuracy.
10. The exploration method for the integrated design of irrigation district gate measurement and control according to claim 1, characterized in that: After further judging whether the gate status is normal, perform anomaly detection on the processed data using the isolation forest algorithm, including the following steps: Randomly select a feature and a value as the splitting point, and divide the data point feature vectors into two subsets, left and right, according to the splitting point. Recursively divide the left and right subsets until the stopping condition is met; For each data point of the gate image, start from the root node and traverse down in the isolation tree according to its feature value until reaching the leaf node, and record the path length of the feature vector data point in the isolation tree; According to the preset path threshold, if the path length is less than the path threshold, the data point is considered abnormal.
Citation Information
Cited By
Unmanned aerial vehicle gate maintenance scheduling method and system based on multi-sensor physical correction
CN120563515A