CN116777743A - Rainfall time downscaling method, rainfall time downscaling device, computer equipment and storage medium - Google Patents

Rainfall time downscaling method, rainfall time downscaling device, computer equipment and storage medium Download PDF

Info

Publication number
CN116777743A
CN116777743A CN202310703590.3A CN202310703590A CN116777743A CN 116777743 A CN116777743 A CN 116777743A CN 202310703590 A CN202310703590 A CN 202310703590A CN 116777743 A CN116777743 A CN 116777743A
Authority
CN
China
Prior art keywords
rainfall
image
interpolation
time
moment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310703590.3A
Other languages
Chinese (zh)
Inventor
何森
宋云海
黄和燕
周震震
王黎伟
何宇浩
李为明
余俊松
丁伟锋
黄怀霖
陈伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Southern Power Grid Corp Ultra High Voltage Transmission Co Electric Power Research Institute
Original Assignee
China Southern Power Grid Corp Ultra High Voltage Transmission Co Electric Power Research Institute
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Southern Power Grid Corp Ultra High Voltage Transmission Co Electric Power Research Institute filed Critical China Southern Power Grid Corp Ultra High Voltage Transmission Co Electric Power Research Institute
Priority to CN202310703590.3A priority Critical patent/CN116777743A/en
Publication of CN116777743A publication Critical patent/CN116777743A/en
Pending legal-status Critical Current

Links

Abstract

The present application relates to the field of artificial intelligence, and in particular, to a rainfall time downscaling method, a rainfall time downscaling device, a computer device, and a storage medium. The method comprises the following steps: acquiring a first rainfall image and a second rainfall image acquired at adjacent moments; analyzing the gray value of each pixel point in the first rainfall image and the gray value of each pixel point in the second rainfall image to obtain a rainfall motion vector; determining a target interpolation image corresponding to the time to be interpolated according to the rainfall motion vector, the interpolation interval, the first moment and the first rainfall position corresponding to the first rainfall image, and the second moment and the second rainfall position corresponding to the second rainfall image; and generating a rainfall time downscaling result according to the first rainfall image, the second rainfall image and the target interpolation image. The application can accurately interpolate rainfall condition.

Description

Rainfall time downscaling method, rainfall time downscaling device, computer equipment and storage medium
Technical Field
The present application relates to the field of artificial intelligence, and in particular, to a rainfall time downscaling method, a rainfall time downscaling device, a computer device, and a storage medium.
Background
The numerical weather forecast mode system has the reasons of chaotic behavior, limited physical mechanism and forced understanding of people on the weather system, and the like, so that the numerical weather forecast has uncertainty and forecast error. The resolution and forecast accuracy of current numerical weather forecast cannot fully meet the increasing demands of professional weather users.
Although the time resolution of the numerical mode is higher and higher at present, more precise forecasting results are always required in actual business. In the conventional technology, in order to obtain a prediction result of 1 hour resolution, a common practice is to perform linear interpolation or cubic spline interpolation for each grid point, and refine a precipitation result of each grid point on the 1 hour time resolution.
However, the method can still accept the result processed by the interpolation method for the continuous variable such as temperature, and has poor interpolation accuracy for the discontinuous variable such as rainfall, so that the rainfall prediction accuracy is lower.
Disclosure of Invention
Based on this, it is necessary to provide a rainfall time downscaling method, device, computer equipment and storage medium capable of accurately interpolating rainfall conditions.
In a first aspect, the present application provides a method for downscaling rainfall time, the method comprising:
acquiring a first rainfall image and a second rainfall image acquired at adjacent moments;
analyzing the gray value of each pixel point in the first rainfall image and the gray value of each pixel point in the second rainfall image to obtain a rainfall motion vector;
determining a target interpolation image corresponding to the time to be interpolated according to the rainfall motion vector, the interpolation interval, the first moment and the first rainfall position corresponding to the first rainfall image, and the second moment and the second rainfall position corresponding to the second rainfall image;
and generating a rainfall time downscaling result according to the first rainfall image, the second rainfall image and the target interpolation image.
In one embodiment, the analyzing the gray value of each pixel in the first rainfall image and the gray value of each pixel in the second rainfall image includes:
analyzing the gray value of each pixel point in the first rainfall image and the gray value of each pixel point in the second rainfall image to obtain an optical flow field between the first rainfall image and the second rainfall image;
From the optical flow field, a rainfall motion vector is determined.
In one embodiment, the analyzing the gray value of each pixel point in the first rainfall image and the gray value of each pixel point in the second rainfall image to obtain an optical flow field between the first rainfall image and the second rainfall image includes:
selecting a target pixel point from the first rainfall image or the second rainfall image;
obtaining optical flow fields with different scales according to the gray value of the target pixel point and a multi-scale optical flow method;
correspondingly, the determining the rainfall motion vector according to the optical flow field comprises the following steps:
and determining rainfall motion vectors according to the optical flow fields with different scales.
In one embodiment, the determining, according to the rainfall motion vector, the interpolation interval, the first time and the first rainfall position corresponding to the first rainfall image, and the second time and the second rainfall position corresponding to the second rainfall image, the target interpolation image corresponding to the time to be interpolated includes:
determining a first interpolation rainfall position corresponding to a moment to be interpolated according to the rainfall motion vector, the interpolation interval, the first moment corresponding to the first rainfall image and the first rainfall position;
Determining a second interpolation rainfall position corresponding to the time to be interpolated according to the rainfall motion vector, the interpolation interval, the second moment corresponding to the second rainfall image and the second rainfall position;
and determining a target interpolation rainfall position corresponding to the moment to be interpolated according to the first interpolation rainfall position and the second interpolation rainfall position.
In one embodiment, the determining, according to the rainfall motion vector, the interpolation interval, the first time corresponding to the first rainfall image, and the first rainfall position, the first interpolation rainfall position corresponding to the time to be interpolated includes:
and determining a first interpolation rainfall position corresponding to the moment to be interpolated according to the rainfall motion vector, the interpolation interval, a plurality of different time steps, the first moment corresponding to the first rainfall image and the first rainfall position.
In one embodiment, the determining, according to the first interpolation rainfall position and the second interpolation rainfall position, the target interpolation rainfall position corresponding to the time to be interpolated includes:
and carrying out weighting treatment on the first interpolation rainfall position and the second interpolation rainfall position according to a preset weight coefficient to obtain a target interpolation rainfall position corresponding to the moment to be interpolated.
In a second aspect, the present application also provides a rainfall prediction apparatus, the apparatus comprising:
the acquisition module is used for acquiring a first rainfall image and a second rainfall image acquired at adjacent moments;
the speed measuring and calculating module is used for analyzing the gray value of each pixel point in the first rainfall image and the gray value of each pixel point in the second rainfall image to obtain a rainfall motion vector;
the interpolation module is used for determining a target interpolation image corresponding to the moment to be interpolated according to the rainfall motion vector, the interpolation interval, the first moment and the first rainfall position corresponding to the first rainfall image, and the second moment and the second rainfall position corresponding to the second rainfall image;
the time downscaling module is used for generating a rainfall time downscaling result according to the first rainfall image, the second rainfall image and the target interpolation image.
In a third aspect, the present application also provides a computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
acquiring a first rainfall image and a second rainfall image acquired at adjacent moments;
Analyzing the gray value of each pixel point in the first rainfall image and the gray value of each pixel point in the second rainfall image to obtain a rainfall motion vector;
determining a target interpolation image corresponding to the time to be interpolated according to the rainfall motion vector, the interpolation interval, the first moment and the first rainfall position corresponding to the first rainfall image, and the second moment and the second rainfall position corresponding to the second rainfall image;
and forecasting the rainfall condition according to the target interpolation rainfall position corresponding to the time to be interpolated.
In a fourth aspect, the present application also provides a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
acquiring a first rainfall image and a second rainfall image acquired at adjacent moments;
analyzing the gray value of each pixel point in the first rainfall image and the gray value of each pixel point in the second rainfall image to obtain a rainfall motion vector;
determining a target interpolation image corresponding to the time to be interpolated according to the rainfall motion vector, the interpolation interval, the first moment and the first rainfall position corresponding to the first rainfall image, and the second moment and the second rainfall position corresponding to the second rainfall image;
And forecasting the rainfall condition according to the target interpolation rainfall position corresponding to the time to be interpolated.
In a fifth aspect, the application also provides a computer program product comprising a computer program which, when executed by a processor, performs the steps of:
acquiring a first rainfall image and a second rainfall image acquired at adjacent moments;
analyzing the gray value of each pixel point in the first rainfall image and the gray value of each pixel point in the second rainfall image to obtain a rainfall motion vector;
determining a target interpolation image corresponding to the time to be interpolated according to the rainfall motion vector, the interpolation interval, the first moment and the first rainfall position corresponding to the first rainfall image, and the second moment and the second rainfall position corresponding to the second rainfall image;
and forecasting the rainfall condition according to the target interpolation rainfall position corresponding to the time to be interpolated.
According to the rainfall time downscaling method, the rainfall time downscaling device, the computer equipment and the storage medium, the gray value of each pixel point in the first rainfall image and the gray value of each pixel point in the second rainfall image are analyzed to obtain the rainfall motion vector, the problem of predicting the discontinuous change rainfall field is converted into the problem of analyzing based on continuous properties, after the rainfall motion vector is obtained, the rainfall position corresponding to the interpolation time can be predicted, then the target interpolation image corresponding to the interpolation time is generated, and after interpolation is completed, a finer rainfall time downscaling result is generated according to the first rainfall image, the second rainfall image and the target interpolation image, so that the effect of accurately predicting the rainfall condition is realized.
Drawings
FIG. 1 is a flow chart of a method for downscaling rainfall time in one embodiment;
FIG. 2 is a schematic flow chart of determining a rainfall motion vector in one embodiment;
FIG. 3 is a flow diagram of a pyramid in one embodiment;
FIG. 4 is a flow diagram of determining a target interpolated image in one embodiment;
FIG. 5 is a block diagram showing a structure of a rainfall prediction apparatus in one embodiment;
fig. 6 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
In one embodiment, as shown in fig. 1, there is provided a rainfall time downscaling method, which is exemplified as the method applied to a computer device, and includes the following steps:
s101, acquiring a first rainfall image and a second rainfall image acquired at adjacent moments.
The first rainfall image and the second rainfall image can be obtained after video images obtained by the monitoring equipment are divided into frames, and can also be obtained through videos or continuous pictures shot by a mobile phone or a camera. It is understood that the first and second rain images are images that include a rain field.
S102, analyzing the gray value of each pixel point in the first rainfall image and the gray value of each pixel point in the second rainfall image to obtain a rainfall motion vector.
The rainfall motion vector refers to the moving speed (vector) of the rainfall field between the first rainfall image and the second rainfall image, and comprises the magnitude of the moving speed and the direction of the moving speed, and the direction of the moving speed can refer to the directions in x and y (two-dimensional plane) because the first rainfall image and the second rainfall image are two-dimensional images.
Specifically, the gray value of each pixel point in the first rainfall image and the gray value of each pixel point in the second rainfall image can be analyzed to obtain a first pixel set corresponding to the rainfall field in the first rainfall image and a second pixel set corresponding to the rainfall field in the second rainfall image, and the first pixel set and the second pixel set are analyzed through a preset algorithm to obtain a rainfall motion vector.
S103, determining a target interpolation image corresponding to the moment to be interpolated according to the rainfall motion vector, the interpolation interval, the first moment and the first rainfall position corresponding to the first rainfall image, and the second moment and the second rainfall position corresponding to the second rainfall image.
The interpolation interval refers to an interval Δt for interpolation between a first time t1 corresponding to the first rainfall image and a second time t2 corresponding to the second rainfall image. Illustratively, between t1 and t2, the rainfall interpolation corresponding to the first interpolation interval Δt is a first target interpolation image, the rainfall interpolation corresponding to the second interpolation interval Δt is a second target interpolation image, the rainfall interpolation corresponding to the third interpolation interval Δt is a third target interpolation image, and so on.
Wherein the first rainfall position corresponding to the first rainfall image is the position corresponding to the first pixel set, the second rainfall position corresponding to the second rainfall image is the position corresponding to the second pixel set, and the time to be interpolated is the time t corresponding to the first target interpolation image 1 Time t corresponding to second target interpolation image 2 Time t corresponding to third target interpolation image 3 Etc.
Specifically, according to the rainfall motion vector, determining the moving distance of the rainfall field in the corresponding interpolation interval, determining the position of the rainfall field at the moment to be interpolated (corresponding to the interpolation interval), and determining the target interpolation image corresponding to the moment to be interpolated according to the position of the rainfall field.
S104, generating a rainfall time downscaling result according to the first rainfall image, the second rainfall image and the target interpolation image.
The first rainfall image and the second rainfall image are images which are actually collected, and the target interpolation image is an image obtained by interpolation. Therefore, if the first time corresponding to the first rainfall image is 00:00, the first time corresponding to the second rainfall image is 03:00, the first interpolation time corresponding to the first target interpolation image is 01:00, and the first interpolation time corresponding to the second target interpolation image is 02:00, at this time, the rainfall prediction interval of 1 hour is obtained by interpolation based on the rainfall prediction interval of 3 hours, and a finer rainfall time downscaling result can be generated.
According to the rainfall time downscaling method, the rainfall motion vector is obtained by analyzing the gray value of each pixel point in the first rainfall image and the gray value of each pixel point in the second rainfall image, the problem of predicting a discontinuous change rainfall field is converted into the problem of analyzing based on continuous properties, after the rainfall motion vector is obtained, the rainfall position corresponding to the interpolation moment can be predicted, further, a target interpolation image corresponding to the interpolation moment is generated, and after interpolation is completed, a finer rainfall time downscaling result is generated according to the first rainfall image, the second rainfall image and the target interpolation image, so that the effect of accurately predicting the rainfall condition is realized.
As shown in fig. 2, this embodiment provides an alternative way to analyze the gray value of each pixel in the first rainfall image and the gray value of each pixel in the second rainfall image, that is, a way to refine S102. The specific implementation process can comprise the following steps:
s201, analyzing the gray value of each pixel point in the first rainfall image and the gray value of each pixel point in the second rainfall image to obtain an optical flow field between the first rainfall image and the second rainfall image.
Wherein optical flow describes the flow of pixel intensities in an image, which refers to the instantaneous displacement field generated in sequential images due to the relative motion between the object being observed and the sensor, representing the apparent motion of the image brightness pattern. The optical flow of all the pixels in the image constitutes the optical flow field of the image, while the core of the optical flow method is to calculate the optical flow field from a continuous sequence of images. That is, the optical flow method aims to estimate the moving speed and direction of an object according to the intensity change of gray values of pixels in an image, and the principle of the optical flow method is as follows: first, optical flow estimation refers to calculating the motion of a point using the variation in pixel intensity within two temporally adjacent frames of images. The principle determines that this approach is based on a series of assumptions. (1) the displacement of the middle point of the front frame and the rear frame is not large: (2) The gray scale is assumed to be unchanged, which requires that the external light intensity remains constant; (3) Spatial correlation, the motion of each point is similar to that of an adjacent point. The core in the above assumption is (2), the gray scale invariant assumption.
In the meteorological field, the velocity vector is generally represented by two components u and v. Let a point (x, y) on the cartesian coordinate plane represent the projection of a point (x, y, z) in three-dimensional space on the image plane, the gray value of the point at time t being I (x, y, t). It is assumed that the point moves to (x+Δx, y+Δy) at the time (t+Δt), and that the brightness of the image does not change during the movement in a short time for a short time Δt, that is, the following formula (1):
I(x+uΔt,y+vΔt,t+Δt)=I(x,y,t) (1)
where u, v are the components of the spot light stream in the x, y directions, respectively. Assuming that the luminance I (x, y, t) smoothes the variable over time Δt, taylor expansion can be performed on (1), the infinitesimal term is eliminated and the limit is taken on Δt→0, the following formula-formula (2) can be obtained:
I x u+I y v+I t =0 (2)
wherein due to the constraint of formula (3):
the constraint equations of the formula (2) and the optical flow field, however, because of the two variables u and v (i.e., the rainfall motion vectors) in the formula (2), additional conditional constraints are needed to obtain the complete optical flow field.
In this example, the calculation of the optical flow field was performed using the Lucas-Kanade local constraint method. Specifically, assuming that the optical flow satisfies a certain condition in a small area around a given point, the local smoothness constraint Lucas-Kanade method assumes that the N point optical flows in a sufficiently small area centered on P are the same, and that the motion between two frames of images can be approximated to be linear in a sufficient period of time. The different points within the region are given different weights, the closer to the P point, the higher the weight, and the calculation of the optical flow can be converted into the following formula- (4):
Wherein Ω is a small region with P as middle and lower, W 2 (x) As a window function. V is the optical flow of point P.
So that in a relatively small neighborhood, the number of equations will exceed the number of variables by least squares v= (a) T A) -1 A T b, enabling the obtained solution of the wind field error square to be the smallest, considering the solution as a local optical flow field, applying the solution to all window areas, and realizing the calculation of the optical flow field of the whole domain, namely obtaining the optical flow field between the first rainfall image and the second rainfall image.
S202, determining a rainfall motion vector according to the optical flow field.
In this embodiment, the rainfall motion vector is determined according to the optical flow fields with different scales.
Specifically, selecting a target pixel point from the first rainfall image or the second rainfall image; and obtaining optical flow fields with different scales according to the gray value of the target pixel point and a multi-scale optical flow method.
It can be understood that the premise assumed by the optical flow method is a small movement, and when the movement speed is high, the movement speed and the deviation of the movement position have a large deviation. To solve this problem, it is necessary to use a multi-scale method, as shown in fig. 3, in which an image is divided into different resolutions, a moving position is estimated from the coarsest resolution as an initial position of the next layer, and a downward search is sequentially performed, which is called pyramid layering. In the embodiment, a Lucas-Kanade optical flow method and a 3-layer pyramid layering technology are adopted to obtain a movement vector of precipitation.
The pyramid method is to fix the window, generate the pyramid from the image, and calculate the optical flow by using the window with the same size on each layer of pyramid. When the image size is smaller, the window is larger, the optical flow can track the target with higher speed, and when the original image is, the optical flow window is smaller, and the obtained optical flow is more accurate. This is a coarse to fine process. And finally, performing superposition calculation on optical flow fields with different scales corresponding to each layer of pyramid to analyze and obtain rainfall motion vectors corresponding to the rainfall fields.
In this embodiment, by using a multi-scale optical flow method, analysis is performed by using different scales, so that a more accurate rainfall motion vector can be obtained by analysis.
After a rainfall motion vector of a rainfall field is obtained by utilizing a multi-scale optical flow method, extrapolation prediction can be performed according to the motion vector. The extrapolation method typically used is a linear extrapolation, i.e. the distance the image moves in the future is equal to the current moment movement vector times the forecast time. Therefore, for a certain pixel point, the movement path of the rainfall field can only move along a straight line in the forecasting time, and in practice, the movement path of the rainfall field often has a certain curvature, and the characteristic cannot be effectively reflected by utilizing the linear extrapolation, so that the extrapolation forecasting fails. In view of the lack of linear extrapolation, the present example uses a semi-Lagrangian method for extrapolation.
Wherein the basic expression of the extrapolation algorithm is the following formula- (5):
F(t 0 +τ,X)=F(t 0 ,x-a) (5)
i.e. the echo at the future time of the current position is derived from the translation of the echo at a certain position at the current time. The significance of the different extrapolation algorithms is how to establish a link between the two.
Considering the two-dimensional case, when a rainfall field moves from (x-2 a, y-2β) to (x, y), there are:
wherein F represents a function of the rainfall field with respect to the time t and the position x, F (t0+σ) represents an echo at the time x (t0+σ); α, β is the moving distance of the rainfall field in the x, y direction within Δt time, and therefore the following formulas (7) and (8) are used:
a=ΔtU(x-a,y-β,t) (7)
β=ΔtU(x-a,y-β,t) (8)
therefore, the rainfall fields corresponding to the first rainfall image and the second rainfall image are respectively subjected to frame interpolation forwards and backwards through semi-Lagrangian extrapolation. As shown in fig. 4, this embodiment provides an alternative way of determining the target interpolation image corresponding to the time to be interpolated according to the rainfall motion vector, the interpolation interval, the first time and the first rainfall position corresponding to the first rainfall image, and the second time and the second rainfall position corresponding to the second rainfall image, that is, provides a way of refining S103. The specific implementation process can comprise the following steps:
s401, determining a first interpolation rainfall position corresponding to a moment to be interpolated according to a rainfall motion vector, an interpolation interval, a first moment corresponding to a first rainfall image and the first rainfall position.
According to the rainfall motion vector, the interpolation interval, the first moment corresponding to the first rainfall image and the first rainfall position, interpolation is performed between the first moment t1 and the second rainfall moment t2, and a first target interpolation image S1, a second target interpolation image S2 and a third target interpolation image S3, wherein the first rainfall image performs backward interpolation by adopting the semi-Lagrangian extrapolation method, are obtained.
Further, according to the rainfall motion vector, the interpolation interval, a plurality of different time steps, a first moment corresponding to the first rainfall image and a first rainfall position, a first interpolation rainfall position corresponding to the moment to be interpolated is determined.
Considering that the moving speed of the rainfall field varies with space, the whole extrapolation forecast period can be divided into smaller time periods, and an iterative method is adopted to obtain the moving distance of each time step: namely, the above formula (7) and formula (8); and finally, accumulating the moving distances of the steps to obtain the total moving distance, and extrapolating the position of the rainfall field to realize the adjacent extrapolation forecast of the rainfall.
S402, determining a second interpolation rainfall position corresponding to the moment to be interpolated according to the rainfall motion vector, the interpolation interval, the second moment corresponding to the second rainfall image and the second rainfall position.
And interpolating between the first time t1 and the second rainfall time t2 according to the rainfall motion vector, the interpolation interval, the second time corresponding to the second rainfall image and the second rainfall position to obtain a first target interpolation image A1, a second target interpolation image A2 and a third target interpolation image A3 of the second rainfall image, which are subjected to backward interpolation by adopting the semi-Lagrangian extrapolation method.
Further, according to the rainfall motion vector, the interpolation interval, a plurality of different time steps, a first moment corresponding to the first rainfall image and a first rainfall position, a first interpolation rainfall position corresponding to the moment to be interpolated is determined.
Specifically, the moving distance of each time step is obtained by adopting an iterative method, and is the same as the process in the step S401, and finally the moving distances of all the steps are accumulated, so that the total moving distance can be obtained, and the position of the rainfall field is extrapolated, so that the approach extrapolation forecast of the rainfall can be realized.
S403, determining a target interpolation image corresponding to the moment to be interpolated according to the first interpolation rainfall position and the second interpolation rainfall position.
Specifically, determining a target interpolation image corresponding to a time to be interpolated according to the first interpolation rainfall position and the second interpolation rainfall position, including: and carrying out weighting treatment on the first interpolation rainfall position and the second interpolation rainfall position according to a preset weight coefficient to obtain a target interpolation rainfall position corresponding to the moment to be interpolated.
It will be appreciated that linear interpolation is difficult to take into account movement of the weather system and changes in values, given that there may be positional movement and changes in intensity between the weather elements. Therefore, by referring to an optical flow method in the video interpolation frame, an optical flow field between meteorological elements at adjacent moments is calculated, and numerical values at the front moment and the rear moment are mutually interpolated and translated by using the optical flow method.
Wherein, the pixel point matrix corresponding to the rainfall field at the first time t1 is Pre, the pixel point matrix corresponding to the rainfall field at the second time t2 is Nex, and the optical Flow field Flow between Pre and Nex is calculated. Pre1, pre2, and Pre3 (i.e., the first target interpolation image S1, the second target interpolation image S2, and the third target interpolation image S3 described above) are extrapolated using the optical field Pre. Nex is back-extrapolated to Nex1, nex2, and Nex3 (i.e., the first target interpolated image A1, the second target interpolated image A2, and the third target interpolated image A3 described above) using the same method. After the result of the front back calculation is obtained, pre1, nex1, pre2, nex2, pre3, nex3 are weighted according to a certain weight, wherein the weight coefficients are as shown in the following table-table 1:
TABLE 1
In this embodiment, by performing frame interpolation on the precipitation fields corresponding to the first rainfall image and the second rainfall image respectively through semi-lagrangian extrapolation, a more accurate interpolation result can be obtained.
It should be understood that, although the steps in the flowcharts related to the above embodiments are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a rainfall prediction device for realizing the rainfall time downscaling method. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation in the embodiments of the rainfall prediction device or devices provided below may be referred to the limitation of the rainfall time downscaling method hereinabove, and will not be described herein.
In one embodiment, as shown in fig. 5, there is provided a rainfall prediction apparatus 1 including: an acquisition module 11, a speed measurement module 12 and an interpolation module 13, wherein:
an acquisition module 11, configured to acquire a first rainfall image and a second rainfall image acquired at adjacent moments;
the speed measuring and calculating module 12 is used for analyzing the gray value of each pixel point in the first rainfall image and the gray value of each pixel point in the second rainfall image to obtain a rainfall motion vector;
the interpolation module 13 is configured to determine a target interpolation image corresponding to a time to be interpolated according to the rainfall motion vector, the interpolation interval, the first time and the first rainfall position corresponding to the first rainfall image, and the second time and the second rainfall position corresponding to the second rainfall image;
the time downscaling module 14 is configured to generate a rainfall time downscaling result according to the first rainfall image, the second rainfall image and the target interpolation image.
In one embodiment, the speed measurement module 12 includes:
the analysis submodule is used for analyzing the gray value of each pixel point in the first rainfall image and the gray value of each pixel point in the second rainfall image to obtain an optical flow field between the first rainfall image and the second rainfall image;
And the speed determination submodule is used for determining a rainfall motion vector according to the optical flow field.
In one embodiment, the analysis sub-module is further configured to: selecting a target pixel point from the first rainfall image or the second rainfall image; obtaining optical flow fields with different scales according to the gray values of the target pixel points and a multi-scale optical flow method; correspondingly, the speed determination submodule is further configured to: and determining rainfall motion vectors according to the optical flow fields with different scales.
In one embodiment, the interpolation module 13 includes:
the first interpolation submodule is used for determining a first interpolation rainfall position corresponding to the moment to be interpolated according to the rainfall motion vector, the interpolation interval, the first moment corresponding to the first rainfall image and the first rainfall position;
the second interpolation submodule is used for determining a second interpolation rainfall position corresponding to the moment to be interpolated according to the rainfall motion vector, the interpolation interval, the second moment corresponding to the second rainfall image and the second rainfall position;
the target interpolation sub-module is used for determining a target interpolation image corresponding to the moment to be interpolated according to the first interpolation rainfall position and the second interpolation rainfall position.
In one embodiment, the target interpolation sub-module is further configured to: and determining a first interpolation rainfall position corresponding to the moment to be interpolated according to the rainfall motion vector, the interpolation interval, a plurality of different time steps, the first moment corresponding to the first rainfall image and the first rainfall position.
In one embodiment, the time downscaling module 14 is further configured to: and carrying out weighting treatment on the first interpolation rainfall position and the second interpolation rainfall position according to a preset weight coefficient to obtain a target interpolation rainfall position corresponding to the moment to be interpolated.
Each of the modules in the rainfall prediction apparatus 1 described above may be implemented in whole or in part by software, hardware, and a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 6. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used for storing data of a rainfall time downscaling method. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program when executed by a processor implements a rainfall time downscaling method.
It will be appreciated by those skilled in the art that the structure shown in FIG. 6 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In one embodiment, a computer device is provided comprising a memory and a processor, the memory having stored therein a computer program, the processor when executing the computer program performing the steps of:
acquiring a first rainfall image and a second rainfall image acquired at adjacent moments;
analyzing the gray value of each pixel point in the first rainfall image and the gray value of each pixel point in the second rainfall image to obtain a rainfall motion vector;
determining a target interpolation image corresponding to the time to be interpolated according to the rainfall motion vector, the interpolation interval, the first moment and the first rainfall position corresponding to the first rainfall image, and the second moment and the second rainfall position corresponding to the second rainfall image;
and generating a rainfall time downscaling result according to the first rainfall image, the second rainfall image and the target interpolation image.
In one embodiment, when the processor executes logic for analyzing the gray value of each pixel in the first rainfall image and the gray value of each pixel in the second rainfall image by using the computer program, the following steps are specifically implemented: analyzing the gray value of each pixel point in the first rainfall image and the gray value of each pixel point in the second rainfall image to obtain an optical flow field between the first rainfall image and the second rainfall image; and determining a rainfall motion vector according to the optical flow field.
In one embodiment, when the processor executes the logic of analyzing the gray value of each pixel point in the first rainfall image and the gray value of each pixel point in the second rainfall image by executing the computer program to obtain the optical flow field between the first rainfall image and the second rainfall image, the following steps are specifically implemented: selecting a target pixel point from the first rainfall image or the second rainfall image; obtaining optical flow fields with different scales according to the gray values of the target pixel points and a multi-scale optical flow method; correspondingly, determining the rainfall motion vector according to the optical flow field comprises the following steps: and determining rainfall motion vectors according to the optical flow fields with different scales.
In one embodiment, when the processor executes the logic of determining the target interpolation image corresponding to the time to be interpolated according to the rainfall motion vector, the interpolation interval, the first time and the first rainfall position corresponding to the first rainfall image, and the second time and the second rainfall position corresponding to the second rainfall image, the following steps are specifically implemented: determining a first interpolation rainfall position corresponding to a moment to be interpolated according to the rainfall motion vector, the interpolation interval, the first moment corresponding to the first rainfall image and the first rainfall position; determining a second interpolation rainfall position corresponding to the moment to be interpolated according to the rainfall motion vector, the interpolation interval, the second moment corresponding to the second rainfall image and the second rainfall position; and determining a target interpolation image corresponding to the moment to be interpolated according to the first interpolation rainfall position and the second interpolation rainfall position.
In one embodiment, when the processor executes the logic of determining the first interpolation rainfall position corresponding to the time to be interpolated according to the rainfall motion vector, the interpolation interval, the first time corresponding to the first rainfall image and the first rainfall position by executing the computer program, the following steps are specifically implemented: and determining a first interpolation rainfall position corresponding to the moment to be interpolated according to the rainfall motion vector, the interpolation interval, a plurality of different time steps, the first moment corresponding to the first rainfall image and the first rainfall position.
In one embodiment, when the processor executes the logic of determining the target interpolation image corresponding to the time to be interpolated according to the first interpolation rainfall position and the second interpolation rainfall position by executing the computer program, the following steps are specifically implemented: and carrying out weighting treatment on the first interpolation rainfall position and the second interpolation rainfall position according to a preset weight coefficient to obtain a target interpolation rainfall position corresponding to the moment to be interpolated.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of:
acquiring a first rainfall image and a second rainfall image acquired at adjacent moments;
Analyzing the gray value of each pixel point in the first rainfall image and the gray value of each pixel point in the second rainfall image to obtain a rainfall motion vector;
determining a target interpolation image corresponding to the time to be interpolated according to the rainfall motion vector, the interpolation interval, the first moment and the first rainfall position corresponding to the first rainfall image, and the second moment and the second rainfall position corresponding to the second rainfall image;
and generating a rainfall time downscaling result according to the first rainfall image, the second rainfall image and the target interpolation image.
In one embodiment, the logic of the computer program analyzing the gray value of each pixel in the first rainfall image and the gray value of each pixel in the second rainfall image, when executed by the processor, specifically implements the following steps: analyzing the gray value of each pixel point in the first rainfall image and the gray value of each pixel point in the second rainfall image to obtain an optical flow field between the first rainfall image and the second rainfall image; and determining a rainfall motion vector according to the optical flow field.
In one embodiment, the computer program analyzes the gray value of each pixel in the first rainfall image and the gray value of each pixel in the second rainfall image, and when the logic for obtaining the optical flow field between the first rainfall image and the second rainfall image is executed by the processor, the following steps are specifically implemented: selecting a target pixel point from the first rainfall image or the second rainfall image; obtaining optical flow fields with different scales according to the gray values of the target pixel points and a multi-scale optical flow method; correspondingly, determining the rainfall motion vector according to the optical flow field comprises the following steps: and determining rainfall motion vectors according to the optical flow fields with different scales.
In one embodiment, when the logic for determining the target interpolation image corresponding to the time to be interpolated is executed by the processor according to the rainfall motion vector, the interpolation interval, the first time and the first rainfall position corresponding to the first rainfall image, and the second time and the second rainfall position corresponding to the second rainfall image, the computer program specifically realizes the following steps: determining a first interpolation rainfall position corresponding to a moment to be interpolated according to the rainfall motion vector, the interpolation interval, the first moment corresponding to the first rainfall image and the first rainfall position; determining a second interpolation rainfall position corresponding to the moment to be interpolated according to the rainfall motion vector, the interpolation interval, the second moment corresponding to the second rainfall image and the second rainfall position; and determining a target interpolation image corresponding to the moment to be interpolated according to the first interpolation rainfall position and the second interpolation rainfall position.
In one embodiment, the computer program determines the first interpolation rainfall position corresponding to the time to be interpolated according to the rainfall motion vector, the interpolation interval, the first time corresponding to the first rainfall image and the first rainfall position, when the logic of determining the first interpolation rainfall position corresponding to the time to be interpolated is executed by the processor, specifically realizes the following steps: and determining a first interpolation rainfall position corresponding to the moment to be interpolated according to the rainfall motion vector, the interpolation interval, a plurality of different time steps, the first moment corresponding to the first rainfall image and the first rainfall position.
In one embodiment, when the logic for determining the target interpolation image corresponding to the time to be interpolated is executed by the processor according to the first interpolation rainfall position and the second interpolation rainfall position, the computer program specifically implements the following steps: and carrying out weighting treatment on the first interpolation rainfall position and the second interpolation rainfall position according to a preset weight coefficient to obtain a target interpolation rainfall position corresponding to the moment to be interpolated.
In one embodiment, a computer program product is provided comprising a computer program which, when executed by a processor, performs the steps of:
acquiring a first rainfall image and a second rainfall image acquired at adjacent moments;
analyzing the gray value of each pixel point in the first rainfall image and the gray value of each pixel point in the second rainfall image to obtain a rainfall motion vector;
determining a target interpolation image corresponding to the time to be interpolated according to the rainfall motion vector, the interpolation interval, the first moment and the first rainfall position corresponding to the first rainfall image, and the second moment and the second rainfall position corresponding to the second rainfall image;
and generating a rainfall time downscaling result according to the first rainfall image, the second rainfall image and the target interpolation image.
In one embodiment, the logic of the computer program analyzing the gray value of each pixel in the first rainfall image and the gray value of each pixel in the second rainfall image, when executed by the processor, specifically implements the following steps: analyzing the gray value of each pixel point in the first rainfall image and the gray value of each pixel point in the second rainfall image to obtain an optical flow field between the first rainfall image and the second rainfall image; and determining a rainfall motion vector according to the optical flow field.
In one embodiment, the computer program analyzes the gray value of each pixel in the first rainfall image and the gray value of each pixel in the second rainfall image, and when the logic for obtaining the optical flow field between the first rainfall image and the second rainfall image is executed by the processor, the following steps are specifically implemented: selecting a target pixel point from the first rainfall image or the second rainfall image; obtaining optical flow fields with different scales according to the gray values of the target pixel points and a multi-scale optical flow method; correspondingly, determining the rainfall motion vector according to the optical flow field comprises the following steps: and determining rainfall motion vectors according to the optical flow fields with different scales.
In one embodiment, when the logic for determining the target interpolation image corresponding to the time to be interpolated is executed by the processor according to the rainfall motion vector, the interpolation interval, the first time and the first rainfall position corresponding to the first rainfall image, and the second time and the second rainfall position corresponding to the second rainfall image, the computer program specifically realizes the following steps: determining a first interpolation rainfall position corresponding to a moment to be interpolated according to the rainfall motion vector, the interpolation interval, the first moment corresponding to the first rainfall image and the first rainfall position; determining a second interpolation rainfall position corresponding to the moment to be interpolated according to the rainfall motion vector, the interpolation interval, the second moment corresponding to the second rainfall image and the second rainfall position; and determining a target interpolation image corresponding to the moment to be interpolated according to the first interpolation rainfall position and the second interpolation rainfall position.
In one embodiment, the computer program determines the first interpolation rainfall position corresponding to the time to be interpolated according to the rainfall motion vector, the interpolation interval, the first time corresponding to the first rainfall image and the first rainfall position, when the logic of determining the first interpolation rainfall position corresponding to the time to be interpolated is executed by the processor, specifically realizes the following steps: and determining a first interpolation rainfall position corresponding to the moment to be interpolated according to the rainfall motion vector, the interpolation interval, a plurality of different time steps, the first moment corresponding to the first rainfall image and the first rainfall position.
In one embodiment, when the logic for determining the target interpolation image corresponding to the time to be interpolated is executed by the processor according to the first interpolation rainfall position and the second interpolation rainfall position, the computer program specifically implements the following steps: and carrying out weighting treatment on the first interpolation rainfall position and the second interpolation rainfall position according to a preset weight coefficient to obtain a target interpolation rainfall position corresponding to the moment to be interpolated.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the embodiments provided herein may include at least one of a relational database and a non-relational database. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processor referred to in the embodiments provided in the present application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, or the like, but is not limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the application and are described in detail herein without thereby limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of the application should be assessed as that of the appended claims.

Claims (10)

1. A method for downscaling rainfall time, the method comprising:
acquiring a first rainfall image and a second rainfall image acquired at adjacent moments;
analyzing the gray value of each pixel point in the first rainfall image and the gray value of each pixel point in the second rainfall image to obtain a rainfall motion vector;
determining a target interpolation image corresponding to the time to be interpolated according to the rainfall motion vector, the interpolation interval, the first moment and the first rainfall position corresponding to the first rainfall image, and the second moment and the second rainfall position corresponding to the second rainfall image;
And generating a rainfall time downscaling result according to the first rainfall image, the second rainfall image and the target interpolation image.
2. The method of claim 1, wherein analyzing the gray value of each pixel in the first rainfall image and the gray value of each pixel in the second rainfall image comprises:
analyzing the gray value of each pixel point in the first rainfall image and the gray value of each pixel point in the second rainfall image to obtain an optical flow field between the first rainfall image and the second rainfall image;
from the optical flow field, a rainfall motion vector is determined.
3. The method of claim 2, wherein analyzing the gray scale value of each pixel in the first rainfall image and the gray scale value of each pixel in the second rainfall image to obtain the optical flow field between the first rainfall image and the second rainfall image comprises:
selecting a target pixel point from the first rainfall image or the second rainfall image;
obtaining optical flow fields with different scales according to the gray value of the target pixel point and a multi-scale optical flow method;
Correspondingly, the determining the rainfall motion vector according to the optical flow field comprises the following steps:
and determining rainfall motion vectors according to the optical flow fields with different scales.
4. The method of claim 1, wherein determining the target interpolated image corresponding to the time to be interpolated based on the rainfall motion vector, the interpolation interval, the first time and the first rainfall position corresponding to the first rainfall image, and the second time and the second rainfall position corresponding to the second rainfall image, comprises:
determining a first interpolation rainfall position corresponding to a moment to be interpolated according to the rainfall motion vector, the interpolation interval, the first moment corresponding to the first rainfall image and the first rainfall position;
determining a second interpolation rainfall position corresponding to the time to be interpolated according to the rainfall motion vector, the interpolation interval, the second moment corresponding to the second rainfall image and the second rainfall position;
and determining a target interpolation rainfall position corresponding to the moment to be interpolated according to the first interpolation rainfall position and the second interpolation rainfall position.
5. The method of claim 4, wherein determining a first interpolated rain position corresponding to a time to be interpolated based on the rain motion vector, the interpolation interval, the first time corresponding to the first rain image, and the first rain position comprises:
And determining a first interpolation rainfall position corresponding to the moment to be interpolated according to the rainfall motion vector, the interpolation interval, a plurality of different time steps, the first moment corresponding to the first rainfall image and the first rainfall position.
6. The method of claim 4, wherein determining the target interpolated rainfall position corresponding to the time to be interpolated according to the first interpolated rainfall position and the second interpolated rainfall position comprises:
and carrying out weighting treatment on the first interpolation rainfall position and the second interpolation rainfall position according to a preset weight coefficient to obtain a target interpolation rainfall position corresponding to the moment to be interpolated.
7. A rainfall time downscaling device, the device comprising:
the acquisition module is used for acquiring a first rainfall image and a second rainfall image acquired at adjacent moments;
the speed measuring and calculating module is used for analyzing the gray value of each pixel point in the first rainfall image and the gray value of each pixel point in the second rainfall image to obtain a rainfall motion vector;
the interpolation module is used for determining a target interpolation image corresponding to the moment to be interpolated according to the rainfall motion vector, the interpolation interval, the first moment and the first rainfall position corresponding to the first rainfall image, and the second moment and the second rainfall position corresponding to the second rainfall image;
The time downscaling module is used for generating a rainfall time downscaling result according to the first rainfall image, the second rainfall image and the target interpolation image.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 6 when the computer program is executed.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
CN202310703590.3A 2023-06-13 2023-06-13 Rainfall time downscaling method, rainfall time downscaling device, computer equipment and storage medium Pending CN116777743A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310703590.3A CN116777743A (en) 2023-06-13 2023-06-13 Rainfall time downscaling method, rainfall time downscaling device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310703590.3A CN116777743A (en) 2023-06-13 2023-06-13 Rainfall time downscaling method, rainfall time downscaling device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116777743A true CN116777743A (en) 2023-09-19

Family

ID=87990785

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310703590.3A Pending CN116777743A (en) 2023-06-13 2023-06-13 Rainfall time downscaling method, rainfall time downscaling device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116777743A (en)

Similar Documents

Publication Publication Date Title
Guizilini et al. 3d packing for self-supervised monocular depth estimation
Black et al. Robust dynamic motion estimation over time.
JP3603737B2 (en) Moving object tracking method and device
Shen et al. A MAP approach for joint motion estimation, segmentation, and super resolution
CN110782490B (en) Video depth map estimation method and device with space-time consistency
US7912248B2 (en) Hierarchical feature tracking using optical flow
JP2978406B2 (en) Apparatus and method for generating motion vector field by eliminating local anomalies
US8363902B2 (en) Moving object detection method and moving object detection apparatus
Amiaz et al. Coarse to over-fine optical flow estimation
US20060083440A1 (en) System and method
JP2006260527A (en) Image matching method and image interpolation method using same
Liu Video-based face model fitting using adaptive active appearance model
US20220189116A1 (en) Scene representation using image processing
Li et al. Video super-resolution using non-simultaneous fully recurrent convolutional network
CN113076685A (en) Training method of image reconstruction model, image reconstruction method and device thereof
KR20170110089A (en) Method and apparatus for generating an initial superpixel label map for an image
Xiong et al. Contextual sa-attention convolutional LSTM for precipitation nowcasting: A spatiotemporal sequence forecasting view
Zhang et al. Modeling long-and short-term temporal context for video object detection
Adarve et al. A filter formulation for computing real time optical flow
CN112053383A (en) Method and device for real-time positioning of robot
Wang et al. Object counting in video surveillance using multi-scale density map regression
Lu et al. A video prediction method based on optical flow estimation and pixel generation
CN111767679A (en) Method and device for processing time-varying vector field data
CN112418149A (en) Abnormal behavior detection method based on deep convolutional neural network
CN116777743A (en) Rainfall time downscaling method, rainfall time downscaling device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination