A city rail flood and cold prevention early warning system and method based on image fingerprint features
By using an image fingerprint-based early warning system to monitor urban rail transit disasters with existing video equipment, the shortcomings of traditional methods such as manual inspection and high-cost sensors are overcome. This enables rapid identification and quantitative analysis of water accumulation, snow accumulation, and icing disasters, thereby improving the safety of subway operations.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-23
- Publication Date
- 2026-03-27
AI Technical Summary
Existing technologies rely on manual inspections to identify and assess disasters such as water accumulation, snow accumulation, and icing in urban rail transit. This results in untimely risk detection and high costs. Furthermore, sensor facilities require dedicated power supplies and network communication, making construction and maintenance difficult and resulting in low detection accuracy.
An early warning system based on image fingerprint features is adopted. Through image acquisition, segmentation, hash sequence analysis and Hamming distance calculation, it can realize real-time identification and quantitative analysis of disasters. It can be monitored in combination with existing video equipment without the need for additional power and communication facilities.
It enables rapid and accurate identification and quantitative analysis of water accumulation, snow accumulation, and icing disasters, improving disaster response capabilities, reducing hardware costs, and ensuring the safety of subway operations.
Smart Images

Figure CN115409853B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to urban rail transit intelligent protection, in particular to a city rail flood and cold prevention early warning system and method based on image fingerprint features. BACKGROUND
[0002] Urban rail transit is the backbone of urban public transportation and the main artery of passenger flow transportation. The safe operation of urban rail transit has become the focus of social attention. At present, the identification and assessment of disaster risks such as water accumulation, snow accumulation, and icing of metro and other rail transit facilities to a certain extent rely on staff inspection work and subjective judgment. The disaster discovery process requires the participation of a large number of personnel, resulting in poor risk avoidance ability, untimely risk discovery, and low disposal efficiency. How to quickly and accurately identify water accumulation, snow accumulation, and icing conditions through scientific and effective methods, and to take appropriate defensive measures to eliminate safety hazards in a timely manner, is a key problem that needs to be solved in urban rail transit at the present stage.
[0003] Traditional disaster monitoring of water accumulation, snow accumulation, and icing generally relies on water level sensors, temperature sensors, radar sensors, and other sensing facilities, which require dedicated power supply and network communication facilities. This approach has the problems of high cost, high construction and maintenance difficulty, etc. Using computer vision technology to identify water accumulation, snow accumulation, and icing scenarios can directly deploy a detection system in the video monitoring center without the need for additional power supply and communication lines on the road surface, which has the advantages of flexibility and low cost. In recent years, a series of detection algorithms have emerged that use texture, color, and edge features to identify water accumulation, snow accumulation, and icing scenarios. However, such technologies are easily disturbed by noise, have low detection accuracy, and cannot provide quantitative disaster situation analysis. SUMMARY
[0004] The present application aims to provide a city rail flood and cold prevention early warning system and method based on image fingerprint features, which can quickly and accurately identify water accumulation, snow accumulation, and icing disasters and provide quantitative disaster analysis to help quickly respond to emergencies and improve disaster response capabilities.
[0005] Technical solution: In a first aspect, a city rail flood and cold prevention early warning system based on image fingerprint features includes:
[0006] An image acquisition module is used to acquire video transmission of a monitoring area to a monitoring coordinate and area database construction module.
[0007] A coordinate and area database construction module is used to divide the video image into multiple slice units of the same size, correspond the pixel coordinates and pixel area of each slice unit to the actual spatial coordinates and actual spatial area of the monitoring area, and store them in the coordinate and area database.
[0008] A disaster sample feature library construction module is configured to use H, S, and V three-dimensional space analysis to construct a hash sequence as an image fingerprint feature of each slice unit based on a plurality of slice units of the same size obtained after segmentation of historical water accumulation, snow accumulation, and ice accumulation sample images, and input the image fingerprint feature into the disaster identification module.
[0009] A real-time image feature extraction module is configured to use H, S, and V three-dimensional space analysis to construct a hash sequence as an image fingerprint feature of each slice unit based on a plurality of slice units of the same size obtained after segmentation of real-time images of a monitoring area, and input the image fingerprint feature into the disaster identification module.
[0010] A disaster identification module is configured to calculate a Hamming distance between the fingerprint feature of each slice unit of a real-time image and the fingerprint feature of a sample image slice unit, determine the attribute of each slice unit based on the Hamming distance, and transmit the attribute to the disaster positioning module and the disaster area and depth detection module.
[0011] A disaster positioning module is configured to retrieve spatial coordinates corresponding to water accumulation, snow accumulation, and ice accumulation slice units from a regional coordinate database, calculate a center of gravity coordinate, and determine the position of a disaster in a monitoring area.
[0012] A disaster area and depth detection module is configured to count the number of water accumulation, snow accumulation, and ice accumulation slice units that are determined, combine the actual spatial area corresponding to the slice units, determine the area of a water accumulation, snow accumulation, and ice accumulation region, and for a water accumulation scenario, identify the depth of the water accumulation by calibration position detection and measurement.
[0013] An intelligent early warning module is configured to trigger an emergency plan in a warning plan library according to a disaster detection result, and push an alarm information to relevant staff for processing.
[0014] In a second aspect, a city rail flood and cold prevention early warning method based on image fingerprint features includes the following steps:
[0015] Sample images of historical water accumulation, snow accumulation, and ice accumulation in a monitoring area are segmented to obtain a plurality of slice units of the same size, and H, S, and V three-dimensional space analysis is used to construct a hash sequence as an image fingerprint feature of each slice unit.
[0016] Real-time images of a monitoring area are segmented to obtain a plurality of slice units of the same size, and H, S, and V three-dimensional space analysis is used to construct a hash sequence as an image fingerprint feature of each slice unit.
[0017] The Hamming distance between the fingerprint feature of each slice unit of a real-time image and the fingerprint feature of a sample image slice unit is calculated, and the attribute of each slice unit is determined based on the Hamming distance.
[0018] Retrieving spatial coordinates corresponding to the waterlogging, snow, and icing slice units from a regional coordinate database, and calculating the barycentric coordinates to determine the location of the disaster in the monitoring area, wherein the regional coordinate database includes the correspondence between the pixel coordinates of each slice unit of the real-time image and the actual spatial coordinates of the monitoring area, and the correspondence between the pixel area of the slice unit and the actual spatial area of the monitoring area;
[0019] Counting the number of slice units determined as waterlogging, snow, and icing slice units, and judging the area of the waterlogging, snow, and icing region in combination with the actual spatial area corresponding to the slice units; for the waterlogging scenario, identifying the waterlogging depth through calibration position detection and measurement;
[0020] According to the disaster detection result, triggering the emergency plan in the early warning plan library, and pushing the alarm information to the relevant staff for processing.
[0021] Further, the H, S, and V three-dimensional space analysis is used to construct a hash sequence as the image fingerprint feature of each slice unit, including:
[0022] A three-dimensional coordinate system is established with the image row direction as the positive direction of the x-axis, the image column direction as the positive direction of the y-axis, and the C component value of the pixel as the z-axis coordinate, wherein C ∈ {H, S, V}, the C component of the pixel at the two-dimensional image pixel position (i, j) is defined as L C (i, j), and the coordinates in the three-dimensional space are mapped as (i, j, L C (i, j)), the C components L C (i+1, j), L C (i-1, j), L C (i, j+1), and L C (i, j-1) at the four pixel positions (i+1, j), (i-1, j), (i, j+1), and (i, j-1) above, below, left, and right of the pixel position (i, j) are mapped to the coordinates in the three-dimensional coordinate system as (i+1, j, L C (i+1, j)), (i-1, j, L C (i-1, j)), (i, j, L C (i, j+1)), (i, j, L C (i, j-1)), the barycentric coordinates O C of the quadrilateral surrounded by the four points (i+1, j, L C (i+1, j)), (i-1, j, L C (i-1, j)), (i, j, L C (i, j+1)), and (i, j, L i,j (i, j-1)) in the three-dimensional space are calculated, and the point (i, j, L C (i, j)) is calculated from Oi,j The distance D(i, j) between the two pixels is calculated, and a distance feature matrix D is constructed:
[0023]
[0024] where N represents the row width and column width of the N-pixel * N-pixel slice unit;
[0025] Based on the distance feature matrix D, if the distance value at the corresponding position is greater than the preset threshold T, then 1 is set, otherwise 0 is set;
[0026] The spatial distance matrix elements of the H component, S component, and V component are combined in order to form a hash sequence G based on HSV space analysis, which is used as the image fingerprint feature of each slice unit.
[0027] Further, the Hamming distance between the fingerprint feature of the real-time image slice unit and the sample image slice unit fingerprint feature is calculated, and the slice unit attributes are determined based on the Hamming distance, including:
[0028] The fingerprint features of the slice units are compared bit by bit through the XOR operation, and the sum is calculated according to the following formula:
[0029]
[0030] In the formula, x C [i] is the fingerprint feature of the C component of the i-th slice unit in the sample feature library, y C [i] is the fingerprint feature of the C component of the i-th slice unit in the real-time image, C ∈ {H, S, V}, representing the H channel, S channel, and V channel, respectively;
[0031] According to the weights of different components of H, S, and V, the weighted similarity value of the image fingerprint feature is calculated:
[0032]
[0033] In the formula, w C represents the weight corresponding to the C component, D C represents the Hamming distance corresponding to the C component;
[0034] If the weighted similarity value of the i-th slice unit fingerprint feature is less than the preset threshold T, then the weighted similarity value is put into set A, and the average value of the weighted similarity values in set A is calculated:
[0035]
[0036] In the formula, P i (x, y) represents the weighted similarity value of the i-th slice unit fingerprint feature in set A, Z is the total number of elements in set A, L represents one of the three types of waterlogging, snow, and icing, and DL (x, y) as the fingerprint feature of the final determined real-time image slice unit and the Hamming distance of the sample image slice unit fingerprint feature;
[0037] Taking the sample library category corresponding to the minimum value of the final determined Hamming distance as the attribute of the real-time image slice unit.
[0038] Further, the determination of the location of the disaster in the monitoring area comprises:
[0039] The slice units identified as water accumulation, snow accumulation, and icing area are put into set B, the pixel coordinates of each slice unit in the slice unit set B are counted, the corresponding actual spatial coordinates are found from the coordinate database, and the actual spatial coordinates of the four vertices of the minimum circumscribed rectangle of the water accumulation, snow accumulation, and icing area are analyzed. The center of the minimum circumscribed rectangle is taken as the actual position coordinates of the water accumulation, snow accumulation, and icing area.
[0040] Further, the identification of the water accumulation depth through calibration position detection and measurement comprises:
[0041] A plurality of depth marker positions are marked in the water accumulation detection monitoring area. When it is determined that the detection area image is water accumulation, the identification images corresponding to each depth marker position are sequentially segmented, and after being converted into a 64-level grayscale image, the discrete cosine transform matrix of the grayscale image is calculated, the average value of the discrete cosine transform matrix of the 64 pixel values is calculated, and finally the values in the discrete cosine transform matrix that are greater than or equal to the average value are set to 1 and the values that are less than the average value are set to 0 to obtain the image fingerprint of the 64-bit hash sequence.
[0042] Based on the hash feature of the marker position area image, the hash features of each depth preset position image of the water accumulation depth preset position initial image are combined, and the feature similarity of the two is calculated. When the feature similarity of the two is less than a specified threshold D, it is determined that the water accumulation depth does not reach the marker position. Otherwise, it is determined that the water accumulation depth reaches the marker position.
[0043] Further, the method further comprises:
[0044] The detected disaster area Q k The curve function is obtained by least squares fitting And the partial derivative is obtained, and the disaster area change measure value is obtained Based on γ, the disaster trend analysis is performed. When γ is greater than zero, it indicates that the disaster area is increasing. When γ is less than zero, it indicates that the disaster area is decreasing. The greater |γ| is, the faster the disaster area changes.
[0045] In a third aspect, a computer device comprises a memory storing one or more programs; and a processor communicatively coupled to the memory and configured to execute the programs, which, when executed by the processor, implement the image fingerprint feature-based metro flood and cold prevention early warning method according to the second aspect of the present application.
[0046] In a fourth aspect, a non-transitory processor-readable storage medium has stored thereon processor-executable instructions, which, when executed by a processor of a mobile terminal, implement the image fingerprint feature-based metro flood and cold prevention early warning method according to the second aspect of the present application.
[0047] Advantages:
[0048] 1. The present application collects a large number of historical water accumulation, snow accumulation and icing images, adopts a hash sequence construction algorithm based on HSV space analysis, extracts image fingerprint features, and constructs a sample image feature library, which more comprehensively and accurately represents the images and has strong robustness; by establishing a water accumulation, snow accumulation and icing disaster detection model, extracting real-time image fingerprint features of a monitoring area, calculating the Hamming distance of the fingerprint features in the sample image feature library, real-time, accurate and effective identification of water accumulation, snow accumulation and icing disasters is achieved; by dividing image slice units, establishing the correspondence between the pixel coordinates and areas of each slice unit and the actual coordinates and areas of the monitoring area, quantitative analysis of the position and area of the water accumulation, snow accumulation and icing area is achieved. In addition, by setting a depth detection flag, the similarity of the flag in the water accumulation and snow accumulation state and the flag in the normal state is measured based on the Hamming distance, and then the depth of water accumulation and snow accumulation is judged. The present application combines the spatio-temporal evolution characteristics of water accumulation, snow accumulation and icing, comprehensively analyzes the disaster detection confidence, provides quantitative disaster severity judgment, effectively helps metro operation personnel to timely control the disaster situation, and ensures the safety and stability of metro operation during heavy rain and snow.
[0049] 2. The present application fully utilizes the existing video equipment of the metro for monitoring, the hardware cost is negligible, computer vision and image processing technology are adopted for all-weather uninterrupted monitoring of each point, without manual intervention, once the disaster conditions such as water accumulation and snow accumulation are monitored, the system automatically generates early warning data, informs the monitoring and management center, and reminds the relevant personnel to handle it in time. The present application effectively improves the timeliness and accuracy of metro operation personnel in identifying disasters such as water accumulation, snow accumulation and icing, which helps decision makers to quickly respond to emergencies, and thus better realizes disaster early warning and control, comprehensive coordination management, unified emergency command and efficient intelligent linkage. BRIEF DESCRIPTION OF DRAWINGS
[0050] Figure 1 The system block diagram of the present application;
[0051] Figure 2A flow chart of a flood and cold prevention early warning method based on image fingerprint features for urban rail transit;
[0052] Figure 3 A flow chart of image fingerprint feature extraction based on HSV space analysis;
[0053] Figure 4 A flow chart of determining disaster attribute based on images. DETAILED DESCRIPTION
[0054] The technical solutions of the present application are further described below in combination with the drawings.
[0055] The present application proposes a flood prevention early warning system for urban rail transit based on image fingerprint features, which comprises an image acquisition module, a coordinate and area database construction module, a disaster sample feature library construction module, a real-time image feature extraction module, a disaster identification module, a disaster positioning module, a disaster area and depth detection module, and an intelligent early warning module, and the connection relationship of the various modules is as shown in Figure 1 The present application proposes a flood prevention early warning system for urban rail transit based on image fingerprint features, which comprises an image acquisition module, a coordinate and area database construction module, a disaster sample feature library construction module, a real-time image feature extraction module, a disaster identification module, a disaster positioning module, a disaster area and depth detection module, and an intelligent early warning module, and the connection relationship of the various modules is as shown in
[0056] The image acquisition module: acquires the video of the monitoring area and transmits it to the monitoring area coordinate database construction module, and transmits the monitoring video of the water accumulation, snow accumulation and icing state of the same period in previous years to the disaster sample feature library construction module, and transmits the acquired real-time monitoring video image to the real-time image feature extraction module.
[0057] The coordinate and area database construction module: divides the image acquired by the camera into a plurality of slice units of the same size, and stores the pixel coordinates and pixel area of each slice unit in the coordinate and area database corresponding to the actual spatial coordinates and actual spatial area of the monitoring area.
[0058] The disaster sample feature library construction module: acquires historical water accumulation, snow accumulation and icing sample images, divides them into a plurality of slice units of the same size, constructs a hash sequence based on H, S and V three-dimensional space analysis as the image fingerprint features of each slice unit, and inputs the disaster identification module.
[0059] The real-time image feature extraction module: divides the acquired real-time image of the monitoring area into a plurality of slice units of the same size, constructs a hash sequence based on H, S and V three-dimensional space analysis as the image fingerprint features of each slice unit, and inputs the disaster identification module.
[0060] The disaster identification module: calculates the fingerprint features of each slice unit of the real-time image, the Hamming distance of the fingerprint features of each slice unit of the real-time image and the water accumulation, snow accumulation and icing sample image slice unit, analyzes the Hamming distance to determine the attribute of each slice unit, and transmits it to the disaster positioning module and the disaster area and depth detection module.
[0061] Disaster location module: retrieve the spatial coordinates corresponding to the water accumulation, snow accumulation and icing slice units from the monitoring area coordinate database, and calculate the center of gravity coordinates to determine the location of the disaster in the monitoring area.
[0062] Disaster area and depth detection module: count the number of water accumulation, snow accumulation and icing slice units, and combine the actual spatial area corresponding to the slice units to determine the area of the water accumulation, snow accumulation and icing area. For water accumulation scenarios, the water depth is identified through calibration position detection and measurement.
[0063] Intelligent early warning module: according to the disaster detection result, trigger the emergency plan in the early warning plan library, and push it to the relevant staff for processing through the alarm, system alarm, APP alarm, WeChat applet alarm and SMS alarm.
[0064] Based on the above urban rail flood and cold prevention early warning system, the specific processing and analysis process includes the following steps, as shown in Figure 2
[0065] Step 1: video stream frame extraction decoding and format conversion.
[0066] The video stream is transmitted and collected through the standard video stream protocol RTSP, and decoded to generate continuous frame images.
[0067] In one embodiment, the operation of video stream frame extraction decoding and format conversion in step 1 can be completed by the image acquisition module.
[0068] Step 2: establish a region coordinate database.
[0069] Obtain images through multiple cameras in the monitoring area, divide the pixels of the images according to N pixels*N pixels to obtain multiple slice units, and use manual labeling to obtain the center pixel coordinates, actual coordinates and area of each slice unit corresponding to the monitoring area, and save them to the region coordinate database.
[0070] In one embodiment, the operation of establishing a region coordinate database in step 2 can be completed by the coordinate and area database construction module.
[0071] Step 3: construct a water accumulation, snow accumulation and icing disaster sample image fingerprint feature library.
[0072] Referring to Figure 3 , step 3 specifically includes:
[0073] Step 3.1: collect water accumulation, snow accumulation and icing disaster images from the historical video of the monitoring area, and divide each frame into multiple slice units according to N pixels*N pixels.
[0074] Step 3.2: Perform image enhancement and wavelet filtering on each slice unit to reduce the impact of lighting and noise on the image.
[0075] Step 3.3: Calculate the normalized hue, saturation, and luminance values for each frame of the image, i.e., the normalized HSV information:
[0076]
[0077]
[0078]
[0079] In this context, R, G, and B represent the red, green, and blue color components of an image pixel, respectively, while H, S, and V represent the hue, saturation, and brightness components of the HSV color space.
[0080] A three-dimensional coordinate system is established with the row direction of the image as the positive x-axis, the column direction as the positive y-axis, and the H component value of the pixel as the z-axis coordinate. The H component of the pixel at pixel position (i, j) in the two-dimensional image is defined as L. H (i, j), mapped to coordinates (i, j, L) in three-dimensional space. H (i, j)). The H component L at the four pixel positions (i+1, j), (i-1, j), (i, j+1), and (i, j-1) above, below, left, and right of pixel position (i, j). H (i+1, j), L H (i-1, j), L H (i, j+1), L H The coordinates (i, j-1) mapped to in the three-dimensional coordinate system are (i+1, j, L). H (i+1, j)), (i-1, j, L) H (i-1, j)), (i, j, L) H (i, j+1)), (i, j, L) H (i, j-1)), find the coordinates (i+1, j, L) H (i+1, j)), (i-1, j, L) H (i-1, j)), (i, j, L) H (i, j+1)), (i, j, L) H The centroid coordinates O of the quadrilateral formed by the four points (i, j-1) in three-dimensional space. i,j For (X) i,j Y i,j Z i,j Find the point (i, j, L). H (i, j)) and O i,jThe distance D(i, j) between two pixels is calculated as follows:
[0081] The distance matrix D is obtained as follows:
[0082]
[0083] where N is the row width and column width of the N-pixel * N-pixel slice unit. Similarly, the spatial distance matrix of the S component and the V component is obtained.
[0084] A threshold T is set. If the distance value of the corresponding position is greater than the threshold T, 1 is set, otherwise 0 is set. All elements of the spatial distance matrix of the H component, the S component and the V component are combined in order to form a hash sequence G based on the HSV space analysis. The obtained hash sequence can be referred to as a sample image slice unit fingerprint feature, or a sample slice unit fingerprint feature, or a sample slice unit fingerprint, or a sample slice unit feature. All sample slice unit fingerprint features constitute a sample image fingerprint feature library.
[0085] In an embodiment, the operation of constructing the waterlogging, snow accumulation and icing disaster sample image fingerprint feature library in step 3 can be completed by a disaster sample feature library construction module.
[0086] Step 4: Real-time image fingerprint feature extraction.
[0087] Step 4 specifically includes the following steps:
[0088] Step 4.1: For the collected real-time image, the N-pixel * N-pixel is divided into multiple slice units;
[0089] Step 4.2: According to the feature extraction algorithm of step 3.3, the fingerprint feature of each slice unit is calculated, which is referred to as a real-time slice unit image fingerprint feature, or a real-time slice unit fingerprint feature, or a real-time slice unit fingerprint, or a real-time slice unit feature.
[0090] In an embodiment, the operation of real-time image fingerprint feature extraction in step 4 can be completed by a real-time image feature extraction module.
[0091] Step 5: Disaster identification based on the extracted features.
[0092] Referring to Figure 4 , the Hamming distance between the H channel, S channel and V channel fingerprint features of each slice unit and the image fingerprint in the waterlogging, snow accumulation and icing sample feature library is analyzed. The greater the Hamming distance, the higher the degree of inconsistency of the image, and vice versa. The smaller the Hamming distance, the more similar the image.
[0093] Taking the H channel as an example, the fingerprint features of the slice units are compared bit by bit through the exclusive or operation, and the sum is calculated according to the following formula:
[0094]
[0095] where x H [i] is the fingerprint feature of the H component of the i-th slice unit in the sample feature library, y H [i] is the fingerprint feature of the H component of the i-th slice unit in the real-time image.
[0096] Similarly, the fingerprint features of the S component and the V component are calculated respectively.
[0097] According to the weights of the H, S, and V components, the final weighted similarity value of the hash sequence is calculated:
[0098]
[0099] where C ∈ {H, S, V} respectively represent the H channel, the S channel, and the V channel, w C represents the weight corresponding to the C component, D C represents the Hamming distance corresponding to the C component. The weighted similarity value is also called the weighted Hamming distance.
[0100] A threshold T is set. If the weighted Hamming distance of the i-th slice unit is less than the threshold T, the weighted Hamming distance is put into set A, and the average value of the weighted Hamming distances in set A is calculated. Taking the weighted Hamming distance average value of the water accumulation image fingerprint as an example:
[0101]
[0102] where Z is the number of image fingerprint features in set A, P i (x, y) is the weighted Hamming distance of the i-th slice unit image fingerprint feature in set A.
[0103] Similarly, the weighted Hamming distance average values D S (x, y), D B (x, y) of the snow accumulation image fingerprint and the icing image fingerprint are calculated respectively. The sample library category corresponding to the smallest weighted Hamming distance average value is selected as the attribute of the slice unit. If the weighted Hamming distance is greater than a preset threshold, it is determined that the attribute of the slice unit is not one of water accumulation, snow accumulation, and icing.
[0104] In an embodiment, the operation of disaster identification in step 5 can be completed by a disaster identification module.
[0105] Step 6, disaster detection confidence calculation.
[0106] Through the strategy of multi-frame confidence analysis, the accuracy of disaster detection is improved. While extracting the image for classification, the counters C, C w , and Cs , C r , C, C w , C s , C r respectively represent the detection frame number, water, snow and ice detection result cumulative frame number, every frame is identified, then C is accumulated by 1, if the classification result is water, then C w is accumulated by 1, if the classification result is snow, then C s is accumulated by 1; if the classification result is ice, then C r is accumulated by 1; when C accumulates to a certain number such as 200 frames, the confidence α w , α s , a r of water, snow and ice is respectively counted
[0107]
[0108]
[0109]
[0110] Set the confidence threshold L, when α r >L, and α r =max(a w , α s , α r ), it is determined that the category is water; when α w >L, and α w =max(α w , a s , α r ), it is determined that the category is snow; when α s >L, and α s =max(a w , a s , α r ), it is determined that the category is ice.
[0111] In one embodiment, the operation of disaster detection confidence calculation in step 6 can be completed by the disaster identification module.
[0112] Step 7, disaster location, area and depth detection is performed.
[0113] (1) Disaster location detection.
[0114] According to the pixel coordinates of the slice unit identified as water accumulation, snow, or ice in the image, the corresponding actual spatial coordinates are found in the coordinate database, so as to determine the actual position of the water accumulation, snow, or ice area. For example, the area identified as water accumulation is composed of a slice unit set B, the pixel coordinates of each slice unit in the slice unit set B are counted, the corresponding actual spatial coordinates are found in the coordinate database, and the actual spatial coordinates of the four vertices of the minimum circumscribed rectangle of the water accumulation area are analyzed, so as to take the center of the minimum circumscribed rectangle as the actual position coordinate of the water accumulation area.
[0115] In one embodiment, the operation of disaster position detection in step 7 can be completed by a disaster positioning module.
[0116] (2) Disaster area detection.
[0117] According to the corresponding relationship between the pixel area of the slice unit identified as water accumulation, snow, or ice and the actual spatial area, the actual area of the water accumulation, snow, or ice area is calculated.
[0118] Taking the calculation of the water accumulation disaster area in the kth image as an example:
[0119]
[0120] In the formula, Q n The actual area of the nth slice unit detected as water accumulation is N, and N is the total number of slice units detected as water accumulation.
[0121] (3) Water depth detection.
[0122] In the water accumulation detection monitoring area, color bars and other marks are used to mark 5cm, 10cm, 15cm, etc. depth mark positions, when the image of the detection area is determined to be water accumulation, the corresponding mark images of each depth mark position are segmented in turn, converted into 64-level grayscale images, and the discrete cosine transform (DCT) matrix of the grayscale image is calculated.
[0123] The average value of the DCT matrix of 64 pixel values is calculated, and finally the value in the DCT matrix greater than or equal to the average value is set to 1, and the value less than the average value is set to 0, to obtain the image fingerprint of the 64-bit hash sequence.
[0124] The hash feature of the mark position area image is extracted, combined with the hash features of each depth preset position image of the water depth preset position initial image, and the image feature similarity determination method based on Hamming distance is used to detect whether the depth mark position is water accumulation.
[0125] Taking the detection of the 5cm mark position as an example, the Hamming distance calculation formula is as follows:
[0126]
[0127] In the formula, p[i] is the image fingerprint feature of the 5cm mark area in the real-time image, and q[i] is the image fingerprint feature of the 5cm mark in the non-flood normal state.
[0128] When the flood is detected, a threshold D is set, and when the similarity s(x, y) is less than the threshold D, it is determined that the flood depth does not reach the mark; otherwise, it is determined that the flood depth reaches the mark.
[0129] In an embodiment, the operation of disaster area detection and flood depth detection in step 7 can be completed by a disaster area and depth detection module.
[0130] (4) Disaster location, area, and depth evolution trend analysis.
[0131] In an embodiment, the disaster location evolution trend analysis in step 7 can be completed by a disaster location module, and the area and depth evolution trend analysis can be completed by a disaster area and depth detection module.
[0132] Taking the flood area evolution trend analysis as an example, the detected flood area Q k The least square method is used to fit the curve function And the partial derivative is obtained, and the flood area change measure value γ is obtained for disaster trend analysis. If γ is greater than zero, it indicates that the flood area is increasing; if γ is less than zero, it indicates that the flood area is decreasing; and the greater |γ| is, the faster the flood area changes.
[0133] Step 9: Intelligent early warning.
[0134] According to the proportion of the disaster area to the monitoring area, the depth data, and the disaster evolution trend, the disaster risk value and the corresponding early warning level are obtained through comprehensive analysis.
[0135] In an embodiment, the operation of intelligent early warning in step 9 can be completed by an intelligent early warning module.
[0136] Taking the flood risk value calculation as an example:
[0137] The proportion P of the disaster area to the monitoring area is: s
[0138]
[0139] Where s is the flood area, and S is the monitoring area.
[0140] The proportion P of the flood depth to the monitoring area height is: H
[0141]
[0142] Wherein, h is the water depth, H is the monitoring area height.
[0143] The risk value R of the waterlogging disaster is:
[0144] When gamma is greater than 0,
[0145]
[0146] When gamma is less than or equal to 0,
[0147]
[0148] Wherein, W P is the water area index weight, W H is the water depth index weight, and C is a constant value
[0149] In one example, the corresponding relationship between the risk value and the warning level is shown in Table 1.
[0150] Table 1: Risk value and warning level table
[0151]
[0152] According to different disaster severity levels, the warning level is judged, and corresponding emergency measures are started. The intelligent warning includes a sound and light alarm, a system alarm, an APP alarm, a WeChat applet alarm, a short message alarm, etc., and is pushed to relevant staff for processing.
[0153] The application also provides a computer device, comprising: one or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the programs are executed by the processor to realize the steps of the image fingerprint feature-based urban rail flood and cold prevention warning method as described above.
[0154] The application also provides a computer readable storage medium, which stores a computer program, and the computer program is executed by the processor to realize the steps of the image fingerprint feature-based urban rail flood and cold prevention warning method as described above.
[0155] Those skilled in the art should understand that the embodiments of the application can be provided as a method, a system, or a computer program product. Therefore, the application can adopt a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the application can adopt a computer program product in the form of one or more computer usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer usable program code.
[0156] This invention is described with reference to flowchart illustrations of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each step in the flowchart, and combinations of steps in the flowchart, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing device, generate instructions for implementing the steps in the flowchart. Figure 1 A device for a function specified in one or more processes.
[0157] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 The function specified in one or more processes.
[0158] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 Steps of a specified function in one or more processes.
Claims
1. An image fingerprint feature-based urban rail flood and cold prevention early warning system, characterized in that, The application comprises the following steps: An image acquisition module is used to acquire video transmission of a monitoring area to a coordinate and area database construction module; The coordinate and area database construction module is used to divide the video image into a plurality of slice units of the same size, correspond the pixel coordinates and pixel area of each slice unit to the actual spatial coordinates and actual spatial area of the monitoring area, and store them in the area coordinate database; A disaster sample feature library construction module is used to obtain a plurality of slice units of the same size based on the historical water accumulation, snow accumulation and icing sample images after segmentation, use H, S and V three-dimensional space analysis to construct a hash sequence as the image fingerprint feature of each slice unit, and input the disaster recognition module; A real-time image feature extraction module is used to obtain a plurality of slice units of the same size based on the real-time image of the monitoring area after segmentation, use H, S and V three-dimensional space analysis to construct a hash sequence as the image fingerprint feature of each slice unit, and input the disaster recognition module; The disaster recognition module is used to calculate the Hamming distance between the fingerprint features of the real-time image slice units and the sample image slice unit fingerprint features, determine the properties of each slice unit based on the Hamming distance, and transmit them to the disaster positioning module and the disaster area and depth detection module; The disaster positioning module is used to retrieve the spatial coordinates corresponding to the water accumulation, snow accumulation and icing slice units from the area coordinate database, calculate the center of gravity coordinates, and determine the position of the disaster in the monitoring area; The disaster area and depth detection module is used to count the number of slice units determined as water accumulation, snow accumulation and icing, combine the actual spatial area corresponding to the slice units, and judge the water accumulation, snow accumulation and icing area; An intelligent early warning module is used to trigger the emergency plan in the early warning plan library according to the disaster detection result, push the alarm information to the relevant staff for processing. The H, S and V three-dimensional space analysis is used to construct a hash sequence as the image fingerprint feature of each slice unit, which comprises the following steps: N represents the row width and column width of the slice unit with a size of N pixels*N pixels; A three-dimensional coordinate system is established with the image row direction as the positive x-axis, the image column direction as the positive y-axis, and the C component value at the pixel as the z-axis coordinate, where C∈{H, S, V}. The C component of the pixel at pixel position (i,j) in the two-dimensional image is defined as... The coordinates mapped to three-dimensional space are The pixel positions (i,j) are the top, bottom, left, and right pixel positions. , , , C component at the location , , , The coordinates mapped to the three-dimensional coordinate system are respectively , , , Find the coordinates , , , The coordinates of the centroid O of the quadrilateral formed by the four points in three-dimensional space. i,j Find the point With O i,j Given the distance D(i,j), construct the distance feature matrix D: ; Based on the distance feature matrix D, if the distance value of the corresponding position is greater than the preset threshold T, 1 is set, otherwise 0 is set; The distance feature matrix elements of H component, S component and V component are combined in order to form a hash sequence G based on HSV space analysis as the image fingerprint feature of each slice unit. The application comprises the following steps:
2. A flood and cold prevention early warning method for urban rail based on image fingerprint features, characterized in that, The historical water accumulation, snow accumulation and icing sample images of the monitoring area are segmented to obtain a plurality of slice units of the same size, and a hash sequence is constructed as the image fingerprint feature of each slice unit by using H, S and V three-dimensional space analysis; The real-time images of the monitoring area are segmented to obtain a plurality of slice units of the same size, and a hash sequence is constructed as the image fingerprint feature of each slice unit by using H, S and V three-dimensional space analysis; The Hamming distance between the fingerprint features of the real-time image slice units and the sample image slice unit fingerprint features is calculated respectively, and the properties of each slice unit are determined based on the Hamming distance. retrieve spatial coordinates corresponding to the waterlogging, snow accumulation, and icing slice units from a regional coordinate database, and calculate the center of gravity coordinates to determine the location of the disaster in the monitoring area, wherein the regional coordinate database includes a correspondence between pixel coordinates of each slice unit of the real-time image and actual spatial coordinates of the monitoring area, and a correspondence between pixel areas of the slice unit and actual spatial areas of the monitoring area; count the number of slice units determined as waterlogging, snow accumulation, and icing slice units, and determine the area of the waterlogging, snow accumulation, and icing area in combination with the actual spatial area corresponding to the slice unit; trigger an emergency plan in the early warning plan library according to the disaster detection result, and push an alarm information to a relevant staff for processing; wherein the H, S, and V three-dimensional space analysis is used to construct a hash sequence as the image fingerprint feature of each slice unit, including: A three-dimensional coordinate system is established with the image row direction as the positive direction of the x-axis, the image column direction as the positive direction of the y-axis, and the C component value at the pixel as the z-axis coordinate, wherein C ∈ {H, S, V}, the C component of the pixel at the two-dimensional image pixel position (i, j) is defined as , the coordinates in the three-dimensional space are mapped as , the C components at the four pixel positions , , , above, below, left and right of the pixel position (i, j) are respectively , , , , the coordinates in the three-dimensional space coordinate system are respectively , , , , the coordinates of the four points , , , enclosing a quadrilateral in the three-dimensional space are found, the barycentric coordinates O i,j of the quadrilateral are found, the distance D(i, j) between the point and O i,j is found, and a distance feature matrix D is constructed: ; wherein N represents the row width and column width of the N-pixel*N-pixel slice unit; based on the distance feature matrix D, if the distance value at the corresponding position is greater than a preset threshold T, 1 is set, otherwise 0 is set; all elements of the distance feature matrix of the H component, the S component, and the V component are combined together in order to form a hash sequence G based on the HSV space analysis as the image fingerprint feature of each slice unit.
3. The method of claim 2, wherein, calculate the Hamming distance between the fingerprint feature of the real-time image slice unit and the fingerprint feature of the sample image slice unit, and determine the attribute of each slice unit based on the Hamming distance, including: bit-by-bit compare the fingerprint features of the slice units through the exclusive OR operation, and sum according to the following formula: ; wherein x C [i] is the fingerprint feature of the C component of the i-th slice unit in the sample feature library, y C [i] is the fingerprint feature of the C component of the i-th slice unit in the real-time image, C ∈ {H, S, V} respectively representing the H channel, the S channel and the V channel; calculate the weighted similarity value of the image fingerprint feature according to the weights of different components of H, S, and V: ; In the formula, w C represents the Hamming distance corresponding to the C component; and C represents the Hamming distance corresponding to the C component; and if the weighted similarity value of the fingerprint feature of the i-th slice unit is less than a preset threshold T, the weighted similarity value is put into set A, and the average value of the weighted similarity values in set A is calculated: ; wherein, represents the weighted similarity value of the fingerprint feature of the i-th slice unit in set A, is the total number of elements in set A, and L represents one of waterlogging, snow, and icing, as the Hamming distance between the fingerprint feature of the final determined real-time image slice unit and the sample image slice unit fingerprint feature; take the sample library category corresponding to the minimum value of the finally determined Hamming distance as the attribute of the real-time image slice unit.
4. The method of claim 3, wherein, The method further includes: When the image is extracted for classification, start the counter C, C w , C s , C r , C, C w , C s , C r respectively represent the detection frame number, water accumulation, snow accumulation and ice detection result cumulative frame number, and C is accumulated by 1 for each frame, and if the classification result is water accumulation, C w is accumulated by 1, if the classification result is snow, C s is accumulated by 1, and if the classification result is ice, C r is accumulated by 1; when C accumulates to a specified number of frames, the confidence α w , α s , α r of water accumulation, snow accumulation and ice is counted respectively, and is calculated according to the following formula: ; ; ; A confidence threshold L is set, when α w > L, and α w = max(α w , α s , α r ), the class is determined as water; when α s > L, and α s = max(α w , α s , α r ), the class is determined as snow; when α r > L, and α r = max(α w , α s , α r ), the class is determined as ice.
5. The method of claim 2, wherein, determine the location of the disaster in the monitoring area, including: put the slice units identified as waterlogging, snow accumulation, and icing areas into set B, count the pixel coordinates of each slice unit in the slice unit set B, find the corresponding actual spatial coordinates from the regional coordinate database, analyze the actual spatial coordinates of the four vertices of the minimum bounding rectangle of the waterlogging, snow accumulation, and icing area, and take the center of the minimum bounding rectangle as the actual position coordinates of the waterlogging, snow accumulation, and icing area.
6. The method of claim 2, wherein, identify the water depth through the calibration position detection and measurement, including: label multiple depth marker positions in the waterlogging detection monitoring area, when it is determined that the detection area image is waterlogging, sequentially segment the identification images corresponding to each depth marker position, convert the 64-level grayscale image after conversion, calculate the discrete cosine transform matrix of the grayscale image, calculate the average value of the discrete cosine transform matrix of the 64 pixel values, finally set the values greater than or equal to the average value in the final discrete cosine transform matrix to 1, and set the values less than the average value to 0 to obtain the image fingerprint of the 64-bit hash sequence; Based on the image fingerprint of the landmark area in the real-time image, combined with the image fingerprint of the landmark area in the normal state without water accumulation, the feature similarity of the two is calculated, and when the feature similarity is less than a specified threshold D, it is judged that the water depth does not reach the landmark; otherwise, it is judged that the water depth reaches the landmark.
7. The method of claim 2, wherein, The method further comprises: The detected disaster area The curve function is fitted by using the least square method And the partial derivative is obtained, and the disaster area change measure value is obtained Based on Disaster trend analysis is carried out, Greater than zero indicates that the disaster area is larger; Less than zero indicates that the disaster area is smaller; The greater, the faster the disaster area changes.
8. A computer device, comprising: comprising: a memory storing one or more programs; and a processor communicatively coupled to the memory and the one or more programs configured to be executed by the processor, when the programs are executed by the processor, realizing the image fingerprint feature-based urban rail flood and cold prevention early warning method of any one of claims 2-7.
9. A non-transitory processor-readable storage medium having stored thereon processor-executable instructions, the instructions being executable by a processor to cause the processor to perform operations comprising: The processor executable instructions are executed by the processor of the mobile terminal to realize the image fingerprint feature-based urban rail flood and cold prevention early warning method of any one of claims 2-7.
Citation Information
Patent Citations
Sparse dimension reduction-based spectral hash indexing method
CN101894130A
Book content searching and matching method based on video image processing
CN106599028A