Unmanned aerial vehicle-based intelligent identification method and equipment for danger lifting and prevention, and medium
Through the drone's image acquisition and combining edge detection and texture analysis technology, intelligent identification of embankment hazards is achieved, the problems of inefficient human patrol and the impact of bad weather are solved, and the efficiency and accuracy of embankment patrol are improved.
Patent Information
- Application Number
- CN202411014324.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-26
- Publication Date
- 2024-11-15
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing embankment patrol mainly relies on manpower, and there are problems such as limited patrol scope, inefficient and susceptible to severe weather. It is difficult to ensure the continuity and effectiveness of patrol work, especially in extreme climate conditions, which leads to flood disaster prediction and prevention. Face challenges.
Using the intelligent identification method of guarding danger based on drones, the collected guarding images are converted into grayscale images, and the edge intensity is determined using horizontal edge detection convolution kernel and vertical edge detection convolution kernel, and the grayscale symbiosis matrix is constructed and the edge symbiosis matrix is constructed through Texture analysis technology recognizes texture features, generates alarm information, and realizes intelligent identification.
Improve the accuracy and recognition efficiency of edge detection, optimize texture feature analysis, realize intelligent identification and timely alarm for dangerous situations, improve the efficiency and accuracy of safety prevention, reduce dependence on human resources, and in severe weather Work effectively under conditions.
Smart Images

Figure CN118968356A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of dangerous situation identification, and in particular to a method, device and medium for intelligently identifying dangerous situations based on drones. Background Art
[0002] Under the current background of global climate change, the frequent occurrence of extreme climate events has become a realistic problem that cannot be ignored. Global warming has not only led to an increase in extreme high temperature events, but also intensified the frequency and intensity of natural disasters such as heavy rainfall and floods. As an important disturbance factor in the global climate system, natural phenomena such as the El Niño event have a particularly significant impact on flood disasters in my country due to its lag effect, making the prediction and prevention of flood disasters face unprecedented challenges. At the same time, with the accelerated advancement of urbanization, a large number of natural ecological environments have been destroyed. Activities such as deforestation, wetland landfill, and mountain mining have weakened the regulation and storage capacity of nature, further exacerbating the risk of flood disasters. These human factors have not only changed the surface runoff conditions, but also affected the dynamic balance of groundwater, increasing the flood control pressure in cities and surrounding areas.
[0003] After entering the main flood season in July, the natural disaster risk situation faced by my country has become more complex and changeable. The Yangtze River Basin, Huaihe River Basin, Haihe River Basin, Songliao River Basin and Taihu Lake have become high-incidence areas for flood disasters due to their geographical location, climatic conditions and topography. Many rivers may experience floods above warning levels, posing a serious threat to the safety of embankments. In particular, in key areas such as the Yangtze River mainstream and the Dongting Lake and Poyang Lake water systems, once regional rainstorms and floods occur, the safety of life and property of the people in the surrounding areas will be directly affected.
[0004] At present, levee inspections are mainly carried out by manpower. Although this method can detect dangerous situations to a certain extent, it has limitations such as limited inspection scope, low efficiency, and susceptibility to bad weather. In severe weather conditions such as heavy rain and fog, manual inspections are not only difficult to carry out, but also greatly reduce the effectiveness of inspections. In addition, manual inspections also face problems such as tight human resources and fatigue of inspectors, making it difficult to ensure the continuity and effectiveness of inspections. Summary of the invention
[0005] The embodiments of the present application provide a method, device and medium for intelligently identifying dangerous situations based on drones, so as to solve existing technical problems.
[0006] On the one hand, the embodiment of the present application provides a method for intelligently identifying dangerous situations based on drones, including:
[0007] Converting the collected warning image into a corresponding grayscale image, determining the horizontal edge strength and the vertical edge strength of each image position in the grayscale image based on a horizontal edge detection convolution kernel and a vertical edge detection convolution kernel, and calculating the total edge strength corresponding to each image position;
[0008] Based on the magnitude relationship between the total edge intensity and a preset intensity threshold, edge points in the grayscale image are determined to form an edge detection image corresponding to the edge points, and pixel points are acquired based on the distance and direction between predetermined pixel pairs to construct a grayscale co-occurrence matrix;
[0009] Normalizing the gray level co-occurrence matrix, and determining the texture features to be guarded against in the edge detection image by texture analysis technology, so as to calculate the statistics corresponding to the texture features based on the normalized gray level co-occurrence matrix; wherein the statistics include contrast, correlation, energy and entropy;
[0010] Based on the statistics, the deviation between the texture feature and the standard texture feature is determined, and when the deviation is greater than a preset difference threshold, an alarm message is generated to achieve intelligent identification of dangerous situations.
[0011] In one implementation of the present application, converting the collected warning image into a corresponding grayscale image specifically includes:
[0012] Determine a warning area with a need for warning danger identification, and collect images of the warning area by using a drone to obtain a warning image corresponding to the warning area;
[0013] The guard image is edge processed to convert the processed guard image into a grayscale image, and at least one column of zero-valued pixels is added on each side of the grayscale image.
[0014] In one implementation of the present application, the horizontal edge intensity and the vertical edge intensity of each image position in the grayscale image are determined based on the horizontal edge detection convolution kernel and the vertical edge detection convolution kernel, respectively, and specifically include:
[0015] Determine a horizontal edge detection convolution kernel and a vertical edge detection convolution kernel to multiply each element in the convolution kernel by a pixel value at a corresponding image position to obtain a corresponding pixel product;
[0016] The pixel value of the image position corresponding to the element is added to the product of the pixel corresponding to the element to obtain the horizontal edge strength and the vertical edge strength corresponding to the image position.
[0017] In one implementation of the present application, the calculating the total edge strength corresponding to each image position specifically includes:
[0018] The total edge intensity corresponding to each image position in the grayscale image is calculated by the following formula:
[0019]
[0020] Wherein, y represents the total edge intensity corresponding to the image position in the grayscale image, a represents the horizontal edge intensity, and b represents the vertical edge intensity.
[0021] In one implementation of the present application, determining edge points in the grayscale image based on the magnitude relationship between the total edge intensity and a preset intensity threshold, and forming an edge detection image corresponding to the edge points, specifically includes:
[0022] Comparing the total edge intensity corresponding to each image position in the grayscale image with a preset intensity threshold, and determining the image position where the total edge intensity is greater than the preset intensity threshold, so as to obtain the edge point corresponding to the image position;
[0023] Each edge point in the grayscale image is displayed by binarization to form an edge detection image corresponding to the edge point.
[0024] In one implementation of the present application, the step of acquiring pixel points based on the predetermined distance and direction between pixel pairs to construct a gray level co-occurrence matrix specifically includes:
[0025] Acquire pixel points based on the predetermined distance and direction between pixel pairs, determine associated pixel points in the grayscale image that are pixel pairs with the designated pixel points, and obtain a grayscale combination corresponding to the designated pixel points and the associated pixel points;
[0026] The number of occurrences of each grayscale combination in the grayscale image is determined, and the number of occurrences of each grayscale combination in the grayscale image is arranged into a corresponding grayscale co-occurrence matrix.
[0027] In one implementation of the present application, the texture features to be guarded against are determined in the edge detection image by texture analysis technology, and the statistics corresponding to the texture features are calculated based on the normalized gray level co-occurrence matrix, specifically including:
[0028] Based on the texture analysis technology, determining the texture features to be guarded against in the edge detection image, and adjusting the grayscale corresponding to the texture features through the histogram equalization technology;
[0029] Calculating the contrast corresponding to the texture feature according to the number of occurrences of the gray level combination and the pixel value corresponding to the specified pixel point in the normalized gray level co-occurrence matrix;
[0030] According to the pixel value corresponding to the designated pixel point in the normalized gray level co-occurrence matrix, the correlation, energy and entropy corresponding to the texture feature are calculated.
[0031] In one implementation of the present application, when the deviation is greater than a preset difference threshold, generating an alarm message to realize intelligent identification of dangerous situations specifically includes:
[0032] In the case where the deviation is greater than a preset difference threshold, determining an abnormal texture feature in the grayscale image and position information corresponding to the abnormal texture feature;
[0033] Generate warning information corresponding to the abnormal texture feature, and send the warning information to the corresponding management personnel, so as to judge and mark the dangerous situation based on the warning information, so as to realize intelligent identification of the dangerous situation;
[0034] Feedback data corresponding to the alarm information is received, and the difference threshold is optimized according to the feedback data.
[0035] On the other hand, the embodiment of the present application further provides a drone-based intelligent identification device for preventing dangerous situations, the device comprising:
[0036] at least one processor;
[0037] and, a memory communicatively coupled to the at least one processor;
[0038] Among them, the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned intelligent identification method for preventing dangerous situations based on drones.
[0039] On the other hand, an embodiment of the present application further provides a non-volatile computer storage medium storing computer executable instructions, which, when executed, implements the above-mentioned intelligent identification method for preventing dangerous situations based on drones.
[0040] The embodiments of the present application provide a method, device and medium for intelligently identifying dangerous situations based on drones, which at least have the following beneficial effects:
[0041] By converting the warning image into a grayscale image and using the horizontal edge detection convolution kernel and the vertical edge detection convolution kernel, the horizontal edge strength and vertical edge strength of each position in the image can be determined more accurately, and then the total edge strength can be calculated, thereby improving the accuracy of edge detection; the edge point is determined based on the size relationship between the total edge strength and the preset strength threshold, and the edge detection image is formed, which simplifies the recognition process of the edge point and improves the recognition efficiency; by constructing a grayscale co-occurrence matrix and performing normalization processing, combined with texture analysis technology, the texture features of the warning are determined in the edge detection image, the analysis process of the texture features is optimized, and the extracted texture features are more accurate and comprehensive; by calculating the statistics corresponding to the texture features, the characteristics of the texture are fully described, providing rich information for subsequent analysis and recognition; based on the statistics, the deviation between the texture features and the standard texture features is determined, and when the deviation is greater than the preset difference threshold, an alarm message is generated, thereby realizing the intelligent recognition and timely alarm of the warning danger, and improving the efficiency and accuracy of safety prevention. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0043] Figure 1 A flowchart of an intelligent identification method for preventing dangerous situations based on drones provided in an embodiment of the present application;
[0044] Figure 2 A schematic diagram of the internal structure of a drone-based intelligent dangerous situation identification device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0045] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0046] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.
[0047] Figure 1 A flowchart of a method for intelligently identifying dangerous situations based on drones provided in an embodiment of the present application.
[0048] The analysis method involved in the embodiments of the present application can be implemented by a terminal device or a server, and the present application does not impose any special restrictions on this. For the convenience of understanding and description, the following embodiments are described in detail by taking a server as an example.
[0049] It should be noted that the server may be a single device or a system consisting of multiple devices, that is, a distributed server, and this application does not make any specific limitation on this.
[0050] like Figure 1 As shown, an embodiment of the present application provides an intelligent identification method for preventing dangerous situations based on drones, including:
[0051] 101. Convert the collected warning image into a corresponding grayscale image, determine the horizontal edge strength and the vertical edge strength of each image position in the grayscale image based on the horizontal edge detection convolution kernel and the vertical edge detection convolution kernel, and calculate the total edge strength corresponding to each image position.
[0052] Specifically, the server determines a warning area with a need for warning hazard identification, and uses a drone to collect images of the warning area to obtain a warning image corresponding to the warning area; edge processing is performed on the warning image to convert the processed warning image into a grayscale image, and at least one column of zero-value pixels is added on each side of the grayscale image.
[0053] In one embodiment, first, based on historical flood data, geological survey reports, and expert assessments, a section of levee along a river is identified as a levee area with a need for levee danger identification. Subsequently, a drone equipped with a high-definition camera is deployed to collect detailed images of the area. The drone takes multi-angle, high-resolution photos of the levee at a preset flight path and altitude to obtain a comprehensive levee image.
[0054] In order to simplify the subsequent processing steps and improve the computational efficiency, the image is edge processed to remove unnecessary background information and retain the main structure of the embankment. Then, the processed color image is converted into a grayscale image for better subsequent texture analysis. In order to avoid boundary effects during the processing, a column of zero-valued pixels is added on each side of the grayscale image as a buffer, which ensures that the boundary pixels can also be taken into account when performing convolution or other operations, and at the same time, it can avoid changes in image size caused by boundary processing.
[0055] In one example, in a city's flood control planning, a levee area located in a low-lying area of the city was identified as a key monitoring target through comprehensive analysis of the city's topography, hydrological data, and past flood disaster records. In order to grasp the flood control status of the area in real time, a drone was deployed for regular image acquisition tasks. The drone is equipped with an advanced image stabilization system and night shooting function to ensure that clear levee images can be captured in all weather and lighting conditions.
[0056] The images of the dike collected by the drone are preprocessed. First, the images are edge detected and processed to highlight the edge features of the dike and remove irrelevant background noise. Then, the processed color images are converted to grayscale images for more in-depth texture analysis. To ensure the smooth progress of subsequent processing steps, a column of zero-valued pixels is added around the grayscale image as boundary protection. Such processing not only helps to reduce the impact of edge effects, but also provides a more stable data basis for subsequent image analysis.
[0057] In one embodiment of the present application, the server determines a horizontal edge detection convolution kernel and a vertical edge detection convolution kernel to multiply each element in the convolution kernel with the pixel value of the corresponding image position to obtain the corresponding pixel product; the pixel value of the image position corresponding to the element is added to the pixel product corresponding to the element to obtain the horizontal edge strength and vertical edge strength corresponding to the image position.
[0058] In one embodiment, in the process of intelligent identification of dangerous situations, in order to accurately detect edge information in an image, it is first necessary to determine a suitable edge detection convolution kernel. In this embodiment, the convolution kernel of the Prewitt operator is selected as the horizontal and vertical edge detection convolution kernels. The Prewitt operator consists of two 3*3 convolution kernels, which are used to detect horizontal and vertical edges in an image respectively.
[0059] The horizontal edge detection convolution kernel is applied to the padded grayscale image. Each element of the convolution kernel is multiplied by the pixel value at the corresponding position in the image, and then the products are added to obtain a new pixel value. This new pixel value represents the horizontal edge strength at the current position.
[0060] Based on the same method, the vertical edge detection convolution kernel is applied to the padded image to obtain the vertical edge strength.
[0061] In one embodiment of the present application, the server calculates the total edge strength corresponding to each image position in the grayscale image by the following formula:
[0062]
[0063] It should be noted that, in the embodiment of the present application, y represents the total edge strength corresponding to the image position in the grayscale image, a represents the horizontal edge strength, and b represents the vertical edge strength.
[0064] In one embodiment, in the method for intelligently identifying dangerous situations, in order to more comprehensively describe edge information in an image, it is necessary to calculate the total edge strength of each image position, which can be achieved by combining the horizontal edge strength and the vertical edge strength.
[0065] Specifically, for each image position in the grayscale image, we have calculated its horizontal edge strength (denoted as a) and vertical edge strength (denoted as b) through the previous steps. Now, use the following formula to calculate the total edge strength (denoted as y) corresponding to the image position:
[0066]
[0067] This formula indicates that the total edge strength is the modulus of the vector sum of the horizontal edge strength and the vertical edge strength. By calculating the total edge strength of each image position, a total edge strength map of the same size as the original image can be obtained, which describes the edge strength information of each position in the image.
[0068] For example, for a specific pixel position in a grayscale image, if its horizontal edge strength is 3 and its vertical edge strength is 4, then the total edge strength of the position can be calculated by the formula:
[0069]
[0070] Therefore, the total edge strength of this image position is 5. By traversing each pixel position in the grayscale image and calculating its total edge strength, a complete total edge strength map can be obtained for subsequent hazard identification and analysis.
[0071] 102. Based on the relationship between the total edge intensity and the preset intensity threshold, edge points in the grayscale image are determined to form an edge detection image corresponding to the edge points, and pixel points are obtained based on the distance and direction between the predetermined pixel pairs to construct a grayscale co-occurrence matrix.
[0072] Specifically, the server compares the total edge intensity corresponding to each image position in the grayscale image with a preset intensity threshold, and determines the image position where the total edge intensity is greater than the preset intensity threshold to obtain the edge point corresponding to the image position; each edge point in the grayscale image is displayed by binarization to form an edge detection image corresponding to the edge point.
[0073] It should be noted that the preset intensity threshold in the embodiment of the present application can be determined in the following two ways:
[0074] The first method is to select based on image characteristics. Different images have different edge characteristics, so it is necessary to select an appropriate edge strength threshold based on the actual situation of the image. For example, for images with clear edges and high contrast, a lower threshold can be selected; while for images with blurred edges and low contrast, a higher threshold needs to be selected.
[0075] The second way is to determine it through experiments. In practical applications, it is usually necessary to determine the best edge strength threshold through experiments. By observing the edge detection results under different thresholds, you can choose the threshold that best reflects the edge information of the image.
[0076] In one embodiment, in a dangerous situation intelligent identification system, in order to accurately identify edge features in an image, it is necessary to calculate the total edge strength of each image position in the grayscale image and compare it with a preset intensity threshold. First, the total edge strength corresponding to each image position in the grayscale image has been calculated through the previous steps. Next, these total edge intensities are compared with the preset intensity threshold. This preset intensity threshold is determined based on actual recognition requirements and image characteristics, and it is used to distinguish edge points from non-edge points. Specifically, it is done by traversing each image position in the grayscale image and comparing its total edge strength with a preset intensity threshold. If the total edge strength of a certain image position is greater than the preset intensity threshold, then the image position is considered to be an edge point and is recorded.
[0077] After all edge points are determined, these edge points need to be displayed on the image to form an edge detection image. To achieve this, a binarization method is used. Specifically, a binary image of the same size as the grayscale image is created, and all its pixel values are initialized to 0. Then, all edge points are traversed, and the pixel values of the corresponding positions in the binary image are set to 1. In this way, the white pixels (pixel value is 1) in the binary image represent the detected edge points, while the black pixels (pixel value is 0) represent non-edge points. Finally, the resulting binary image is the edge detection image, which clearly shows the edge features in the grayscale image. This edge detection image can be used for subsequent identification and analysis of dangerous situations, and then accurately determine whether there are dangerous situations.
[0078] In one embodiment of the present application, pixel points are acquired based on the distance and direction between predetermined pixel pairs, associated pixel points that are pixel pairs with designated pixel points in the grayscale image are determined, and grayscale combinations corresponding to the designated pixel points and the associated pixel points are obtained; the number of occurrences of each grayscale combination in the grayscale image is determined, and the number of occurrences of each grayscale combination in the grayscale image is arranged into a corresponding grayscale co-occurrence matrix.
[0079] In one embodiment, before calculating the gray level co-occurrence matrix, the distance (d) and direction (θ) between pixel pairs need to be defined. The distance d determines the spatial relationship between pixel pairs, and because different image and texture characteristics may require different distances d, it is usually necessary to determine the optimal distance d through experiments. This can be done by calculating the gray level co-occurrence matrix at different distances d and evaluating the effect of the extracted texture features on subsequent tasks. The direction θ determines the relative position between pixel pairs. Common directions include 0° (horizontal), 45°, 90° (vertical), and 135°.
[0080] For each pixel (x, y) in the grayscale image, find the corresponding pixel (x+Δx, y+Δy) according to the defined distance d and direction θ, where Δx and Δy are the offsets corresponding to direction θ. Then, get the grayscale values of these two pixels, which are recorded as g1 and g2 respectively.
[0081] Repeat the above process for all pixels in the image and count the number of occurrences of each gray level combination (g1, g2). Let the number of gray levels be k (for 8-bit images, k=256), then the total number of gray level combinations is k^2.
[0082] The number of occurrences of each gray level combination (g1, g2) obtained by counting is arranged into a k×k matrix, which is the gray level co-occurrence matrix. The element P(g1, g2) in the matrix represents the normalized frequency of gray levels g1 and g2 appearing simultaneously at a specified distance and direction.
[0083] In one embodiment, in the intelligent recognition system for preventing dangerous situations, in order to more deeply analyze the texture features in the grayscale image, it is necessary to construct a grayscale co-occurrence matrix. This matrix describes the co-occurrence relationship between different grayscale levels in the grayscale image, that is, the frequency of occurrence of pixel pairs of different grayscale levels in the image. First, it is necessary to determine the associated pixel points in the grayscale image that are pixel pairs with the specified pixel points. This can be achieved by pre-determining the distance and direction between the pixel pairs. For example, a pixel pair with a distance of 1 and a horizontal or vertical direction can be selected. For each specified pixel point in the grayscale image, find the associated pixel points that are pixel pairs with it according to its position and the selected pixel pair distance and direction.
[0084] After determining the associated pixels, the grayscale combination corresponding to the specified pixel and the associated pixel is obtained. This combination is a two-tuple, which contains the grayscale of the specified pixel and the grayscale of the associated pixel. Next, all pixels in the grayscale image are traversed and the number of occurrences of each grayscale combination is counted. This can be achieved by using a counter array, where each element of the array corresponds to a grayscale combination and records the number of times the combination appears in the image.
[0085] Finally, the number of occurrences of each grayscale combination is arranged into a corresponding grayscale co-occurrence matrix. This matrix is a two-dimensional array, in which the elements represent the frequency of the corresponding grayscale combination in the image. For example, assuming that the grayscale range of the grayscale image is 0 to 255, a 256x256 grayscale co-occurrence matrix can be constructed. The rows of the matrix represent the grayscale level of a specified pixel, and the columns represent the grayscale level of the associated pixel. Each element in the matrix represents the number of times or frequency of the corresponding grayscale combination in the image.
[0086] 103. The gray level co-occurrence matrix is normalized, and the texture features to be guarded against are determined in the edge detection image through texture analysis technology, so as to calculate the statistics corresponding to the texture features based on the normalized gray level co-occurrence matrix.
[0087] In order to make the elements in the gray-level co-occurrence matrix more comparable, it is usually necessary to normalize the matrix. The normalization method is to divide each element in the matrix by the sum of all elements in the matrix so that the sum of all elements in the matrix is 1, which is specifically achieved through the following formula:
[0088]
[0089] It should be noted that the statistics in the embodiments of the present application include contrast, correlation, energy and entropy, and P(g1, g2) represents the pixel value corresponding to the pixel point (g1, g2) in the gray level co-occurrence matrix.
[0090] Specifically, in one embodiment of the present application, the server determines the texture features to be guarded against in the edge detection image based on texture analysis technology, and adjusts the grayscale corresponding to the texture features through histogram equalization technology; calculates the contrast corresponding to the texture features according to the number of occurrences of the grayscale combination and the pixel value corresponding to the specified pixel point in the normalized grayscale co-occurrence matrix; calculates the correlation, energy and entropy corresponding to the texture features according to the pixel value corresponding to the specified pixel point in the normalized grayscale co-occurrence matrix.
[0091] In one embodiment, in the intelligent identification system of the danger of the guardrail, texture analysis is a key technology that can more accurately identify the image features of the guardrail. This embodiment will show how to determine the texture features of the guardrail in the edge detection image and calculate the relevant parameters of these features through a series of processing steps. First, the texture features of the guardrail are determined in the edge detection image. This can be achieved by observing the edge distribution, shape and density in the image. For example, unique texture patterns on the guardrail, such as cracks, corrosion marks or irregular edge shapes, can be identified.
[0092] In order to enhance the contrast of texture features, histogram equalization technology is used. This technology adjusts the distribution of gray levels in the image to make the gray levels of the entire image more evenly distributed, thereby improving the contrast of the image. Histogram equalization is performed on the gray levels corresponding to the texture features to enhance their visibility and the accuracy of subsequent processing.
[0093] Next, the contrast corresponding to the texture features is calculated. Contrast is a measure that describes the degree of difference between light and dark areas in an image. The contrast is calculated based on the number of occurrences of the gray level combination and the pixel value corresponding to the specified pixel in the normalized gray level co-occurrence matrix. Specifically, the gray level difference between the specified pixel and its associated pixel can be calculated using the elements in the gray level co-occurrence matrix and used as a measure of contrast.
[0094] In addition to contrast, the correlation, energy, and entropy corresponding to the texture features are also calculated. These parameters provide more information about the texture features. The correlation describes the similarity between the pixel values in the texture feature. Specifically, the correlation is calculated by the grayscale relationship between the specified pixel point and its associated pixel point in the normalized grayscale co-occurrence matrix. Energy reflects the activity of the texture feature. Specifically, the energy value is obtained by calculating the sum of the squares of all elements in the normalized grayscale co-occurrence matrix. Entropy is an indicator that describes the complexity of the texture feature. Specifically, the entropy value of each element in the normalized grayscale co-occurrence matrix is calculated and summed up to obtain the entropy of the entire texture feature.
[0095] 104. Based on statistics, the deviation between the texture feature and the standard texture feature is determined, and when the deviation is greater than a preset difference threshold, an alarm message is generated to realize intelligent identification of dangerous situations.
[0096] Specifically, in one embodiment of the present application, when the deviation is greater than a preset difference threshold, the server determines abnormal texture features and position information corresponding to the abnormal texture features in the grayscale image; generates alarm information corresponding to the abnormal texture features, and sends the alarm information to the corresponding management personnel, so as to judge and mark the dangerous situation based on the alarm information, thereby realizing intelligent identification of the dangerous situation; receives feedback data corresponding to the alarm information, and optimizes the difference threshold based on the feedback data.
[0097] In one embodiment, in the intelligent recognition system for dangerous situations, it is necessary not only to be able to accurately identify the texture features of the danger, but also to issue an alarm in a timely manner when an abnormality is found, and allow management personnel to make judgments and annotations based on the alarm information, while continuously optimizing the system's recognition capabilities.
[0098] The system first performs texture analysis on the grayscale image, extracts texture features, and compares them with expected texture features. If the deviation between the two is greater than the preset difference threshold, the system considers that there are abnormal texture features in the image. At this time, the system records these abnormal texture features and determines the corresponding location information in the grayscale image.
[0099] Once the abnormal texture features and their location information are determined, the system will generate a corresponding alarm message. This alarm message will include the description of the abnormal texture features, location information, and possible dangerous situations. Then, the system will send the alarm message to the corresponding management personnel so that they can judge and mark the dangerous situations in time.
[0100] After receiving the alarm information, the manager will conduct an on-site inspection of the guard and confirm or deny the alarm information based on the actual situation. Then, the feedback data will be sent back to the system. The system will optimize the difference threshold based on this feedback data to improve the accuracy of future identification. For example, if the manager finds that the system often falsely reports a certain type of dangerous situation, the system can adjust the difference threshold accordingly to reduce the occurrence of such false alarms.
[0101] It is understandable that traditional manual inspection of dikes requires a lot of manpower and is inefficient, while intelligent recognition methods can automatically complete most inspection work, thereby reducing dependence on human resources. In addition, under extreme weather conditions such as floods, manual inspection of dikes poses a greater safety risk, while intelligent recognition methods can reduce the risk of people entering dangerous areas through remote control or autonomous flight.
[0102] The above is an embodiment of the method proposed in this application. Based on the same inventive concept, the embodiment of this application also provides an intelligent identification device for preventing dangerous situations based on drones, and its structure is as follows: Figure 2 shown.
[0103] Figure 2 The internal structure diagram of a drone-based intelligent identification device for preventing dangerous situations provided in an embodiment of the present application is shown in FIG. Figure 2 As shown, the device includes:
[0104] at least one processor;
[0105] and, a memory communicatively coupled to the at least one processor;
[0106] The memory stores instructions that can be executed by at least one processor, and the instructions are executed by at least one processor to enable the at least one processor to:
[0107] Convert the collected warning image into a corresponding grayscale image, determine the horizontal edge strength and the vertical edge strength of each image position in the grayscale image based on the horizontal edge detection convolution kernel and the vertical edge detection convolution kernel, and calculate the total edge strength corresponding to each image position;
[0108] Based on the magnitude relationship between the total edge intensity and the preset intensity threshold, edge points in the grayscale image are determined to form an edge detection image corresponding to the edge points, and pixel points are obtained based on the distance and direction between the predetermined pixel pairs to construct a grayscale co-occurrence matrix;
[0109] Normalizing the gray-level co-occurrence matrix, and determining the texture features to be guarded against in the edge detection image by texture analysis technology, so as to calculate the statistics corresponding to the texture features based on the normalized gray-level co-occurrence matrix; wherein the statistics include contrast, correlation, energy and entropy;
[0110] Based on statistics, the deviation between texture features and standard texture features is determined, and when the deviation is greater than a preset difference threshold, an alarm message is generated to achieve intelligent identification of dangerous situations.
[0111] The present application also provides a non-volatile computer storage medium storing computer executable instructions. When the computer executable instructions are executed, they can:
[0112] Convert the collected warning image into a corresponding grayscale image, determine the horizontal edge strength and the vertical edge strength of each image position in the grayscale image based on the horizontal edge detection convolution kernel and the vertical edge detection convolution kernel, and calculate the total edge strength corresponding to each image position;
[0113] Based on the magnitude relationship between the total edge intensity and the preset intensity threshold, edge points in the grayscale image are determined to form an edge detection image corresponding to the edge points, and pixel points are obtained based on the distance and direction between the predetermined pixel pairs to construct a grayscale co-occurrence matrix;
[0114] Normalizing the gray-level co-occurrence matrix, and determining the texture features to be guarded against in the edge detection image by texture analysis technology, so as to calculate the statistics corresponding to the texture features based on the normalized gray-level co-occurrence matrix; wherein the statistics include contrast, correlation, energy and entropy;
[0115] Based on statistics, the deviation between texture features and standard texture features is determined, and when the deviation is greater than a preset difference threshold, an alarm message is generated to achieve intelligent identification of dangerous situations.
[0116] Each embodiment in this application is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0117] The above describes specific embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0118] The devices and media provided in the embodiments of the present application correspond one-to-one to the methods. Therefore, the devices and media also have similar beneficial technical effects as the corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the devices and media will not be repeated here.
[0119] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0120] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0121] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0122] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0123] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0124] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0125] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0126] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0127] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A method for intelligently identifying dangerous situations based on drones, characterized in that: The method comprises: Converting the collected warning image into a corresponding grayscale image, determining the horizontal edge strength and the vertical edge strength of each image position in the grayscale image based on a horizontal edge detection convolution kernel and a vertical edge detection convolution kernel, and calculating the total edge strength corresponding to each image position; Based on the magnitude relationship between the total edge intensity and a preset intensity threshold, edge points in the grayscale image are determined to form an edge detection image corresponding to the edge points, and pixel points are acquired based on the distance and direction between predetermined pixel pairs to construct a grayscale co-occurrence matrix; Normalizing the gray level co-occurrence matrix, and determining the texture features to be guarded against in the edge detection image by texture analysis technology, so as to calculate the statistics corresponding to the texture features based on the normalized gray level co-occurrence matrix; wherein the statistics include contrast, correlation, energy and entropy; Based on the statistics, the deviation between the texture feature and the standard texture feature is determined, and when the deviation is greater than a preset difference threshold, an alarm message is generated to achieve intelligent identification of dangerous situations.
2. The method for intelligently identifying dangerous situations based on drones according to claim 1 is characterized in that: The step of converting the collected warning image into a corresponding grayscale image specifically includes: Determine a warning area with a need for warning danger identification, and collect images of the warning area by using a drone to obtain a warning image corresponding to the warning area; The guard image is edge processed to convert the processed guard image into a grayscale image, and at least one column of zero-valued pixels is added on each side of the grayscale image.
3. The method for intelligently identifying dangerous situations based on drones according to claim 1, characterized in that: The step of determining the horizontal edge intensity and the vertical edge intensity of each image position in the grayscale image based on the horizontal edge detection convolution kernel and the vertical edge detection convolution kernel specifically includes: Determine a horizontal edge detection convolution kernel and a vertical edge detection convolution kernel to multiply each element in the convolution kernel by a pixel value at a corresponding image position to obtain a corresponding pixel product; The pixel value of the image position corresponding to the element is added to the product of the pixel corresponding to the element to obtain the horizontal edge strength and the vertical edge strength corresponding to the image position.
4. The method for intelligently identifying dangerous situations based on drones according to claim 1, characterized in that: The calculating the total edge strength corresponding to each image position specifically includes: The total edge intensity corresponding to each image position in the grayscale image is calculated by the following formula: Wherein, y represents the total edge intensity corresponding to the image position in the grayscale image, a represents the horizontal edge intensity, and b represents the vertical edge intensity.
5. The method for intelligently identifying dangerous situations based on drones according to claim 1, characterized in that: The step of determining edge points in the grayscale image based on the magnitude relationship between the total edge intensity and the preset intensity threshold, and forming an edge detection image corresponding to the edge points, specifically includes: Comparing the total edge intensity corresponding to each image position in the grayscale image with a preset intensity threshold, and determining the image position where the total edge intensity is greater than the preset intensity threshold, so as to obtain the edge point corresponding to the image position; Each edge point in the grayscale image is displayed by binarization to form an edge detection image corresponding to the edge point.
6. The method for intelligently identifying dangerous situations based on drones according to claim 1, characterized in that: The step of acquiring pixel points based on the predetermined distance and direction between pixel pairs to construct a gray level co-occurrence matrix specifically includes: Acquire pixel points based on the predetermined distance and direction between pixel pairs, determine associated pixel points in the grayscale image that are pixel pairs with the designated pixel points, and obtain a grayscale combination corresponding to the designated pixel points and the associated pixel points; The number of occurrences of each grayscale combination in the grayscale image is determined, and the number of occurrences of each grayscale combination in the grayscale image is arranged into a corresponding grayscale co-occurrence matrix.
7. The method for intelligently identifying dangerous situations based on drones according to claim 1, characterized in that: The method of determining the texture features to be guarded against in the edge detection image by using the texture analysis technology, and calculating the statistics corresponding to the texture features based on the normalized gray level co-occurrence matrix, specifically includes: Based on the texture analysis technology, determining the texture features to be guarded against in the edge detection image, and adjusting the grayscale corresponding to the texture features through the histogram equalization technology; Calculating the contrast corresponding to the texture feature according to the number of occurrences of the gray level combination and the pixel value corresponding to the specified pixel point in the normalized gray level co-occurrence matrix; According to the pixel value corresponding to the designated pixel point in the normalized gray level co-occurrence matrix, the correlation, energy and entropy corresponding to the texture feature are calculated.
8. The method for intelligently identifying dangerous situations based on drones according to claim 1, characterized in that: When the deviation is greater than a preset difference threshold, generating an alarm message to realize intelligent identification of dangerous situations specifically includes: In the case where the deviation is greater than a preset difference threshold, determining an abnormal texture feature in the grayscale image and position information corresponding to the abnormal texture feature; Generate warning information corresponding to the abnormal texture feature, and send the warning information to the corresponding management personnel, so as to judge and mark the dangerous situation based on the warning information, so as to realize intelligent identification of the dangerous situation; Feedback data corresponding to the alarm information is received, and the difference threshold is optimized according to the feedback data.
9. An intelligent identification device for preventing dangerous situations based on drones, characterized in that: The device comprises: at least one processor; and, a memory communicatively coupled to the at least one processor; The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the intelligent identification method for preventing dangerous situations based on a drone as described in any one of claims 1-8.
10. A non-volatile computer storage medium storing computer executable instructions, characterized in that: When the computer executable instructions are executed, the method for intelligently identifying dangerous situations based on drones as described in any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Image edge detection method, and image target identification method and device
CN104077773A
Two-time-phase remote sensing image change detection method
CN107423771A
Method and device of identifying unused ground soil pollution risk region
CN108805920A
Underwater image quality real-time evaluation method
CN111899261A
Flood detection method based on SAR (Synthetic Aperture Radar) image
CN114219800A
Cited By
Knitted fabric pattern defect detection method and device
CN121324379A
