A flood peak tracking and roaming track calculation method based on image recognition

CN118864263BActive Publication Date: 2026-11-03CHINA YANGTZE POWER
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410787443.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-18
Publication Date
2026-11-03
Estimated Expiration
2044-06-18

AI Technical Summary

Technical Problem

Existing technologies struggle to quickly and accurately determine the cross-sectional changes in typical flood peak scenarios, especially during multiple flood events, where the calculation of the roaming trajectory is cumbersome and complex.

Method used

An image recognition-based approach is employed to automatically identify flood process trajectories through flow process heatmap plotting, image denoising, information extraction, and flood peak tracking roaming trajectory calculation, including data normalization, image grayscale adjustment, erosion, histogram equalization, and skeletonization processing.

Benefits of technology

It enables the rapid determination of the flood peak tracking trajectory within a given time range, simplifies the calculation process, and improves the accuracy and efficiency of the display. It can display the cross-sectional element changes of typical flood peak passage scenarios on a timeline.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118864263B_ABST
    Figure CN118864263B_ABST
Patent Text Reader

Abstract

The application discloses a flood peak tracking and roaming track calculation method based on image recognition, which comprises the following steps: S1, flow process thermodynamic diagram drawing; S2, image noise reduction; S3, image information extraction; and S4, flood peak tracking and roaming track calculation. The application can quickly determine flood processes and corresponding flood peak tracking and roaming tracks within a given time range, and realize the display of the change processes of cross-section elements of a flood peak passing typical scene according to a time axis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of flood peak tracking roaming trajectory calculation technology, and in particular to a flood peak tracking roaming trajectory calculation method based on image recognition. Background Technology

[0002] During floods, significant changes occur in cross-sectional water levels, suspended sediment content, and pollutant concentrations along the river course. Erosion and scouring of riverbanks by torrential floods carry sediment into the river, increasing its sediment load. One or several torrential rain events may contribute the majority of the basin's sediment transport. Along with large amounts of sediment, floods also carry pollutants from both sides of the riverbanks, such as pesticides, fertilizers, and harmful substances. These pollutants cause water pollution after entering the water bodies. Due to the combined influence of meteorological conditions, basin topography, river channel morphology, and land use patterns, information on cross-sectional water levels, suspended sediment content, and pollutant concentrations along the river course during the same flood event, especially during the passage of the flood peak, exhibits significant heterogeneity across temporal and spatial scales. This information requires multi-dimensional comparative analysis and interpretation.

[0003] There are currently two methods for comparing information on various elements during a flood. One method involves determining the start and end times of a single flood event at each cross-section along the flood course and analyzing the temporal changes of various information through time-process curves. This method can only provide a one-dimensional display of the cross-sectional process and requires determining the start and end times of the flood for each cross-section individually. The other method involves dynamically displaying the two-dimensional information of each element along the course at various moments in a holistic two-dimensional timeline. This method overcomes the limitation of the first method, which can only provide a one-dimensional display of the cross-sectional process, and can achieve a holistic display of the entire region. However, because this method displays the entire process, the time and spatial span is large, making it impossible to focus on displaying typical scenes of the flood peak passing through. During the animation display along the timeline, scene roaming can achieve a two-dimensional and three-dimensional dynamic display of the changes in elements at each cross-section. However, the roaming trajectory must be synchronized with the flood peak process (the location of the roaming point corresponding to the time on the timeline must be consistent with the cross-section where the flood peak is located) to achieve an efficient display of the changes in elements at each cross-section of typical scenes of the flood peak passing through the timeline. However, determining the roaming trajectory requires determining the peak time for each cross section, and the peak times between different cross sections may overlap due to the fluctuation of the flow process at each cross section, which affects the determination of the roaming trajectory. For the detailed display of river simulation data, the amount of data is huge, especially since there are more than one flood process within the selected time range, making the calculation process of the scene roaming trajectory cumbersome and complex. Summary of the Invention

[0004] The purpose of this invention is to overcome the above-mentioned shortcomings and provide a flood peak tracking roaming trajectory calculation method based on image recognition, which can quickly determine the flood process and its corresponding flood peak tracking roaming trajectory within a given time range, and realize the display of the cross-sectional element change process of typical flood peak passage scenarios according to the time axis.

[0005] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is: a method for calculating the roaming trajectory of flood peak tracking based on image recognition, which includes the following steps:

[0006] S1. Drawing of flow process heat map;

[0007] S2, Image Denoising;

[0008] S3, Image Information Extraction;

[0009] S4. Calculation of peak flow tracking roaming trajectory.

[0010] Furthermore, S1 specifically includes:

[0011] S1-1, Data normalization processing;

[0012] S1-2. Draw a grayscale diagram of the flow process.

[0013] Furthermore, the specific process of data normalization is as follows:

[0014] Based on the model simulation, long-series flow simulation results of M cross-sections on the main stream are obtained. The cross-sections are sorted and coded in ascending order from upstream to downstream. The flow data of the i-th cross-section is Q. i :{q i,1 ,q i,2 ,...,q i,N (N is the total number of time series); Minimum-maximum normalization is performed on the flow data at each cross-section to remove the discontinuous influence of tributary inflows on the flow magnitude at the main stream cross-section. The normalized time series of the flow data at the i-th cross-section is:

[0015]

[0016] The specific process for drawing a heat map of the flow process is as follows:

[0017] A raster image is plotted with the cross-sectional code as the horizontal axis and the time series number as the vertical axis to obtain a flow process heatmap (the larger the flow value, the larger the grayscale value). The pixel length in the horizontal axis direction of the image is X, and the pixel length in the vertical axis direction is Y. The flow process heatmap is then converted into a grayscale image for further processing.

[0018] Furthermore, S2 specifically includes:

[0019] S2-1. Image grayscale distribution analysis;

[0020] S2-2, Image grayscale adjustment.

[0021] Furthermore, the specific process of image grayscale distribution analysis is as follows:

[0022] A grayscale distribution analysis was performed on the flow process heatmap obtained from S1, and the number of pixels at different grayscale levels from 0 to 255 was counted. The grayscale distribution curves showed several concentrated distribution clusters from high to low. The first concentrated distribution cluster corresponded to the grayscale interval of the largest flood process in the flow process heatmap, the second concentrated distribution cluster corresponded to the grayscale interval of the second largest flood process, and so on. The grayscale intervals corresponding to the largest distribution cluster and below were small useless noise in the flow process. The grayscale adjustment threshold T was determined based on the grayscale intervals corresponding to the number of flood processes to be displayed.

[0023] The specific process of image grayscale adjustment is as follows:

[0024] Based on the grayscale adjustment threshold determined in S2-1, all pixel values ​​with grayscale values ​​less than the threshold in the thermal grayscale image of the flow process are set to the threshold T to reduce interference from other grayscale values. This allows for image noise reduction by focusing on the grayscale range corresponding to the flood process.

[0025]

[0026] Where: G or (x, y), G sub (x, y) represent the pixel grayscale values ​​at coordinates (x, y) in the thermal grayscale map of the flow process before and after grayscale adjustment.

[0027] Furthermore, S3 specifically includes:

[0028] S3-1. Use erosion operation to perform preliminary thinning of the image;

[0029] S3-2. Perform histogram equalization on the image;

[0030] S3-3. Perform skeletonization on the image after equalization.

[0031] S3-4 curve set acquisition and filtering.

[0032] Furthermore, the specific process of using erosion to perform preliminary image refinement is as follows:

[0033] By comparing local regions of each pixel in the image, the value of that pixel is updated to the minimum value of its neighboring pixels:

[0034] G thinned (x, y) = min(G) sub (x+i, y+j))

[0035] In the formula: (i, j) is the coordinate offset of a local region, the size of which is defined by a specific structuring element (also called the kernel); G thinned (x, y) are the pixel values ​​in the eroded image;

[0036] By applying erosion operations multiple times, the details in the image are gradually eroded away, thereby improving the refinement effect.

[0037] The specific process of histogram equalization for an image is as follows:

[0038] First, calculate the cumulative gray-level distribution function F[G]. thinned [x, y] represents the sum of the number of pixels in the image whose grayscale value is less than or equal to r; then, the grayscale value of the eroded image is locally stretched:

[0039] G clahe (x, y) = (P-1) × F[G] thinned (x, y)]

[0040] Where: G clahe (x, y) is the grayscale image after equalization, (P-1) represents the number of grayscale levels minus 1, and P is usually 256, representing the range of grayscale levels after stretching.

[0041] The specific process of skeletonization for the equalized image is as follows:

[0042] The Zhang-Suen thinning algorithm iteratively scans each pixel in the image. For each pixel, it determines whether it can be deleted based on the values ​​of its eight neighbors. If it can be deleted, it is marked as a background pixel, and this process is repeated until no more pixels can be deleted. Finally, a binary image that retains only the important line information is obtained.

[0043]

[0044] Where: G skeleton (x, y) is the binary image after skeletonization, and Delete is the set of pixel deletion conditions during skeletonization.

[0045] The specific process for obtaining and filtering the curve set is as follows:

[0046] Based on the obtained binary image, find the set of continuous points with the same value. These point sets form curve l, and each curve corresponds to a flood peak trajectory. The curves are filtered according to the length of the flood peak trajectory to be displayed (the entire process from upstream to downstream corresponds to the length of the horizontal coordinate pixel X of the image) to obtain the final set of curves L that meets the requirements.

[0047] Furthermore, S4 specifically includes:

[0048] S4_1, Curve fitting;

[0049] S4-2, Trajectory Equation Transformation.

[0050] Furthermore, the specific process of curve fitting is as follows:

[0051] For each continuous point set contained in the curve set L, a quadratic polynomial is fitted using the least squares method to obtain the corresponding equation S of the curve. l (x)=y=ax 2 +bx+c;

[0052] The specific process of trajectory equation transformation is as follows:

[0053] For each curve l corresponding to the flood peak trajectory, the trajectory curve at the flood peak passage time n (time series number) at section position m from upstream to downstream is obtained through transformation:

[0054]

[0055] In the formula: X and Y are the pixel lengths of the image in the horizontal and vertical coordinate directions, respectively, and a, b, and c are the trajectory curve fitting coefficients.

[0056] The beneficial effects of this invention are as follows: This invention can quickly determine the flood process and its corresponding flood peak tracking trajectory within a given time range, and realize the display of the change process of elements of typical flood peak passage scenarios on a time axis. Compared with existing methods, this patent adopts an image recognition-based method to calculate the flood peak tracking trajectory. It does not require limiting the start and end time of a single flood event for each cross section to determine the flood peak passage time on a cross section and process basis. It can automatically identify the trajectory of all flood processes within a given time interval based on the brightness strip distribution of the image, avoiding the traditional large amount of tedious calculation process. The method is intuitive and convenient. The finally determined flood peak tracking trajectory can realize the display of the change process of elements of typical flood peak passage scenarios on a time axis. Attached Figure Description

[0057] Figure 1 For standardized flow heatmaps (a) and (b);

[0058] Figure 2 This is a grayscale distribution analysis diagram;

[0059] Figure 3 Comparison charts of flow heatmap before and after grayscale adjustment (a) and (b);

[0060] Figure 4 A detailed diagram of flow erosion;

[0061] Figure 5 The graph was processed for equalization.

[0062] Figure 6 This is the result of the skeletonization process.

[0063] Figure 7 A graph showing the set of line curves after length filtering;

[0064] Figure 8 The result is a graph showing the fitted curve. Detailed Implementation

[0065] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments.

[0066] A method for calculating the roaming trajectory of flood peak tracking based on image recognition, comprising the following steps:

[0067] S1. Drawing of flow process heat map;

[0068] S1-1, Data normalization processing;

[0069] Based on the model simulation, long-series flow simulation results of M cross-sections on the main stream are obtained. The cross-sections are sorted and coded in ascending order from upstream to downstream. The flow data of the i-th cross-section is Q. i :{q i,1 ,q i,2 ,...,q i,N (N is the total number of time series). This embodiment includes 391 cross-sections and 937 time points. Minimum-maximum normalization is applied to the flow data at each cross-section to remove the discontinuity of the main stream flow due to tributary inflows. The normalized time series of the flow data at the i-th cross-section is as follows:

[0070]

[0071] S1-2. Draw a grayscale diagram of the flow process thermal model;

[0072] A raster map is plotted with the cross-sectional code as the x-axis and the time series number as the y-axis to obtain a flow process heatmap (the larger the flow value, the larger the grayscale value). The flow heatmaps before and after standardization are shown below. Figure 1 As shown, the image has a pixel length of X along the horizontal axis and Y along the vertical axis. The flow process heatmap is converted into a grayscale image for further processing.

[0073] S2, Image Denoising;

[0074] S2-1. Image grayscale distribution analysis;

[0075] Gray-scale distribution analysis was performed on the flow process heatmap obtained from S1, counting the number of pixels at different gray-scale levels from 0 to 255. The gray-scale distribution curves showed several concentrated clusters from high to low. The first concentrated cluster corresponded to the gray-scale interval of the largest flood process in the flow process heatmap, the second concentrated cluster to the second largest flood process, and so on. The gray-scale intervals corresponding to the largest cluster and below represented minor, useless noise in the flow process. The image gray-scale adjustment threshold T was determined based on the number of flood processes to be displayed and the corresponding gray-scale intervals.

[0076] The image grayscale distribution diagram of this embodiment is as follows: Figure 2 As shown, based on the grayscale distribution, the grayscale range above the second largest flood level is determined to be valid information, while the rest is useless noise. The grayscale threshold is 103.

[0077] S2-2, Image grayscale adjustment;

[0078] Based on the grayscale adjustment threshold determined in S2-1, all pixel values ​​with grayscale values ​​less than the threshold in the thermal grayscale image of the flow process are set to the threshold T to reduce interference from other grayscale values. This allows for image noise reduction by focusing on the grayscale range corresponding to the flood process.

[0079]

[0080] Where: G 0r (x, y), G sub (x, y) represent the pixel grayscale values ​​at coordinates (x, y) in the thermal grayscale map of the flow process before and after grayscale adjustment.

[0081] In this embodiment, based on a grayscale threshold of 103, the thermal grayscale diagrams of the flow process before and after grayscale adjustment are as follows: Figure 3 As shown.

[0082] S3, Image Information Extraction;

[0083] S3-1. Use erosion to initially refine the image:

[0084] Erosion is an image processing operation used to thin an image. Its basic principle is to compare the local values ​​of each pixel in the image and update the value of that pixel to the minimum value of its neighboring pixels.

[0085] G thinned (x, y) = min(G) sub (x+i, y+j))

[0086] In the formula: (i, j) is the coordinate offset of a local region, the size of which is defined by a specific structuring element (also called the kernel); G thinned(x, y) are the pixel values ​​in the eroded image. Multiple erosion operations can be applied to gradually erode away the details in the image, thus improving the thinning effect.

[0087] In this embodiment, the kernel size used to determine the size of the local region is defined as [2, 5], and the refined image after the erosion operation is shown below. Figure 4 As shown.

[0088] S3-2. Perform histogram equalization on the image;

[0089] Histogram equalization is performed on the image to balance overly dark or bright areas, improving overall image contrast and facilitating subsequent information extraction. First, the cumulative gray-level distribution function F[G] is calculated. thinned [x, y] represents the sum of the number of pixels in the image whose grayscale value is less than or equal to r. Then, the grayscale values ​​of the eroded image are locally stretched.

[0090] G clahe (x, y) = (P-1) × F[G] thinned (x, y)]

[0091] Where: G clahe (x, y) is the grayscale image after equalization, (P-1) represents the number of grayscale levels minus 1, and P is usually 256, representing the range of grayscale levels after stretching.

[0092] In this embodiment, the image after equalization processing is as follows: Figure 5 As shown.

[0093] S3-3. Perform skeletonization on the image after equalization.

[0094] The Zhang_Suen thinning algorithm iteratively scans each pixel in the image. For each pixel, it determines whether it can be deleted based on the values ​​of its eight neighbors. If it can be deleted, it is marked as a background pixel, and this process is repeated until no more pixels can be deleted. Ultimately, a binary image is obtained that retains only the important line information.

[0095]

[0096] Where: G skelet0n (x, y) is the binary image after skeletonization, and Delete is the set of pixel deletion conditions during skeletonization.

[0097] In this embodiment, the image after skeletonization processing is as follows: Figure 6 As shown.

[0098] S3_4. Obtaining and filtering curve sets;

[0099] Based on the obtained binary image, a set of continuous points with the same value is found. This set of points forms a curve l, and each curve corresponds to one flood peak trajectory. The curves are then filtered according to the required length of the flood peak trajectory (the entire process from upstream to downstream corresponds to the image's horizontal coordinate pixel length X) to obtain the final set of curves L that meets the requirements.

[0100] In this embodiment, the set of line curves after length filtering is as follows: Figure 7 As shown.

[0101] S4. Calculation of flood peak tracking roaming trajectory;

[0102] S4-1, Curve Fitting;

[0103] For each continuous point set contained in the curve set L, a quadratic polynomial is fitted using the least squares method to obtain the corresponding equation S of the curve. l (x)=y=ax 2 +bx+c.

[0104] In this embodiment, the fitted curve is as follows: Figure 8 As shown.

[0105] S4-2, Trajectory Equation Conversion;

[0106] For each curve l corresponding to the flood peak trajectory, the trajectory curve at the flood peak passage time n (time series number) at section position m from upstream to downstream is obtained through transformation:

[0107]

[0108] In the formula: X and Y are the pixel lengths of the image in the horizontal and vertical coordinate directions, respectively, and a, b, and c are the trajectory curve fitting coefficients.

[0109] In this embodiment, the equation for the tracking roaming trajectory of the maximum magnitude flood peak is y = -1E-05x. 2 +0.0266x+452.21, the pixel lengths of the image in the horizontal and vertical coordinate directions are 930 and 924 respectively. In this embodiment, there are a total of 391 cross-sections and 937 time points. Therefore, the equation for the flood peak tracking roaming trajectory is obtained after conversion:

[0110]

[0111] The above embodiments are merely preferred technical solutions of the present invention and should not be considered as limitations on the present invention. The scope of protection of the present invention should be limited to the technical solutions described in the claims, including equivalent substitutions of the technical features described in the claims. That is, equivalent substitutions and improvements within this scope are also within the scope of protection of the present invention.

Claims

1. A method for calculating the roaming trajectory of flood peak tracking based on image recognition, characterized in that: It includes the following steps: S1. Drawing of flow process heat map; S2, Image Denoising; S3, Image Information Extraction; S4. Calculation of flood peak tracking roaming trajectory; S1 specifically includes: S1-1, Data normalization processing; S1-2. Draw a grayscale diagram of the flow process thermal model; The specific process of data normalization is as follows: Based on model simulation, the main stream is obtained M The simulation results of a long series of flow rates at various cross-sections are arranged and coded in ascending order from upstream to downstream. i The flow data for each cross-section is as follows: Q i :{ q i,1 , q i,2 ,..., q i,N }, N The total time series number is given; the flow data at each cross-section are normalized using minimum-maximum normalization to remove the discontinuous influence of tributary inflows on the flow magnitude at the main stream cross-section. i The standardized time series of flow data from each cross-section is as follows: ; The specific process for drawing a heat map of the flow process is as follows: A raster map is plotted with the cross-sectional code as the x-axis and the time series number as the y-axis to obtain a flow rate heatmap. The larger the flow rate value, the larger the grayscale value. The pixel length in the horizontal axis of the image is... X The pixel length in the vertical axis direction is Y The flow process heatmap is converted into a grayscale image for further processing. S2 specifically includes: S2-1. Image grayscale distribution analysis; S2-2, Image grayscale adjustment; The specific process of image grayscale distribution analysis is as follows: A grayscale distribution analysis was performed on the flow process heatmap obtained from S1, counting the number of pixels at different grayscale levels from 0 to 255. The grayscale distribution curves showed several concentrated clusters from high to low. The first concentrated cluster corresponded to the grayscale interval of the largest flood process in the flow process heatmap, the second concentrated cluster corresponded to the grayscale interval of the second largest flood process, and so on. The grayscale intervals corresponding to the largest cluster and below were considered as minor noise in the flow process. The grayscale adjustment threshold was determined based on the grayscale intervals corresponding to the number of flood processes to be displayed. T ; The specific process of image grayscale adjustment is as follows: Based on the grayscale adjustment threshold determined in S2-1, all pixel values ​​in the flow process thermal grayscale map that are less than the threshold are set to the threshold. T To reduce interference from other grayscale values, focus on the grayscale range corresponding to the flood process and perform image noise reduction: ; In the formula: The coordinates in the flow process thermograyscale graph before and after grayscale adjustment are ( ) x , y The pixel grayscale value; S3 specifically includes: S3-1. Use erosion operation to perform preliminary thinning of the image; S3-2. Perform histogram equalization on the image; S3-3. Perform skeletonization on the image after equalization. S3-4 Curve Set Acquisition and Filtering; The specific process for obtaining and filtering the curve set is as follows: Based on the obtained binary image, find the set of continuous points with the same value; these sets of points constitute the curve. l Each curve corresponds to a flood peak trajectory; the curves are filtered according to the length of the flood peak trajectory to be displayed, and the entire process from upstream to downstream corresponds to the pixel length of the image's horizontal coordinate. X This yields the final set of curves that meet the requirements. L .

2. The method for calculating the roaming trajectory of flood peak tracking based on image recognition according to claim 1, characterized in that: The specific process of using erosion to perform preliminary image thinning is as follows: By comparing local regions of each pixel in the image, the value of that pixel is updated to the minimum value of its neighboring pixels: ; In the formula: ( i , j ) is a coordinate offset of a local region, the size of which is defined by a specific structuring element; These are the pixel values ​​in the eroded image; By applying erosion operations multiple times, the details in the image are gradually eroded away, thereby improving the refinement effect. The specific process of histogram equalization for an image is as follows: First, calculate the cumulative gray-level distribution function of the image. That is, the image grayscale value is less than or equal to r The number of pixels and; then, the grayscale of the eroded image is locally stretched: ; In the formula: For the grayscale image after equalization processing, ( P -1) indicates that the number of gray levels is reduced by 1. P Typically 256, representing the range of grayscale levels after stretching; The specific process of skeletonization for the equalized image is as follows: The Zhang-Suen thinning algorithm iteratively scans each pixel in the image. For each pixel, it determines whether it can be deleted based on the values ​​of its eight neighbors. If it can be deleted, it is marked as a background pixel, and this process is repeated until no more pixels can be deleted. Finally, a binary image that retains only the important line information is obtained. ; In the formula: This is the binary image after skeletonization. This is the set of pixel deletion conditions for skeletonization.

3. The method for calculating the roaming trajectory of a flood peak based on image recognition according to claim 1, characterized in that: S4 specifically includes: S4-1, Curve Fitting; S4-2, Trajectory Equation Transformation.

4. The method for calculating the roaming trajectory of flood peak tracking based on image recognition according to claim 3, characterized in that: The specific process of curve fitting is as follows: For the set of curves L The set of continuous points contained in each curve is fitted with a quadratic polynomial using the least squares method to obtain the equation of the corresponding curve. ; The specific process of trajectory equation transformation is as follows: For each curve l The corresponding flood peak trajectory, from upstream to downstream cross-sections. m Location corresponding to the time of flood peak passage n The trajectory curve is obtained through transformation: ; ; In the formula: X , Y These represent the pixel lengths of the image along the horizontal and vertical axes, respectively. a , b , c The coefficients are the fitting coefficients for the trajectory curve.

Citation Information

Patent Citations

  • Flood peak trajectory evolution method based on combination of actual measurement and highest water level forecast of hydrological station

    CN116805113A

  • Drainage basin hydrological situation expression method based on runoff modulus grid

    CN117237554A