An automatic detection method for instability of earthen ridge terraces based on machine vision
By using a machine vision-based automatic detection method for the instability of earthen terraces, image data of earthen terraces are analyzed and soil and terrain parameters are evaluated. This solves the problem of predicting future change trends in existing technologies, enabling accurate assessment and timely early warning of the stability of earthen terraces and improving management efficiency.
Patent Information
- Application Number
- CN202411288891.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-14
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2044-09-14
AI Technical Summary
Existing technologies struggle to accurately predict future trends or potential risks when analyzing geological safety data, leading to blind and inefficient resource allocation.
An automatic detection method for instability of earthen terraces based on machine vision is adopted. Image data of earthen terraces are acquired through image acquisition equipment, image quality index is analyzed, soil parameters and terrain parameters are obtained, soil quality coefficient and terrain stability index are evaluated, and the stability of earthen terraces is comprehensively determined.
This improves the intelligence level of data collection, accurately assesses the stability of the earthen terraces, provides timely early warning information, guides targeted management and maintenance measures, and ensures the long-term stability and sustainable development of the earthen terraces.
Smart Images

Figure CN118799742B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of terrace data early warning, and in particular to an automatic detection method for instability of earthen ridge terraces based on machine vision. Background Art
[0002] With the continuous development of machine vision technology, its application in agricultural automation monitoring is becoming more and more extensive, providing new ideas and methods for terrace data early warning. The existing early warning systems are often based on simple analysis of current or historical data, which makes it difficult to fully capture future dynamic changes and their potential impacts, thus limiting the accuracy and foresight of data early warning.
[0003] For example, the invention patent with announcement number CN114495430B announces a method and system for early warning of the safety status of earth-rock dams. The method includes the following steps: according to the occurrence principle and process of earth-rock dam disasters and the inherent characteristics of the earth-rock dam, determine the parameters that need to be monitored by the early warning monitoring module, and the early warning monitoring module can obtain the dam body's inherent characteristics, environmental quantity indicators, dynamic characteristics and kinematic indicators of the earth-rock dam; determine the weight value of each monitoring indicator of each monitoring point, determine the early warning level of each monitoring indicator according to the monitoring value and weight value of each monitoring indicator, and calculate the comprehensive early warning level according to the early warning level of each monitoring indicator; determine the early warning level according to the comprehensive early warning level, generate output and display early warning information; take corresponding response measures according to different early warning levels.
[0004] For example, the invention patent with announcement number CN114399889B announces a geological disaster early warning system for rock and soil slopes, including: a slope spatial displacement analysis module, which is used to analyze the spatial stability of the rock and soil slope by collecting the surface displacement and deep displacement of the rock and soil slope; a slope acoustic wave stability analysis module, which is used to analyze the internal structural stability of the rock and soil slope by collecting the wave velocity response value of the rock and soil slope; a slope seepage stability analysis module, which is used to analyze the water content stability of the rock and soil slope under different surface water levels or different groundwater levels by collecting the groundwater movement of the rock and soil slope; a slope vibration stability analysis module, which is used to analyze the seismic stability of the rock and soil slope by collecting the horizontal and vertical seismic waves of the rock and soil slope; a geological disaster early warning module, which is used to predict the probability of geological disasters occurring in the rock and soil slope by collecting real-time environmental data of the rock and soil slope, and generate an early warning signal.
[0005] However, in the process of implementing the embodiments of the present application, it was found that the above-mentioned technology has at least the following technical problems: when performing data analysis on the geological safety status, characteristic parameters are often directly analyzed and extracted based on the real-time or historical geological data obtained, which makes it difficult to accurately predict future geological changes or potential risks, which may lead to blindness and inefficiency in resource investment. Summary of the invention
[0006] In view of the deficiencies in the prior art, the present invention provides a method for automatically detecting instability of earthen ridge terraces based on machine vision, which can effectively solve the problems involved in the above-mentioned background technology.
[0007] To achieve the above objectives, the present invention is implemented through the following technical solutions: an automatic detection method for instability of ridge terraces based on machine vision, comprising: step one, collecting ridge terrace image data based on machine vision, analyzing the image quality index of the ridge terrace image, and comparing it with the image quality threshold. If the image quality index of the ridge terrace image is greater than the image quality threshold, step two is executed. If the image quality index of the ridge terrace image is less than or equal to the image quality threshold, the collection of the ridge terrace image data is automatically fed back; step two, according to the ridge terrace image data, the soil parameters of the ridge terrace are obtained and the quality is tested, thereby evaluating the soil quality coefficient of the ridge terrace. At the same time, according to the ridge terrace image data, the terrain parameters of the ridge terrace are collected and stability is tested, thereby evaluating the terrain stability index of the ridge terrace; step three, the environmental parameters of the ridge terrace are collected, and based on the soil quality coefficient of the ridge terrace and the terrain stability index of the ridge terrace, the comprehensive stability factor of the ridge terrace is determined, thereby providing feedback on the stability detection of the ridge terrace.
[0008] As a further method, the collection of ridge and terrace image data based on machine vision specifically refers to collecting image data of ridge and terrace by image acquisition equipment, and performing data processing to obtain the ridge and terrace image data.
[0009] As a further method, the collection of ridge and terrace image data is automatically fed back, and the specific feedback process is: obtaining image acquisition parameters of the image acquisition device, transmitting the image acquisition parameters of the image acquisition device to an image acquisition parameter set stored in a terrace characteristic database, and packaging the image acquisition parameter set into an image acquisition parameter log, thereby automatically feeding back the collection of ridge and terrace image data.
[0010] As a further method, the environmental parameters of the ridge terraces are collected, specifically referring to the environmental parameters of the ridge terraces during the environmental monitoring period, thereby determining the comprehensive stability factor of the ridge terraces through the environmental parameters of the ridge terraces during the environmental monitoring period.
[0011] As a further method, the stability detection of the earthen ridge terrace is fed back, and the specific feedback process is: comparing the comprehensive stability factor of the earthen ridge terrace with the comprehensive stability threshold. If the comprehensive stability factor of the earthen ridge terrace is less than or equal to the comprehensive stability threshold, feedback is given to the stability detection of the earthen ridge terrace.
[0012] Compared with the prior art, the embodiments of the present invention have at least the following advantages or beneficial effects:
[0013] (1) The present invention provides an automatic detection method for instability of earthen ridge terraces based on machine vision. The method collects earthen ridge terrace image data based on machine vision, analyzes the image quality index of the earthen ridge terrace image, and automatically provides feedback on the collection of earthen ridge terrace image data, such as adjusting camera parameters, etc., to ensure that the quality of image data collected subsequently is higher, thereby improving the intelligent level of data collection. According to the earthen ridge terrace image data, the soil parameters of the earthen ridge terrace are obtained and quality inspection is performed, thereby evaluating the soil quality coefficient of the earthen ridge terrace, intuitively reflecting the health status and fertility level of the soil in the earthen ridge terrace. It provides an important reference for soil management and improvement of ridge terraces. At the same time, based on the ridge terrace image data, the terrain parameters of the ridge terraces are collected and stability tests are carried out. The terrain stability index of the ridge terraces is evaluated, which can reflect the stability and anti-erosion ability of the ridge terrace terrain. Finally, the environmental parameters of the ridge terraces are collected and the comprehensive stability factor of the ridge terraces is determined. Feedback on the stability test of the ridge terraces is provided, which can provide timely early warning information on the stability of the ridge terraces, guide the adoption of targeted management and maintenance measures, and ensure the long-term stability and sustainable development of the ridge terraces.
[0014] (2) The present invention obtains the image quality index of the ridge and terrace image by comprehensively analyzing the noise variance of the ridge and terrace image, the information entropy of the ridge and terrace image, and the reference information entropy of the ridge and terrace image. The mathematical method is used to quantify the quality of the ridge and terrace image, thereby reducing the deviation of subjective judgment and improving the objectivity of the quality assessment of the ridge and terrace image. At the same time, the quality of the ridge and terrace image is comprehensively considered from multiple dimensions, which can more comprehensively reflect the characteristics of the ridge and terrace image such as clarity and information content.
[0015] (3) The present invention evaluates the soil quality coefficient of the ridge terrace and the terrain stability index of the ridge terrace, analyzes the relationship between the soil and the terrain of the ridge terrace, and can more accurately reflect the stability performance status of the ridge terrace, thereby more accurately predicting the risk of the ridge terrace losing stability. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The present invention is further described using the accompanying drawings, but the embodiments in the accompanying drawings do not constitute any limitation to the present invention. A person skilled in the art can obtain other drawings based on the following drawings without creative work.
[0017] Figure 1 It is a schematic diagram of the method flow of the present invention.
[0018] Figure 2 This is a schematic diagram of the environmental monitoring cycle time period involved in the present invention.
[0019] Figure numerals: 1. Time point of earthen ridge and terrace image acquisition; 2. Environmental monitoring cycle time period. DETAILED DESCRIPTION
[0020] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0021] Reference Figure 1 As shown, the present invention provides an automatic detection method for instability of ridges and terraces based on machine vision, including: step one, collecting ridge and terrace image data based on machine vision, analyzing the image quality index of the ridge and terrace image, and comparing it with the image quality threshold; if the image quality index of the ridge and terrace image is greater than the image quality threshold, executing step two; if the image quality index of the ridge and terrace image is less than or equal to the image quality threshold, automatically feeding back the collection of the ridge and terrace image data.
[0022] It needs to be explained that the above-mentioned ridge terrace image data includes the resolution of the ridge terrace image and the color value of each pixel point of the ridge terrace image, the soil parameters of the ridge terrace and the terrain parameters of the ridge terrace, wherein the data in the soil parameters of the ridge terrace include the area of the vegetation area to which the ridge terrace belongs, the total area of the ridge terrace area and the color values of each color detection point in the soil area to which the ridge terrace belongs, and the data in the terrain parameters of the ridge terrace include the outline of the drainage ditch area to which the ridge terrace belongs and the total number of layers of the ridge terrace. In addition to being applicable to the above-mentioned parameters, this example can also be used for other parameters, and the directions in which these parameters can be fed back (i.e., positive and negative relationships) are consistent.
[0023] In a specific embodiment, the present invention obtains the image quality index of the ridge terrace image by comprehensively analyzing the noise variance of the ridge terrace image, the information entropy of the ridge terrace image and the reference information entropy of the ridge terrace image, quantifies the quality of the ridge terrace image by mathematical methods, reduces the deviation of subjective judgment, and improves the objectivity of the ridge terrace image quality assessment. At the same time, the ridge terrace image quality is comprehensively considered from multiple dimensions, which can more comprehensively reflect the characteristics of the ridge terrace image such as clarity and information content.
[0024] Specifically, the collection of ridge terrace image data based on machine vision specifically refers to the collection of image data of ridge terraces by image collection equipment, and data processing to obtain ridge terrace image data. In an example embodiment, the terrace image data monitor conducts a preliminary analysis of a certain ridge terrace through a geographic information system, plans the data collection process of the ridge terrace (such as collection height and collection position), uses image collection equipment (such as a drone equipped with a high-definition camera) to collect image data of a certain ridge terrace, and uses image processing software (such as a GNU image processing program) to process the collected ridge terrace images. The specific data processing process is: crop the ridge terrace image to retain only the ridge terrace area, thereby obtaining the ridge terrace image data.
[0025] Specifically, the automatic feedback on the collection of ridge and terrace image data is as follows: acquiring image acquisition parameters of an image acquisition device, transmitting the image acquisition parameters of the image acquisition device to an image acquisition parameter set stored in a terrace characteristic database, and packaging the image acquisition parameter set into an image acquisition parameter log, thereby automatically feeding back the collection of ridge and terrace image data; the above-mentioned acquisition of the image acquisition parameters of the image acquisition device refers to obtaining the image acquisition parameters of the image acquisition device when collecting ridge and terrace image data by reading a configuration file of the image acquisition device. In an example embodiment, the image acquisition parameters specifically include a resolution of 3840x2160, an exposure time of 1 / 100 second, a white balance mode of daylight mode, a sensitivity of 500, and a focus distance of 20 meters; the above-mentioned image quality threshold represents an image quality index. The minimum value of a reasonable range of numbers is extracted from the terrace characteristic database and is comprehensively formulated by the terrace image data monitor considering the characteristics of the terrace, the source of the image data and the monitoring purpose. The above-mentioned image acquisition parameter set refers to a set of image acquisition parameters for storing image acquisition devices. If the image quality index of the currently analyzed earth ridge terrace image is less than or equal to the image quality threshold, it indicates that the image acquisition effect of the current image acquisition device on the earth ridge terrace does not meet the expected standard, and it is necessary to automatically feedback the acquisition of the earth ridge terrace image data, that is, generate an image acquisition parameter log and display it visually. The terrace image data monitor adjusts the image acquisition parameters of the image acquisition device based on the image acquisition parameter log, and re-acquires and analyzes the earth ridge terrace image data to ensure that the data analysis of the earth ridge terrace is based on high-quality image data.
[0026] Furthermore, the image quality index of the ridge and terrace image is analyzed, and the specific analysis process is as follows:
[0027] The resolution of the ridge terrace image and the color value of each pixel of the ridge terrace image are extracted from the ridge terrace image data, and comprehensive data processing is performed to obtain the noise variance of the ridge terrace image; the resolution of the ridge terrace image can be obtained by reading the resolution in the file properties of the ridge terrace image through a photo viewer; the color value of each pixel of the ridge terrace image refers to the hexadecimal color code of each pixel obtained by color analysis software (such as a screen color picker). For example, if the hexadecimal color code of a pixel is #000001, its numerical part is converted into decimal, that is, 1, and the color value of the point is 1; in an exemplary embodiment, the noise variance of the ridge terrace image, the specific data processing process is: ,in For the ridge terrace image in ( ) color value of the pixel at the position, is the average processing result of the color value of each pixel, L is the number of height pixels in the resolution of the ridge terrace image, , t is the number of pixels in the height direction, W is the number of horizontal pixels in the resolution of the ridge terrace image, , m is the number of pixels in the horizontal direction.
[0028] The ridge terrace image is subjected to image grayscale processing to obtain the ridge terrace grayscale image, the total number of pixels of the ridge terrace grayscale image and the number of occurrences of each grayscale level are extracted and counted from the ridge terrace grayscale image, and comprehensive data processing is performed to obtain the information entropy of the ridge terrace image; the ridge terrace grayscale image is obtained by subjecting the ridge terrace image to image grayscale processing, which can be obtained by processing through the grayscale processing function in the image processing toolbox of the matrix laboratory software; the total number of pixels of the ridge terrace grayscale image refers to first obtaining the resolution of the ridge terrace grayscale image, which is consistent with the resolution acquisition method of the ridge terrace image, and then multiplying the number of height pixels and the number of horizontal pixels in the resolution of the ridge terrace grayscale image to obtain the total number of pixels of the ridge terrace grayscale image; the number of occurrences of each grayscale level can be obtained through the following code:
[0029] grayImage=imread('terrace.jpg'); %Read grayscale image terrace.jpg
[0030] If ~isa(grayImage, 'uint8')
[0031] grayImage = im2uint8(grayImage); %Convert to uint8 type
[0032] [rows, cols] = size(grayImage); % Get the size of the image
[0033] totalPixels=rows*cols; %Calculate the total number of pixels
[0034] grayLevels=0:255; % Initialize an array grayLevels with a length of 256 to record the number of occurrences of each gray level
[0035] histogram = zeros(1, 256); % Initialize the histogram array histogram
[0036] for i=1:rows% traverses every pixel of the image
[0037] for j=1:cols
[0038] grayValue=grayImage(i,j); %Get the gray value of the current pixel
[0039] histogram(grayValue+1)=histogram(grayValue+1)+1; % Update the histogram. The code index in the matrix laboratory starts from 1, but the grayscale starts from 0, so grayValue+1 is used as the index here.
[0040] disp('Number of occurrences of each gray level:'); %Print out the number of occurrences of each gray level
[0041] disp(histogram);
[0042] Then, the number of occurrences of each gray level is divided by the total number of pixels in the gray image of the ridge and terrace to obtain the occurrence probability of each gray level. The information entropy of the ridge and terrace image is calculated using the following formula. The specific expression is: , p(s) is the probability of occurrence of gray level s, s is the number of the gray level, , d is the total number of gray levels.
[0043] The image quality index of the ridge and terrace image is thus comprehensively analyzed. In this embodiment, the image quality index of the ridge and terrace image is obtained by comprehensively analyzing the noise variance of the ridge and terrace image, the information entropy of the ridge and terrace image, and the reference information entropy of the ridge and terrace image. It is a numerical value used to evaluate the image quality of the ridge and terrace image. The specific expression is:
[0044] ;
[0045] in, is the image quality index of the ridge and terrace image. When the noise variance of the ridge and terrace image is large, the noise in the image will interfere with the color, texture and other characteristics of the ridge and terrace itself, causing the ridge and terrace image information to become complex and difficult to accurately interpret. This complexity will be reflected in the information entropy. The calculation of information entropy depends on the probability distribution of pixel grayscale values in the ridge and terrace image. Under ideal conditions, the probability distribution of pixel grayscale values is relatively uniform or conforms to a certain specific law. However, when the noise variance in the ridge and terrace image is large, the noise will change the probability distribution of pixel grayscale values. The change in probability distribution will cause the calculation result of information entropy to change, thereby deviating greatly from the reference information entropy, which together lead to the low quality of the ridge and terrace image and cannot accurately reflect the actual state of the ridge and terrace. Therefore, a comprehensive analysis of the above parameters will help guide the image acquisition of the ridge and terrace, ensure the data accuracy of subsequent image processing, and provide strong support for decision-making and the establishment of image quality standards.
[0046] is the noise variance of the ridge and terrace image, which is an important indicator to measure the noise intensity in the ridge and terrace image. In the ridge and terrace image, the noise may come from many factors, such as illumination changes, atmospheric conditions, etc. The larger the noise variance, the more serious the ridge and terrace image is affected by noise, and the lower the quality of the ridge and terrace image.
[0047] is the information entropy of the ridge and terrace image, which reflects the complexity and information content of the pixel grayscale value distribution in the image. For the ridge and terrace image, the level of information entropy depends on the diversity of the color, texture, shape and other characteristics of the terrace and the degree of noise interference. If the features of the terrace in the image are rich and varied, and the noise interference is small, then the information entropy will be closer to the reference information entropy, indicating that the image contains more useful information. Otherwise, the terrace features will become blurred and difficult to identify, and the information entropy will be reduced.
[0048] is the reference information entropy of ridge and terrace images, which represents the reference value of the information entropy for analyzing ridge and terrace images. It represents the information entropy that a noise-free or low-noise, high-resolution and clearly visible terrace image should have. This value is obtained by experimental simulation and expert evaluation, and aims to provide a benchmark for measuring the quality of ridge and terrace images.
[0049] It should be explained that the appearance and characteristics of the ridge terraces will change with the changes in time factors such as seasons, weather, and crop growth stages. For example, the terraces in spring and autumn may present different colors and textures due to different crop types and growth states; and the lighting conditions and shadow distribution of the terrace images taken on rainy days and sunny days will also be different. Therefore, in order to ensure the accuracy and applicability of the reference information entropy, the reference information entropy of the ridge terrace images in this embodiment is extracted from the terrace characteristic database by an expert team in the field of image analysis, based on practical experience and professional knowledge, and formulated and determined for the characteristic changes of ridge terraces in different seasons, climates and crop growth cycles. The reference information entropy of the ridge terrace images in each time period is obtained by querying the reference information entropy corresponding to the time period to which the time point when the ridge terrace image was taken belongs.
[0050] e is a natural constant, It is the influence factor corresponding to the noise variance unit value preset in the terrace characteristic database, which represents the influence degree of the noise variance unit value on the image quality index. When used, the influence factor corresponding to the noise variance unit value can be directly obtained from the terrace characteristic database, and the corresponding relationship can be a preset mapping relationship. For example, the noise variance and the influence factor corresponding to the noise variance unit value preset in the terrace characteristic database form a mapping set, and the real-time noise variance is input into the mapping set to obtain the influence factor corresponding to the noise variance unit value. The mapping relationship can be one-to-one or many-to-one. In this example, its value range is [0, 1].
[0051] It is the correction factor corresponding to the information entropy preset in the terrace characteristic database, which represents the numerical value of the correction degree of the information entropy change. When used, the correction factor corresponding to the information entropy can be directly obtained from the terrace characteristic database, and the corresponding relationship can be a preset mapping relationship. For example, the information entropy and the correction factor corresponding to the information entropy preset in the terrace characteristic database form a mapping set, and the real-time information entropy is input into the mapping set to obtain the correction factor corresponding to the information entropy. The mapping relationship can be one-to-one or many-to-one. In this example, its value range is [0, 1].
[0052] It should be explained that the above-mentioned terrace characteristic database is a database used to store the data required for analyzing the ridge terrace images.
[0053] Step 2: Based on the ridge terrace image data, the soil parameters of the ridge terrace are obtained and quality detection is performed, thereby evaluating the soil quality coefficient of the ridge terrace. At the same time, based on the ridge terrace image data, the terrain parameters of the ridge terrace are collected and stability detection is performed, thereby evaluating the terrain stability index of the ridge terrace.
[0054] In a specific embodiment, the present invention analyzes the relationship between the soil and terrain of the ridge terrace by evaluating the soil quality coefficient of the ridge terrace and the terrain stability index of the ridge terrace, so as to more accurately reflect the stability performance state of the ridge terrace, thereby more accurately predicting the risk of the ridge terrace losing stability.
[0055] Specifically, the terrain stability index of the ridge terrace is evaluated, and the specific evaluation process is as follows:
[0056] The contour of the drainage ditch area belonging to the ridge terrace is located from the terrain parameters of the ridge terrace, the reference contour of the drainage ditch belonging to the ridge terrace is obtained, the contour of the drainage ditch area belonging to the ridge terrace is overlapped and compared with the reference contour of the drainage ditch, and the total deviation value of the contour of the drainage ditch area belonging to the ridge terrace is calculated; the contour of the drainage ditch area belonging to the ridge terrace refers to the grayscale image of the ridge terrace, which is firstly removed by Gaussian filtering, and the image processing experts use the Canny edge detection algorithm to obtain the edge image containing the drainage ditch boundary and other details, and then all contours are extracted from the processed edge image through the contour search algorithm (such as the Canny edge detection algorithm), and the screening conditions of the drainage ditch are set based on the area, shape and other characteristics of the contour. Distinguish and retain the contours that meet the characteristics of drainage ditches, and finally visually mark the screened drainage ditch contours on the original image, thereby obtaining the contours of the drainage ditch area to which the ridge terrace belongs; the reference contours of the drainage ditch belonging to the ridge terrace are marked in the ridge terrace image by the terrace data annotator according to the actual environment of the ridge terrace and the drainage requirements; the total deviation value of the contour of the drainage ditch area to which the ridge terrace belongs is determined by locating each position point of the contour of the drainage ditch area to which the ridge terrace belongs, and locating each identical position point corresponding to the drainage ditch reference contour, thereby calculating the straight-line distance between the contour of the drainage ditch area to which the ridge terrace belongs and each position point of the drainage ditch reference contour, and accumulating the total deviation value of the contour of the drainage ditch area to which the ridge terrace belongs.
[0057] The total number of layers of the ridge terraces is extracted from the terrain parameters of the ridge terraces, and the reference total height of the ridge terraces is obtained by matching, and the actual total height of the ridge terraces is obtained. The actual total height of the ridge terraces is subtracted from the reference total height of the ridge terraces to obtain the height deviation value of the ridge terraces. The total number of layers of the ridge terraces mentioned above can be obtained by applying edge detection algorithms such as the Canny edge detection algorithm to the ridge terrace images to identify the ridge edge information in the ridge terrace images, and then using a contour extraction algorithm (such as the Canny edge detection algorithm) to convert the edge of the ridge edge information into a specific contour, and grouping them according to the characteristics and relative position relationship of the ridge edge contours, each group of contours corresponding to one layer of the terrace, and calculating the total number of terrace layers by counting the number of grouped contours; the specific matching process of the reference total height of the ridge terraces mentioned above is: querying the height of each layer of the ridge terrace corresponding to the actual terrain to which the ridge terrace belongs from the terrace characteristic database The total number of layers of the ridge terrace is multiplied by the height difference of each layer of the ridge terrace, which is recorded as the reference total height of the ridge terrace. The height difference of each layer of the ridge terrace corresponding to the actual terrain to which the ridge terrace belongs is formulated by surveying and mapping experts based on a large amount of data (such as slope, aspect, vegetation coverage, etc.) to obtain the height difference of each layer of the ridge terrace corresponding to different types of actual terrain to which the ridge terrace belongs, and stored in the terrace characteristic database; the actual total height of the ridge terrace is extracted by image processing technology and geographic information system analysis, which usually involves superimposing the contour data on the elevation data so as to visualize the shape of the terrace in three-dimensional space, and using the elevation analysis tool in the geographic information software to calculate the elevation difference between the highest point and the lowest point of the visualized terrace shape in three-dimensional space, and then calculating the actual total height of the terrace; the height deviation value refers to the reference total height of the ridge terrace minus the actual total height of the ridge terrace.
[0058] At the same time, the vegetation coverage rate of the ridge terrace is comprehensively considered to evaluate the terrain stability index of the ridge terrace. In this embodiment, the terrain stability index of the ridge terrace is obtained by comprehensively analyzing the total deviation value of the contour of the drainage ditch area to which the ridge terrace belongs, the height deviation value of the ridge terrace, and the vegetation coverage rate of the ridge terrace. It is a numerical value used to evaluate the terrain stability of the ridge terrace. The specific expression is:
[0059] ;
[0060] It is the total deviation value of the contour of the drainage ditch area belonging to the earthen ridge terrace. The contour deviation of the drainage ditch may be caused by many factors, including soil erosion and soil loss. When the deviation value is large, it indicates that the drainage efficiency of the drainage ditch may be affected, increasing the risk of flood disasters in the earthen ridge terrace area, and may also aggravate the soil erosion problem of the earthen ridge terrace soil.
[0061] is the height deviation value of the earthen ridge terrace. The increase of height deviation may be caused by factors such as soil erosion, collapse and human modification. The increase of height deviation not only affects the agricultural production capacity of the earthen ridge terrace, but also may threaten the overall structural stability of the earthen ridge terrace and increase the risk of collapse of the earthen ridge terrace.
[0062] The vegetation coverage rate of earthen ridge terraces. Vegetation plays a vital role in the terrace ecosystem. It can fix soil, reduce soil erosion, regulate climate, etc. The level of vegetation coverage directly affects the terrain stability and ecological environment quality of the terraces. When the vegetation coverage rate is low, the earthen ridge terraces are more susceptible to erosion by natural factors such as soil erosion, thus affecting the sustainable utilization of the earthen ridge terraces.
[0063] is the reference coverage rate of vegetation on the ridge and terrace, which represents the reference value of the vegetation coverage rate of the ridge and terrace, and is consistent with the formulation process and acquisition process of the reference information entropy of the ridge and terrace image.
[0064] e is a natural constant, It is the influence factor corresponding to the unit value of the total deviation value of the contour preset in the terrace characteristic database, which represents the influence degree of the unit value of the total deviation value of the contour on the terrain stability index. When used, the influence factor corresponding to the unit value of the total deviation value of the contour can be directly obtained from the terrace characteristic database, and the corresponding relationship can be a preset mapping relationship. For example, the total deviation value of the contour and the influence factor corresponding to the unit value of the total deviation value of the contour preset in the terrace characteristic database form a mapping set, and the real-time total deviation value of the contour is input into the mapping set to obtain the influence factor corresponding to the unit value of the total deviation value of the contour. The mapping relationship can be one-to-one or many-to-one. In this example, its value range is [0, 1].
[0065] It is the influence factor corresponding to the unit value of the height deviation value preset in the terrace characteristic database, which represents the numerical value of the influence degree of the unit value of the height deviation value on the terrain stability index. When used, the influence factor corresponding to the unit value of the height deviation value can be directly obtained from the terrace characteristic database, and the corresponding relationship can be a preset mapping relationship. For example, the height deviation value and the influence factor corresponding to the unit value of the height deviation value preset in the terrace characteristic database form a mapping set, and the real-time height deviation value is input into the mapping set to obtain the influence factor corresponding to the unit value of the height deviation value. The mapping relationship can be one-to-one or many-to-one. In this example, its value range is [0, 1].
[0066] It is the correction factor corresponding to the vegetation coverage rate preset in the terrace characteristic database, which represents the numerical value of the correction degree of the vegetation coverage rate change. When used, the correction factor corresponding to the vegetation coverage rate can be directly obtained from the terrace characteristic database, and the corresponding relationship can be a preset mapping relationship. For example, the vegetation coverage rate and the correction factor corresponding to the vegetation coverage rate preset in the terrace characteristic database form a mapping set, and the real-time vegetation coverage rate is input into the mapping set to obtain the correction factor corresponding to the vegetation coverage rate. The mapping relationship can be one-to-one or many-to-one. In this example, its value range is [0, 1].
[0067] in, is the terrain stability index of the ridge terrace. When the vegetation coverage rate is lower than the vegetation reference coverage rate, it indicates that the vegetation growth on the ridge terrace deviates from expectations, which can easily lead to soil erosion of the ridge terrace, causing the contour of the drainage ditch to gradually become concave and blurred, and the total deviation value of the contour in the drainage ditch area increases. At the same time, soil erosion aggravates the erosion and collapse of the soil in the ridge terrace, causing the height of the ridge terrace to decrease, and the height deviation value also increases accordingly. These changes directly reduce the terrain stability of the ridge terrace, threatening the sustainable utilization and ecological security of the ridge terrace. When the total deviation value of the contour in the drainage ditch area to which the ridge terrace belongs increases, it indicates that the drainage efficiency of the drainage ditch is reduced, increasing the risk of soil erosion on the ridge terrace, thereby weakening The stability of the ridge terrace terrain leads to soil erosion and the destruction of the ridge terrace structure. The increase in height deviation may be caused by soil erosion, collapse and other natural factors, thus affecting the agricultural production capacity of the ridge terrace and the terrain stability of the ridge terrace. When the vegetation coverage rate is lower than the vegetation reference coverage rate, it indicates that the vegetation protection ability of the ridge terrace is weakened, and the soil is more susceptible to erosion, which makes the terrain stability of the ridge terrace correspondingly reduced. Therefore, by analyzing the above parameters, the stability of the ridge terrace in the terrain can be analyzed, and the potential risks of terrace terrain stability, such as increased soil erosion and terrace collapse, can be discovered in time, thereby providing a scientific basis for the sustainable development of the ridge terrace and the optimal allocation of resources.
[0068] In this exemplary embodiment, the table showing the change of the terrain stability index of the ridge terrace and its corresponding parameters is shown in Table 1:
[0069] Table 1 The changes of terrain stability index and its corresponding parameters of earthen terraces
[0070]
[0071] In this example embodiment, the value of the influence factor corresponding to the unit value of the total deviation value of the contour is set to 0.1, the value of the influence factor corresponding to the unit value of the height deviation value is set to 0.15, the value of the correction factor corresponding to the vegetation coverage rate is set to 0.12, and the vegetation reference coverage rate of the ridge terrace is set to 70%. It can be seen from Table 1 that the total deviation value of the contour in the first column shows a decreasing trend, the height deviation value in the second column and the difference between the vegetation reference coverage rate and the vegetation coverage rate in the third column all show a decreasing trend, and the three parameters of the total deviation value of the contour, the height deviation value and the difference between the vegetation reference coverage rate and the vegetation coverage rate are negatively correlated with the terrain stability index. When the three parameters in Table 1 show a decreasing trend, the terrain stability index in the fourth column shows an increasing trend.
[0072] Furthermore, the soil quality coefficient of the ridge terrace is evaluated, and the specific evaluation process is as follows:
[0073] The area of vegetation region to which the ridge terrace belongs and the total area of the ridge terrace are located and extracted from the soil parameters of the ridge terrace, and the vegetation coverage rate of the ridge terrace is obtained through ratio processing; the area of vegetation region to which the ridge terrace belongs refers to the total number of pixels in the vegetation region to which the ridge terrace belongs. The ridge terrace image is converted to hue, saturation and brightness color space by using the cv2.cvtColor function in the open source computer vision library. This function receives the original image of the ridge terrace image and the color space conversion code as input, and outputs the image converted to hue, saturation and brightness color space, because the hue component is more direct for identifying green vegetation. In terms of color, image processing experts set a color threshold based on the typical green range of vegetation. This threshold defines the range of hue, saturation and brightness, and is used to distinguish between vegetation and non-vegetation areas. This threshold is applied to create a binary mask, in which pixels in vegetation areas are marked as white (or 255), while pixels in non-vegetation areas are marked as black (or 0). The number of white pixels in the mask is calculated to obtain the total number of pixels in the vegetation area, which is marked as the area of the vegetation area to which the ridge and terraces belong. The total area of the ridge and terraces mentioned above refers to the total number of pixels in the ridge and terraces image, which is obtained by multiplying the number of horizontal pixels of the resolution by the number of height pixels in the file properties of the ridge and terraces image.
[0074] The color values of each color detection point in the soil area of the ridge terrace are located and extracted from the soil parameters of the ridge terrace, and the reference color values of each color detection point in the soil area of the ridge terrace are obtained. The color values of the corresponding color detection points in the soil area of the ridge terrace are processed in turn and accumulated to obtain the total soil color deviation value of the ridge terrace. The color values of each color detection point in the soil area of the ridge terrace are consistent with the color value acquisition process of each pixel point in the ridge terrace image. The above-mentioned color detection points refer to pixel points randomly arranged in the soil area, that is, pixel points randomly arranged in the area where the pixels are marked as black. A pseudo-random number generator is used to generate a number of random numbers, which correspond to the pixel positions in the image (usually row and column coordinates), and it is determined whether the pixels at these positions belong to the soil area (that is, whether they are black). If they are both, then these pixels are some points are used as color detection points; if there are points that are not, new random numbers are regenerated until the random numbers correspond to pixel positions in the image that all belong to the soil area; the reference color value of each color detection point in the soil area to which the above-mentioned ridge terraces belong refers to the ideal growth soil conditions of the target crops of the current ridge terraces and the image performance of the ridge terraces formulated by the terrace data annotator. For example, some crops prefer dark soil rich in organic matter. The depth of soil color may also be affected by shooting conditions. For example, in a backlight environment, the soil color will be deepened; the total soil color deviation value of the above-mentioned ridge terraces refers to the reference color value of each color detection point in the soil area to which the ridge terraces belong, and the color value of the corresponding color detection point in the soil area to which the ridge terraces belong is subjected to difference processing and absolute value processing, and the differences after absolute value processing are accumulated to obtain the total soil color deviation value of the ridge terraces.
[0075] Thus, the soil quality coefficient of the ridge terrace is comprehensively evaluated. In this embodiment, the soil quality coefficient of the ridge terrace is obtained by comprehensive analysis of the vegetation coverage rate of the ridge terrace, the total deviation value of the soil color of the ridge terrace, the reference vegetation coverage rate of the ridge terrace and the reference deviation value of the soil color of the ridge terrace. It is a numerical value used to evaluate the soil quality of the ridge terrace. The specific expression is:
[0076] ;
[0077] It is the vegetation coverage rate of earthen ridge terraces. The vegetation coverage rate is an important indicator to measure the soil ecological function and vegetation growth status. The vegetation coverage rate close to the vegetation reference coverage rate usually indicates that the earthen ridge terraces have good soil quality and a healthy ecosystem.
[0078] It is the total deviation value of soil color of ridge terraces, which is used to measure the overall difference between the actual soil color and the reference soil color. It comprehensively considers various information such as soil organic matter content, moisture status, nutrient level and possible pollution factors.
[0079] It is the soil color reference deviation value of the ridge terrace, which represents the reference value for analyzing the total soil color deviation value of the ridge terrace. It can be extracted from the terrace characteristic database. Different measuring equipment may produce different results. Therefore, in order to unify the evaluation standards and ensure the accuracy and repeatability of soil color assessment, terrace data annotators set the soil color reference deviation value as the standard.
[0080] is the reference vegetation coverage of the ridge terrace, e is a natural constant, It is the correction factor corresponding to the vegetation coverage rate preset in the terrace characteristic database, which represents the numerical value of the correction degree of the vegetation coverage rate change. When used, the correction factor corresponding to the vegetation coverage rate can be directly obtained from the terrace characteristic database, and the corresponding relationship can be a preset mapping relationship. For example, the vegetation coverage rate and the correction factor corresponding to the vegetation coverage rate preset in the terrace characteristic database form a mapping set, and the real-time vegetation coverage rate is input into the mapping set to obtain the correction factor corresponding to the vegetation coverage rate. The mapping relationship can be one-to-one or many-to-one. In this example, its value range is [0, 1].
[0081] It is the correction factor corresponding to the total soil color deviation value preset in the terrace characteristic database, which represents the numerical value of the correction degree of the change of the total soil color deviation value. When used, the correction factor corresponding to the total soil color deviation value can be directly obtained from the terrace characteristic database, and the corresponding relationship can be a preset mapping relationship. For example, the total soil color deviation value and the correction factor corresponding to the total soil color deviation value preset in the terrace characteristic database form a mapping set, and the real-time total soil color deviation value is input into the mapping set to obtain the correction factor corresponding to the total soil color deviation value. The mapping relationship can be one-to-one or many-to-one. In this example, its value range is [0, 1].
[0082] in, is the soil quality coefficient of the ridge terrace. When the total soil color deviation value deviates from the soil color reference deviation value by a large margin, it indicates that multiple factors such as the reduction of soil organic matter, nutrient loss, poor water conditions or increased pollution have caused the soil quality to decline, restricting the normal development and distribution of vegetation. This restriction is directly reflected in the change of vegetation coverage, that is, the vegetation coverage rate significantly deviates from the expected vegetation reference coverage rate. The decline in vegetation coverage rate, as an intuitive manifestation of soil quality degradation, not only reflects the weakening of soil ecological functions, but may also cause a series of environmental problems, such as increased soil erosion and reduced biodiversity. The significant deviations of the two jointly point to the decline in soil quality, forming a feedback mechanism that confirms and influences each other. Therefore, a comprehensive analysis of the above parameters can capture the subtle signals of soil quality changes, thereby accurately quantifying the quality of the soil in the ridge terrace.
[0083] It needs to be explained that the vegetation coverage rate can appear simultaneously in the two formulas of the soil quality coefficient of the ridge terrace and the terrain stability index of the ridge terrace and play an important role. This is mainly due to the complex interaction and interdependence between the vegetation and the soil and terrain of the ridge terrace. The vegetation root system can enhance the erosion resistance of the soil of the ridge terrace, that is, enhance the soil's ability to resist water erosion and wind erosion. With the increase of vegetation coverage rate, soil erosion resistance is enhanced, which helps to prevent the probability of terrain erosion and landslides in the ridge terrace.
[0084] Step 3: Collect the environmental parameters of the ridge terraces, and determine the comprehensive stability factor of the ridge terraces based on the soil quality coefficient of the ridge terraces and the terrain stability index of the ridge terraces, thereby providing feedback for the stability detection of the ridge terraces.
[0085] Specifically, the environmental parameters of the ridge terraces collected refer specifically to the environmental parameters of the ridge terraces during the environmental monitoring period, thereby determining the comprehensive stability factor of the ridge terraces through the environmental parameters of the ridge terraces during the environmental monitoring period; the environmental parameters of the ridge terraces during the environmental monitoring period refer to the environmental parameters of the ridge terraces during the environmental monitoring period extracted from the meteorological station data; the environmental monitoring period refers to the time point for monitoring the environment of the ridge terraces, and its specific duration is determined by the terrace ecologist. It should be explained that the time point for collecting the ridge terrace images is at the center of the environmental monitoring period, such as Figure 2 As shown in the schematic diagram of the environmental monitoring cycle time period, the ridge and terrace image acquisition time point 1 is at the center point of the environmental monitoring cycle time period 2, wherein the ridge and terrace image acquisition time point is extracted from the file attributes of the ridge and terrace image.
[0086] It needs to be explained that the above-mentioned environmental monitoring cycle fully integrates the historical and expected conditions of the ridge terraces, thereby achieving accurate capture and in-depth analysis of changes in the ecological environment of the ridge terraces. It not only reflects the current environmental conditions of the ridge terraces, but also implies the cumulative effects of previous environmental changes and potential harbingers of future changes, providing strong support for the protection and management of the ridge terrace ecology.
[0087] Specifically, the stability detection of the earthen ridge terrace is fed back, and the specific feedback process is as follows:
[0088] The comprehensive stability factor of the ridge terrace is compared with the comprehensive stability threshold. If the comprehensive stability factor of the ridge terrace is less than or equal to the comprehensive stability threshold, feedback is given to the stability detection of the ridge terrace. The above-mentioned comprehensive stability threshold represents the minimum value of the reasonable range of the comprehensive stability factor of the ridge terrace, and can be extracted from the terrace characteristic database. Agricultural engineering experts make scientific and reasonable judgments and adjustments to the reasonable range of the comprehensive stability factor based on the actual situation of the terrace, combined with the theories and methods of relevant disciplines such as soil mechanics, hydrology and ecology, so as to formulate a comprehensive stability threshold. If the comprehensive stability factor of the ridge terrace is less than or equal to the comprehensive stability threshold, it indicates that the stability of the current ridge terrace is in a poor state, and feedback is required for the stability detection of the ridge terrace. The specific feedback process is: generating a ridge terrace stability warning log and visually presenting it, and the terrace ecologist repairs the stability of the ridge terrace based on the ridge terrace stability warning log; in an example embodiment, the information in the ridge terrace stability warning log includes the longitude and latitude, slope and vegetation coverage of the ridge terrace.
[0089] Specifically, the comprehensive stability factor of the earthen terrace is determined by the following specific determination process:
[0090] The total rainfall in the environment to which the ridge terrace belongs during the environmental monitoring period is extracted from the environmental parameters of the ridge terrace during the environmental monitoring period; the total rainfall in the environment to which the ridge terrace belongs during the environmental monitoring period is extracted from the meteorological station data.
[0091] The average wind speed of the environment to which the ridge terrace belongs during the environmental monitoring period is extracted from the environmental parameters of the ridge terrace during the environmental monitoring period, and the average wind speed of the environment to which the ridge terrace belongs during the environmental monitoring period is extracted from the meteorological station data.
[0092] At the same time, the soil quality coefficient of the ridge terrace and the terrain stability index of the ridge terrace are comprehensively analyzed to analyze the comprehensive stability factor of the ridge terrace.
[0093] Furthermore, the comprehensive stability factor of the ridge terrace, in this embodiment, is obtained by comprehensive analysis of the total rainfall of the environment to which the ridge terrace belongs during the environmental monitoring period, the average wind speed of the environment to which the ridge terrace belongs during the environmental monitoring period, the reference total rainfall of the environment to which the ridge terrace belongs during the environmental monitoring period, the reference average wind speed of the environment to which the ridge terrace belongs during the environmental monitoring period, the soil quality coefficient of the ridge terrace and the terrain stability index of the ridge terrace, and is used to evaluate the comprehensive stability of the ridge terrace. The specific expression is:
[0094] ;
[0095] It is the total amount of rainfall in the environment of the ridge terrace during the environmental monitoring period. The total amount of rainfall is a key factor that directly affects soil moisture, vegetation growth and soil erosion. Appropriate rainfall is conducive to vegetation growth and soil conservation.
[0096] It is the average wind speed of the environment of the earthen ridge terrace during the environmental monitoring period. The average wind speed indirectly affects the stability of the earthen ridge terrace by affecting the wind erosion on the soil surface.
[0097] It is the reference total rainfall of the environment of the ridge terrace during the environmental monitoring period, which represents the reference value of the total rainfall for analyzing the environment of the ridge terrace during the environmental monitoring period. It is determined by terrace ecologists based on a comprehensive consideration of factors such as the soil properties, slope, vegetation cover, drainage system and historical rainfall data of the ridge terrace. It can ensure that the ridge terrace maintains a stable reference value of total rainfall and can be extracted from the terrace characteristic database.
[0098] It is the reference average wind speed of the environment of the earthen ridge terrace during the environmental monitoring period, which represents the reference value of the average wind speed for analyzing the environment of the earthen ridge terrace during the environmental monitoring period, which is consistent with the reference total rainfall determination process and can be extracted from the terrace characteristic database.
[0099] is the soil quality coefficient of the ridge terrace, is the terrain stability index of the earthen ridge terraces, It is the correction factor corresponding to the total rainfall preset in the terrace characteristic database, which represents the numerical value of the correction degree of the change in the total rainfall. When used, the correction factor corresponding to the total rainfall can be directly obtained from the terrace characteristic database, and the corresponding relationship can be a preset mapping relationship. For example, the total rainfall and the correction factor corresponding to the total rainfall preset in the terrace characteristic database form a mapping set, and the real-time total rainfall is input into the mapping set to obtain the correction factor corresponding to the total rainfall. The mapping relationship can be one-to-one or many-to-one. In this example, its value range is [0, 1].
[0100] It is the correction factor corresponding to the average wind speed preset in the terrace characteristic database, which represents the numerical value of the correction degree of the average wind speed change. When used, the correction factor corresponding to the average wind speed can be directly obtained from the terrace characteristic database, and the corresponding relationship can be a preset mapping relationship. For example, the average wind speed and the correction factor corresponding to the average wind speed preset in the terrace characteristic database form a mapping set, and the real-time average wind speed is input into the mapping set to obtain the correction factor corresponding to the average wind speed. The mapping relationship can be one-to-one or many-to-one. In this example, its value range is [0, 1].
[0101] It is the weight factor corresponding to the soil quality coefficient preset in the terrace characteristic database, which indicates the proportion of the soil quality coefficient to the comprehensive stability factor of the ridge terrace. When in use, the weight factor corresponding to the soil quality coefficient can be directly obtained from the terrace characteristic database, and the corresponding relationship can be a preset mapping relationship. For example, the soil quality coefficient and the weight factor corresponding to the soil quality coefficient preset in the terrace characteristic database form a mapping set, and the real-time soil quality coefficient is input into the mapping set to obtain the weight factor corresponding to the soil quality coefficient. The mapping relationship can be one-to-one or many-to-one. In this example, its value range is [0, 1].
[0102] It is the weight factor corresponding to the terrain stability index preset in the terrace characteristic database, which represents the proportion of the terrain stability index to the comprehensive stability factor of the ridge terrace. When used, the weight factor corresponding to the terrain stability index can be directly obtained from the terrace characteristic database, and the corresponding relationship can be a preset mapping relationship. For example, the terrain stability index and the weight factor corresponding to the terrain stability index preset in the terrace characteristic database form a mapping set, and the real-time terrain stability index is input into the mapping set to obtain the weight factor corresponding to the terrain stability index. The mapping relationship can be one-to-one or many-to-one. In this example, its value range is [0, 1].
[0103] in, It is the comprehensive stability factor of earthen ridge terraces. During the environmental monitoring period, if the total rainfall is significantly abnormal and deviates greatly from the preset reference value range, it will directly inhibit the normal growth and coverage of vegetation in the earthen ridge terrace area. Vegetation is an important barrier for soil protection. Its poor growth will weaken the effective retention of soil and make the soil more susceptible to external erosion. If the average wind speed during this period is far higher than the reference average wind speed, it will intensify the scouring effect on exposed or weak soil layers, resulting in a large loss of soil particles and a decrease in soil quality coefficient. The deterioration of soil quality is not only reflected in the destruction of soil structure and loss of fertility, but also in the loss of soil quality. Aspects such as these have a more direct impact on the terrain-maintaining capacity of ridge terraces. The intensification of soil erosion will gradually change the original terrain contours of ridge terraces, reduce their slope stability and soil and water conservation functions, and thus pose a serious threat to the comprehensive stability of the ridge terrace system. Therefore, analyzing the stability of ridge terraces by integrating the environmental factors, soil factors, and terrain factors of ridge terraces can more comprehensively reveal the inherent laws and characteristics of the ridge terrace system, improve the accuracy and reliability of the analysis results, reduce the deviation of single-dimensional analysis, and more scientifically guide the management and maintenance of ridge terraces.
[0104] In a specific embodiment, the present invention provides an automatic detection method for instability of earthen ridge terraces based on machine vision, which collects earthen ridge terrace image data based on machine vision, analyzes the image quality index of the earthen ridge terrace image, and automatically provides feedback on the collection of earthen ridge terrace image data, such as adjusting camera parameters, etc., to ensure that the quality of image data collected subsequently is higher, thereby improving the intelligent level of data collection, and according to the earthen ridge terrace image data, obtains soil parameters of the earthen ridge terrace and performs quality inspection, thereby evaluating the soil quality coefficient of the earthen ridge terrace, intuitively reflecting the health status and fertility of the soil in the earthen ridge terrace. The soil stability level of the ridge terraces provides an important reference for the soil management and improvement of the ridge terraces. At the same time, according to the ridge terrace image data, the terrain parameters of the ridge terraces are collected and the stability test is carried out. The terrain stability index of the ridge terraces is evaluated, which can reflect the stability and anti-erosion ability of the ridge terrace terrain. Finally, the environmental parameters of the ridge terraces are collected and the comprehensive stability factor of the ridge terraces is determined. Feedback on the stability test of the ridge terraces is provided, which can provide timely early warning information on the stability of the ridge terraces, guide the adoption of targeted management and maintenance measures, and ensure the long-term stability and sustainable development of the ridge terraces.
[0105] The above contents are merely examples and explanations of the structure of the present invention. The technicians in this technical field may make various modifications or additions to the specific embodiments described or replace them in a similar manner. As long as they do not deviate from the structure of the invention or exceed the scope defined by the present invention, they should all fall within the protection scope of the present invention.
Claims
1. A method for automatically detecting instability of earthen ridge terraces based on machine vision, characterized in that: include: Step 1: collect the ridge and terrace image data based on machine vision, analyze the image quality index of the ridge and terrace image, and compare it with the image quality threshold. If the image quality index of the ridge and terrace image is greater than the image quality threshold, then execute step 2. If the image quality index of the ridge and terrace image is less than or equal to the image quality threshold, then automatically feedback the collection of the ridge and terrace image data; Step 2: According to the ridge terrace image data, the soil parameters of the ridge terrace are obtained and quality detection is performed, thereby evaluating the soil quality coefficient of the ridge terrace; at the same time, according to the ridge terrace image data, the terrain parameters of the ridge terrace are collected and stability detection is performed, thereby evaluating the terrain stability index of the ridge terrace, the ridge terrace image data includes the resolution of the ridge terrace image and the color value of each pixel point of the ridge terrace image, the soil parameters of the ridge terrace and the terrain parameters of the ridge terrace, wherein the data in the soil parameters of the ridge terrace include the area of the vegetation region to which the ridge terrace belongs, the total area of the ridge terrace region and the color values of each color detection point of the soil region to which the ridge terrace belongs, and the data in the terrain parameters of the ridge terrace include the outline of the drainage ditch region to which the ridge terrace belongs and the total number of layers of the ridge terrace; Step 3: Collect environmental parameters of the earthen ridge terraces, and determine the comprehensive stability factor of the earthen ridge terraces based on the soil quality coefficient of the earthen ridge terraces and the terrain stability index of the earthen ridge terraces, thereby providing feedback for the stability detection of the earthen ridge terraces; The resolution of the ridge and terrace image is obtained by reading the resolution in the file attributes of the ridge and terrace image; The color value of each pixel of the ridge and terrace image is obtained by obtaining the hexadecimal color code of each pixel and converting its numerical value into decimal, and the decimal value is recorded as the color value of each pixel of the ridge and terrace image; The area of the vegetation region to which the ridge terraces belong refers to the total number of pixels in the vegetation region to which the ridge terraces belong. The ridge terrace images are converted into hue, saturation and brightness color spaces, a color threshold is set according to a typical green range of vegetation to distinguish between vegetation and non-vegetation areas, the threshold is applied to create a binary mask, the number of pixels in the vegetation region in the mask is calculated, the total number of pixels in the vegetation region is obtained, and it is marked as the area of the vegetation region to which the ridge terraces belong; The total area of the ridge and terrace region refers to the total number of pixels in the ridge and terrace image, which is obtained by multiplying the number of horizontal pixels by the number of height pixels of the resolution of the ridge and terrace image; The color value of each color detection point in the soil area to which the ridge terrace belongs is obtained by obtaining the hexadecimal color code of each color detection point and converting its numerical value into decimal, and the decimal value is recorded as the color value of each color detection point in the soil area to which the ridge terrace belongs; The outline of the drainage ditch area to which the earthen ridge terrace belongs is obtained by first removing noise from the earthen ridge terrace grayscale image, using an edge detection algorithm to obtain an edge image containing the drainage ditch boundary and other details, then extracting all contours from the processed edge image using a contour search algorithm, and setting drainage ditch screening conditions based on the area, shape and other characteristics of the contours to distinguish and retain contours that meet the drainage ditch characteristics, and finally marking the screened drainage ditch contours on the original image, thereby obtaining the outline of the drainage ditch area to which the earthen ridge terrace belongs; The total number of layers of the ridge terraces is obtained by applying an edge detection algorithm to the ridge terrace image, identifying the ridge edge information in the ridge terrace image, and then converting the edges into specific contours. The ridge edge contours are grouped according to their characteristics and relative positional relationships, with each group of contours corresponding to one layer of the terrace. The total number of layers of the terraces is calculated by counting the number of grouped contours.
2. The method for automatically detecting instability of earthen ridge terraces based on machine vision according to claim 1 is characterized by: The acquisition of ridge and terrace image data based on machine vision specifically refers to the acquisition of image data of ridge and terrace by image acquisition equipment, and the data processing to obtain the ridge and terrace image data.
3. The method for automatically detecting instability of earthen ridge terraces based on machine vision according to claim 1 is characterized by: The specific analysis process of analyzing the image quality index of the ridge and terrace image is as follows: The resolution of the ridge terrace image and the color value of each pixel of the ridge terrace image are extracted from the ridge terrace image data, and the noise variance of the ridge terrace image is obtained by comprehensive data processing; The ridge and terrace image is processed by image grayscale to obtain the ridge and terrace grayscale image. The total number of pixels in the ridge and terrace grayscale image and the number of occurrences of each grayscale level are extracted and counted from the ridge and terrace grayscale image. Comprehensive data processing is performed to obtain the information entropy of the ridge and terrace image, and the image quality index of the ridge and terrace image is comprehensively analyzed.
4. The method for automatically detecting instability of earthen ridge terraces based on machine vision according to claim 1 is characterized by: The automatic feedback of the collection of earthen ridge terrace image data is as follows: The image acquisition parameters of the image acquisition device are obtained, transmitted to the image acquisition parameter set stored in the terrace characteristic database, and the image acquisition parameter set is packaged into an image acquisition parameter log, thereby automatically feeding back the acquisition of ridge terrace image data.
5. The method for automatically detecting instability of earthen ridge terraces based on machine vision according to claim 1 is characterized by: The soil quality coefficient of the ridge terrace is evaluated, and the specific evaluation process is as follows: The vegetation area of the ridge terrace and the total area of the ridge terrace are located and extracted from the soil parameters of the ridge terrace, and the vegetation coverage rate of the ridge terrace is obtained through ratio processing. The color values of each color detection point in the soil area of the ridge terrace are located and extracted from the soil parameters of the ridge terrace. At the same time, the reference color values of each color detection point in the soil area of the ridge terrace are obtained, and the color values of the corresponding color detection points in the soil area of the ridge terrace are processed in sequence by difference and accumulation to obtain the total deviation value of the soil color of the ridge terrace. The soil quality coefficient of the ridge terrace is evaluated by comprehensively considering the vegetation coverage rate of the ridge terrace and the total deviation value of the soil color of the ridge terrace.
6. The method for automatically detecting instability of earthen ridge terraces based on machine vision according to claim 1 is characterized by: The specific evaluation process of evaluating the terrain stability index of the earthen ridge terrace is as follows: Locate the contour of the drainage ditch area of the ridge terrace from the terrain parameters of the ridge terrace, obtain the reference contour of the drainage ditch of the ridge terrace, overlap and compare the contour of the drainage ditch area of the ridge terrace with the reference contour of the drainage ditch, and thus calculate the total deviation value of the contour of the drainage ditch area of the ridge terrace; The total number of layers of the ridge terrace is extracted from the terrain parameters of the ridge terrace, the reference total height of the ridge terrace is obtained by matching, the actual total height of the ridge terrace is obtained, and the actual total height of the ridge terrace is obtained by performing difference processing with the reference total height of the ridge terrace to obtain the height deviation value of the ridge terrace; At the same time, the terrain stability index of the ridge terrace is evaluated by comprehensively considering the vegetation coverage rate of the ridge terrace, the total deviation value of the contour of the drainage ditch area to which the ridge terrace belongs, and the height deviation value of the ridge terrace.
7. The method for automatically detecting instability of earthen ridge terraces based on machine vision according to claim 1 is characterized by: The collected environmental parameters of the ridge terraces specifically refer to the environmental parameters of the ridge terraces during the environmental monitoring period, thereby determining the comprehensive stability factor of the ridge terraces through the environmental parameters of the ridge terraces during the environmental monitoring period.
8. The method for automatically detecting instability of earthen ridge terraces based on machine vision according to claim 7 is characterized by: The comprehensive stability factor of the earthen terrace is determined by the following specific process: Extract the total rainfall of the environment of the ridge terraces during the environmental monitoring period from the environmental parameters of the ridge terraces during the environmental monitoring period; The average wind speed of the environment of the ridge terrace during the environmental monitoring period is extracted from the environmental parameters of the ridge terrace during the environmental monitoring period. At the same time, the soil quality coefficient of the ridge terrace and the terrain stability index of the ridge terrace are comprehensively considered to analyze the comprehensive stability factor of the ridge terrace.
9. The method for automatically detecting instability of earthen ridge terraces based on machine vision according to claim 8 is characterized by: The comprehensive stability factor of the earthen ridge terrace is specifically expressed as: ; in, It is the comprehensive stability factor of earthen terraces. is the total rainfall in the environment of the ridge terraces during the environmental monitoring period, is the average wind speed of the environment of the earthen terraces during the environmental monitoring period, is the total reference rainfall of the environment of the ridge terraces during the environmental monitoring period. is the reference average wind speed of the environment of the earthen terraces during the environmental monitoring period. is the soil quality coefficient of the ridge terrace, is the terrain stability index of the earthen ridge terraces, is the correction factor corresponding to the total rainfall preset in the terrace characteristics database, is the correction factor corresponding to the average wind speed preset in the terrace characteristics database, is the weight factor corresponding to the soil quality coefficient preset in the terrace characteristic database, It is the weight factor corresponding to the terrain stability index preset in the terrace characteristic database.
10. The method for automatically detecting instability of earthen ridge terraces based on machine vision according to claim 1, characterized in that: The feedback of the stability detection of the earthen ridge terrace is specifically conducted as follows: The comprehensive stability factor of the earthen ridge terrace is compared with the comprehensive stability threshold. If the comprehensive stability factor of the earthen ridge terrace is less than or equal to the comprehensive stability threshold, the stability detection of the earthen ridge terrace is fed back.
Citation Information
Patent Citations
A geological disaster early warning system for rock and soil slopes
CN114399889B
A method and system for early warning of the safety status of earth-rock dams
CN114495430B
Grassland soil degradation evaluation method
AU2020103570A4
KR1017875420000B1