A rain intensity measurement method based on camera parameter normalization
Through the method of normalizing camera parameters and screening convolution kernels, the difficulty of rainfall measurement caused by differences in different camera parameters is solved, and a large-scale and real-time rainfall measurement is achieved, which is suitable for monitoring camera networks.
Patent Information
- Application Number
- CN202310076415.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-28
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2043-01-28
AI Technical Summary
The prior art cannot achieve large-scale, real-time and accurate rainfall measurements, and the parameter differences of different cameras of different models lead to the inability to effectively promote the algorithm.
By normalizing the parameters of multiple cameras, including normalizing the focal length, rain line angle and resolution, combining convolutional neural network to train the rainfall measurement neural network, identify the liquid level height of the rainfall cylinder, screen the convolution kernel to reduce environmental interference, and realize rainfall measurement.
It realizes large-scale and real-time rainfall measurement, improves the generalizability of the algorithm, is suitable for multiple types of cameras, especially surveillance camera networks, and has real-time measurement functions.
Smart Images

Figure CN116071323B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of hydrological monitoring, and in particular to a rainfall intensity measurement method based on camera parameter normalization. Background Art
[0002] Accurate rainfall measurement is crucial for many fields, including transportation, weather monitoring, and disaster prevention. Excessive rainfall can cause slippery roads and lead to traffic accidents, while extreme weather conditions such as heavy rain can cause flooding. Therefore, accurate rainfall measurement is crucial.
[0003] Currently, the main methods for measuring rainfall include tipping bucket rain gauges, ultrasonic radar rain gauges, and infrared optical rain gauges. While tipping bucket rain gauges are more accurate, they cannot monitor rainfall over a large area. Ultrasonic radar rain gauges are expensive and therefore not widely available. Optical rain gauges, which use cameras as hardware, can be used for large-scale rainfall monitoring at a low cost.
[0004] The camera estimates rainfall by counting the outlines of raindrops in the image. While this enables real-time rainfall monitoring, the number and size of raindrops in each frame vary, limiting its accuracy. Furthermore, different camera models vary in resolution, focal length, and rain line angle. Traditional rainfall measurement methods only work with specific cameras and require modification and adaptation before they can be applied to other cameras. Therefore, it's impossible to effectively utilize the city's existing surveillance camera network for large-scale rainfall measurement. Consequently, the algorithm's scalability is limited. Summary of the Invention
[0005] In view of the above analysis, an embodiment of the present invention aims to provide a rain intensity measurement method based on camera parameter normalization to solve the problem that large-scale measurement cannot be achieved in the existing method.
[0006] In one aspect, an embodiment of the present invention provides a method for measuring rain intensity based on camera parameter normalization, the method specifically comprising:
[0007] Perform parameter normalization on the parameters of multiple cameras;
[0008] Using multiple cameras with normalized parameters, respectively acquire multiple first rain curtain images and second rain curtain images with rain gauges corresponding to the first rain curtain images;
[0009] performing image normalization processing on the first rain curtain image to obtain a third rain curtain image;
[0010] Identify the actual liquid level of the rain in the rain gauge in the second rain curtain image;
[0011] The constructed initial rainfall measurement neural network is trained according to the actual liquid level and the corresponding third rain curtain image to obtain a trained rainfall measurement neural network;
[0012] A parameter-normalized camera is used to obtain the rain curtain image to be measured. After image normalization processing, the measured rainfall value is obtained using the trained rainfall measurement neural network.
[0013] Optionally, normalizing the parameters of the multiple cameras includes:
[0014] Aim each camera at the farthest object in the field of view, adjust the focal length of each camera to make the farthest object clearest, and normalize the focal length of each camera.
[0015] Optionally, performing image normalization processing on the first rain curtain image to obtain a third rain curtain image includes:
[0016] removing static background information interference from the acquired first rain curtain image to obtain the first rain curtain image after removing the static background information interference;
[0017] Normalizing the angles of rain lines in the first rain curtain image after interference removal to obtain the angle-normalized rain curtain image;
[0018] The resolution of the angle-normalized rain curtain image is normalized, and the image resolution is based on the minimum resolution size to obtain a third rain curtain image with a uniform resolution size.
[0019] Optionally, the initial rainfall measurement neural network model includes: a convolutional layer, a pooling layer and a fully connected layer;
[0020] The convolution layer is used to compress the input third rain curtain image to obtain a fourth rain curtain image of a compressed size;
[0021] The convolution layer and the pooling layer are used to sequentially perform convolution and pooling processing on the fourth rain curtain image again to obtain a fifth rain curtain image with reduced image dimension;
[0022] The fully connected layer is used to classify and output the data obtained after dimensionality reduction by the pooling layer.
[0023] Optionally, identifying the actual liquid level of the rain in the rain gauge in the second rain curtain image includes:
[0024] Based on the rain gauge image in the second rain curtain image, the liquid level position is identified by the liquid level recognition network, and the actual height of the liquid level is obtained according to the liquid level position and the height of the rain gauge itself; wherein,
[0025] The liquid level recognition network is obtained by training a Mask R-CNN neural network on a training set of pictures with rain gauges and the liquid level positions of the rain gauges manually marked corresponding to the training set of pictures.
[0026] Optionally, the rain line angle is normalized, including:
[0027] Select one of the rain lines, whose circumscribed moment is m*n;
[0028] In addition, all pixel values in the matrix form an m*n matrix A;
[0029] Calculate the covariance matrix C = A*AT / m of A; and find the eigenvector B of matrix C;
[0030] The direction of the eigenvector B is the direction of the rain line, and the angle between the eigenvector B and the image height direction is D. Calculate the mean D' of all angles with the image height direction, and rotate the image by angle D' according to the matrix rotation formula to obtain the rain line in the vertical direction.
[0031] The original coordinates of a pixel point (x1, y1) are obtained according to the matrix rotation formula to obtain the rotated coordinates (x2, y2);
[0032] Based on the rotated coordinates (x2, y2), a rain curtain image is obtained after the angle normalization of the rain line is rotated to the vertical direction.
[0033] Optionally, obtaining the actual height of the liquid level according to the liquid level position and the height of the rain gauge itself includes:
[0034] Given a rain gauge height of L, and the position of the liquid level, the distance between the liquid level and the bottom of the rain gauge is P1 pixels, and the height of the rain gauge is P2 pixels, the actual liquid level is calculated as:
[0035]
[0036] Optionally, the training of the constructed initial rainfall measurement neural network according to the actual liquid level and the corresponding third rain curtain image to obtain a trained rainfall measurement neural network includes:
[0037] Read the actual liquid level in the rain gauge to obtain the corresponding rainfall label of the third rain curtain image; the details are as follows:
[0038]
[0039] Among them, the rain gauge reading A1 is read at time t1, the rain gauge reading A2 is read at time t2, and R is the rainfall label from t1 to t2;
[0040] A Mask R-CNN neural network is trained based on the third rain curtain image and the rainfall label to obtain a rainfall measurement neural network.
[0041] Optionally, the step of training the constructed initial rainfall measurement neural network according to the actual liquid level and the corresponding third rain curtain image to obtain a trained rainfall measurement neural network further includes: convolution kernel screening;
[0042] The convolution kernel is screened according to the image features to obtain the color convolution kernel and the line convolution kernel;
[0043] According to the characteristics of the obtained rain curtain image, only the line convolution kernel is retained.
[0044] Optionally, the method of acquiring the rain curtain image to be measured using a parameter-normalized camera, and obtaining the measured rainfall value using a trained rainfall measurement neural network after image normalization processing, includes:
[0045] After the rain curtain image to be measured is input into the rainfall measurement neural network, an output value is obtained; the output value is the rainfall label, and the rainfall value corresponding to the rainfall label is found to be the obtained rainfall value.
[0046] On the other hand, compared with the prior art, the present invention can achieve at least one of the following beneficial effects:
[0047] 1. The present invention proposes a rainfall intensity measurement method based on camera parameter normalization and convolution kernel classification and screening. Camera parameter normalization is achieved through focal length normalization, rain line angle normalization, and resolution normalization. After camera parameter normalization, the output image parameters of various cameras are identical. Therefore, the algorithm of the present invention can be used in multiple camera types, especially in surveillance camera networks. Subsequently, by classifying and screening the convolution kernels of the convolutional neural network, the effects of image color and brightness changes on the measurement algorithm are removed. Therefore, camera parameter normalization and convolution kernel classification and screening operations broaden the application scenarios and scope of the algorithm of the present invention and improve its scalability.
[0048] 2. The embodiments of the present invention use a camera that can observe all objects within its viewing cone, enabling wide-range measurement. Furthermore, a neural network can process a single image to obtain rainfall values, enabling real-time measurement. Therefore, the present invention possesses wide-range, real-time measurement capabilities, and its application prospects are broad.
[0049] In the present invention, the above-mentioned technical solutions can be combined with each other to achieve more preferred combinations. Other features and advantages of the present invention will be described in the following description, and some advantages will become apparent from the description or be learned through practice of the present invention. The objectives and other advantages of the present invention can be realized and obtained through the contents particularly pointed out in the description and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] The accompanying drawings are only for the purpose of illustrating particular embodiments and are not to be considered limiting of the present invention. Like reference symbols denote like parts throughout the drawings.
[0051] Figure 1 This is a flow chart of a rain intensity measurement method with camera parameter normalization in the implementation of the present invention;
[0052] Figure 2 The first rain curtain image obtained in the implementation of the present invention;
[0053] Figure 3 The first rain curtain image after removing static background information interference in the embodiment of the present invention;
[0054] Figure 4 This is the third rain curtain image in the embodiment of the present invention;
[0055] Figure 5 Performing resolution normalization on images larger than the normalized size in resolution normalization in an embodiment of the present invention;
[0056] Figure 6 Performing resolution normalization on images smaller than the normalized size in resolution normalization in an embodiment of the present invention;
[0057] Figure 7 This is a structural diagram of a convolutional neural network in an embodiment of the present invention;
[0058] Figure 8 is the contour convolution kernel image in an embodiment of the present invention;
[0059] Figure 9 is a color convolution kernel image in an embodiment of the present invention; DETAILED DESCRIPTION
[0060] The preferred embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings, wherein the accompanying drawings constitute a part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, and are not used to limit the scope of the present invention.
[0061] A specific embodiment of the present invention discloses a rain intensity measurement method using camera parameter normalization and convolution kernel classification screening, such as Figure 1 shown.
[0062] Step S1: performing parameter normalization processing on the parameters of multiple cameras;
[0063] Specifically, the multiple cameras can be multiple surveillance cameras installed at different locations. Since the resolutions and focal lengths of various cameras vary, the rain images obtained are also different. In the embodiments of the present invention, in order to ensure that the rain images obtained in the embodiments of the present invention are clear and visible, and to measure the rainfall obtained by different cameras, it is necessary to normalize the camera parameters to ensure that the obtained rain images have the same clarity.
[0064] Specifically, parameter normalization includes focal length normalization. All cameras are focused on the farthest object in their field of view, and their focal lengths are adjusted to maximize the sharpness of the farthest object. This ensures that the blur levels of objects captured by all cameras are within a similar range. Specifically, each camera is focused on the farthest object in its field of view, and its focal length is adjusted to maximize the sharpness of the farthest object, normalizing the focal lengths of all cameras.
[0065] Step S2: using the plurality of cameras after parameter normalization to respectively acquire a plurality of first rain curtain images and second rain curtain images with rain gauges corresponding to the first rain curtain images.
[0066] Specifically, a first rain curtain image is acquired respectively by multiple cameras after parameter normalization, and a second rain curtain image with a rain gauge corresponding to the first rain curtain image is acquired simultaneously.
[0067] Step S3: performing image normalization processing on the first rain curtain image to obtain a third rain curtain image.
[0068] removing static background information interference from the acquired first rain curtain image to obtain the first rain curtain image after removing the static background information interference;
[0069] Normalizing the angle of rain lines in the first rain curtain image after interference removal to obtain an angle-normalized rain curtain image;
[0070] The resolution of the angle-normalized rain curtain image is normalized, and the image resolution is based on the minimum resolution size to obtain a third rain curtain image with a uniform resolution size.
[0071] Specifically, a large number of first rain curtain images with static background information and second rain curtain images with rain gauges corresponding to the first rain curtain images are acquired through multiple cameras.
[0072] Specifically, the images captured by the camera contain a large amount of static background information, which increases the information complexity of the image and is not conducive to subsequent neural network training. Furthermore, since raindrops are in motion, the present invention uses a three-frame inter-frame difference method to extract the rain curtain image and remove the interference of static background information. The formula is as follows:
[0073]
[0074] Among them, I1, I2, and I3 are the first frame image, the second frame image, and the third frame image, respectively, that is, three consecutive frame images.
[0075] Normalize the rain line angles. Due to inconsistent camera angles or wind influence, the rain line angles in the rain curtain image are not vertically downward. To achieve normalization, principal component analysis is used to detect the rain line direction, calculate the average tilt angle of all rain lines, and then use image rotation to rotate the rain lines to a vertical direction.
[0076] Specifically, when using the principal component analysis method to detect rain lines:
[0077] a1: Select one of the rain lines. The size of its circumscribed moment is m*n;
[0078] a2: All pixel values in this indirect matrix form an m*n matrix A;
[0079] a3: Calculate the covariance matrix C = A*AT / m of A and find the eigenvector B of matrix C;
[0080] a4: The direction of eigenvector B is the direction of the rain line, and the angle between eigenvector B and the image height direction is D. Calculate the mean D' of all angles with the image height direction, and rotate the image by angle D' according to the matrix rotation formula. This will rotate the rain line to the vertical direction.
[0081] For example: the original coordinates of a pixel point (x1, y1), according to the matrix rotation formula:
[0082] x2=x1*cos(D')-y1*sin(D')
[0083] y2=y1*cos(D')+x1*sin(D') to obtain the rotated coordinates (x2, y2). Based on the rotated coordinates (x2, y2), a rain curtain image is obtained after the angle normalization of the rain line is rotated to the vertical direction.
[0084] Perform resolution normalization. The minimum resolution of surveillance cameras is generally greater than 640*480, and the neural network input is generally an image with equal width and height. Therefore, 480*480 is selected as the normalized image size. For images with a size exceeding 480*480, the center of the image is used as the score point, 240 pixels are taken from the top and bottom, and the combination is a 480*480 image. The rest is discarded.
[0085] If the size of the captured image is smaller than the normalized image size, adjust the camera angle and use the image stitching method to stitch images from different angles together to form an image larger than 480*480. At this time, the stitched 480*480 image is intercepted as the normalized image. Due to the stitching accuracy problem, the image effect at the stitching point is poor. Therefore, the selected image should avoid intercepting the stitching part as much as possible to reduce the impact of image stitching.
[0086] Step S4: Identify the actual liquid level of the rain in the rain gauge in the second rain curtain image.
[0087] S41: A camera with normalized parameters is used to obtain a rain curtain image after removing static background information interference and obtain a corresponding rain gauge image. A neural network is used to identify the liquid surface area and read the liquid level in the rain gauge. Then, a real-time rainfall value label is calculated manually and by algorithm.
[0088] Specifically, the actual liquid level in the rain gauge is read to obtain the corresponding rainfall label of the third rain curtain image.
[0089] At time t1, read the rain gauge value A1, and at time t2, read the rain gauge value A2. Then the rainfall label for the time period from t1 to t2 is: At this point, the one-to-one correspondence data between the rain curtain image and the rainfall value label can be obtained.
[0090] Specifically, a camera is pointed at a rain gauge to capture images of the rain gauge. A large number of images with liquid surfaces are collected in advance, and the locations of the liquid surfaces are manually marked to create a training set. The Mask R-CNN neural network is then trained. After training, the images are fed into the Mask R-CNN network, which then marks the liquid surface area and uses the centroid of the liquid surface area as the liquid surface location.
[0091] A Mask R-CNN neural network is trained based on the third rain curtain image and the rainfall label to obtain a rainfall measurement neural network.
[0092] S42: First, the height of the rain gauge is known to be L. The position of the rain gauge in the image is fixed because the camera is fixed. Therefore, we only need to identify the liquid level position to obtain the liquid level height. If the liquid level position is known, the pixel distance between the liquid level and the bottom of the rain gauge is P1 pixels, and the height of the rain gauge is P2 pixels. Therefore, the actual liquid level height can be calculated as:
[0093] Step S5: training the constructed initial rainfall measurement neural network according to the actual liquid level and the corresponding third rain curtain image to obtain a trained rainfall measurement neural network.
[0094] S51: This paper uses a convolutional neural network model (CNN) to measure rainfall. The structure of the convolutional neural network model is shown in the figure below. Figure 3 shown.
[0095] Specifically, this neural network includes a first convolutional layer, a first pooling layer, a second convolutional layer, a second pooling layer, and a fully connected layer.
[0096] The first convolutional layer, the first pooling layer, the second convolutional layer, the second pooling layer and the fully connected layer are connected in sequence;
[0097] The first convolutional layer is used to perform feature extraction on the input third rain curtain image to obtain a fourth rain curtain image after feature extraction;
[0098] The first pooling layer is used to compress the size of the fourth rain curtain image to obtain a compressed fourth rain curtain image;
[0099] The second convolutional layer is used to perform feature extraction on the compressed fourth rain curtain image to obtain a fifth rain curtain image after feature extraction;
[0100] The second pooling layer is used to compress the size of the fifth rain curtain image to obtain a compressed fifth rain curtain image;
[0101] The fully connected layer is used to classify and output the data obtained according to the fifth rain curtain image.
[0102] Specifically, the size of the rain curtain image is 480*480, which is first processed to obtain an image of size 32*32. Then the 32*32 image needs to be input into the neural network.
[0103] After the feature extraction of the 32*32 image by the first convolutional layer, a rain curtain image after feature extraction is obtained, i.e., the fourth rain curtain image. The rain curtain image after feature extraction is passed through the first pooling layer and size compressed to obtain a 14*14 rain curtain image after size compression.
[0104] The fourth rain curtain image is subjected to feature extraction by the second convolutional layer to obtain a fifth rain curtain image after feature extraction, and the fifth rain curtain image is input into the second pooling layer for size compression to obtain a size-compressed 5*5 rain curtain image.
[0105] The fully connected layer is used to classify and output the data obtained according to the fifth rain curtain image.
[0106] The input image is convolved with a 5*5 convolution kernel. The convolution kernel in the convolution operation stores feature data. After the convolution operation, a preliminary processed image is obtained. After the convolution operation, a 28*28 rain curtain image is obtained.
[0107] This image is pooled with a 2x2 pooling kernel. Pooling involves selecting a number from each 2x2 pixel region convolved with the pooling kernel in the 28x28 image as a pixel for the next image. After pooling, the pixel size shrinks to a 14x14 rain curtain image. The main purpose of pooling is to reduce image dimensionality and increase computation speed.
[0108] During this training process, convolution kernels must be screened. After the initial training is complete, the convolution kernel images of all convolutional layers are observed. Convolution kernels can be roughly divided into two categories based on their image characteristics. One category has a single overall gray color with clear boundaries, which are identified as line convolution kernels. The other category has non-gray colors, such as blue, red, or other colors. These colors are rich, but the boundaries are very blurred, making it difficult to accurately identify them with the naked eye. These are color convolution kernels. Because we want to obtain images that are unaffected by changes in ambient color and lighting, we filter the convolution kernels to obtain line convolution kernels and discard the color convolution kernels. Line convolution kernels are used for rainfall detection, which results in more stable rainfall detection results.
[0109] After another round of convolution and pooling on the line convolution kernel, the image can be expanded, and the two-dimensional image can be converted into one-dimensional data, that is, 1600*1 data, according to the set order, and then it can be input into the fully connected layer.
[0110] The first layer of the fully connected layer has 1600 neurons, the second layer has 512 neurons, and the last layer is the output layer, with a total of 100 classified data.
[0111] The expanded 1600*1 data is processed by a two-layer neural network and outputs a value that belongs to 100 classification data. These 100 classification data correspond to the range of 0.1-10mm / min, and the 100 data are generated with a resolution of 0.1mm / min.
[0112] At this point, the construction of the initial rainfall measurement neural network is completed.
[0113] S52: After inputting the rain curtain image to be measured into the rainfall measurement neural network, an output value is obtained; the output value is a rainfall label, and the rainfall value corresponding to the rainfall label is found, which is the obtained rainfall value.
[0114] Specifically, the normalized rain curtain image is input into the above-mentioned rainfall measurement neural network. After the neural network operation, an output value is obtained. This output value is the rainfall value. Since the neural network has 100 labels, this output value must be the same as one of them, thus completing the rainfall measurement function.
[0115] Those skilled in the art will appreciate that all or part of the process steps of the above-described embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, such as a magnetic disk, an optical disk, a read-only memory, or a random access memory.
[0116] The above description is only a preferred specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by any technician familiar with this technical field within the technical scope disclosed by the present invention should be covered by the scope of protection of the present invention.
Claims
1. A method for measuring rainfall intensity based on camera parameter normalization, characterized in that: The method includes: Perform parameter normalization on the parameters of multiple cameras; Using multiple cameras with normalized parameters, respectively acquire multiple first rain curtain images and second rain curtain images with rain gauges corresponding to the first rain curtain images; performing image normalization processing on the first rain curtain image to obtain a third rain curtain image; Identify the actual liquid level of the rain in the rain gauge in the second rain curtain image; The constructed initial rainfall measurement neural network is trained according to the actual liquid level and the corresponding third rain curtain image to obtain a trained rainfall measurement neural network; A parameter-normalized camera is used to obtain the rain curtain image to be measured. After image normalization processing, the measured rainfall value is obtained using the trained rainfall measurement neural network.
2. The method for measuring rain intensity using camera parameter normalization according to claim 1, wherein: The normalizing of the parameters of the multiple cameras includes: Aim each camera at the farthest object in the field of view, adjust the focal length of each camera to make the farthest object clearest, and normalize the focal length of each camera.
3. The method for measuring rain intensity using camera parameter normalization according to claim 2, wherein: The performing image normalization processing on the first rain curtain image to obtain a third rain curtain image includes: removing static background information interference from the acquired first rain curtain image to obtain the first rain curtain image after removing the static background information interference; Normalizing the angles of rain lines in the first rain curtain image after interference removal to obtain the angle-normalized rain curtain image; The resolution of the angle-normalized rain curtain image is normalized, and the image resolution is based on the minimum resolution size to obtain a third rain curtain image with a uniform resolution size.
4. The method for measuring rain intensity using camera parameter normalization according to claim 1, wherein: The initial rainfall measurement neural network model includes: a first convolutional layer, a first pooling layer, a second convolutional layer, a second pooling layer and a fully connected layer; The first convolutional layer, the first pooling layer, the second convolutional layer, the second pooling layer and the fully connected layer are connected in sequence; The first convolutional layer is used to perform feature extraction on the input third rain curtain image to obtain a fourth rain curtain image after feature extraction; The first pooling layer is used to compress the size of the fourth rain curtain image to obtain a compressed fourth rain curtain image; The second convolutional layer is used to perform feature extraction on the compressed fourth rain curtain image to obtain a fifth rain curtain image after feature extraction; The second pooling layer is used to compress the size of the fifth rain curtain image to obtain a compressed fifth rain curtain image; The fully connected layer is used to classify and output the data obtained according to the fifth rain curtain image.
5. The method for measuring rain intensity using camera parameter normalization according to claim 1, wherein: The identifying the actual liquid level of the rain in the rain gauge in the second rain curtain image includes: Based on the rain gauge image in the second rain curtain image, the liquid level position is identified by the liquid level recognition network, and the actual height of the liquid level is obtained according to the liquid level position and the height of the rain gauge itself. The liquid level recognition network is obtained by training a training set of pictures with rain gauges and the liquid level positions of rain gauges manually marked corresponding to the picture training set based on the Mask R-CNN neural network.
6. The method for measuring rain intensity using camera parameter normalization according to claim 3, wherein: The rain line angle is normalized, including: Select one of the rain lines, whose circumscribed moment is m*n; In addition, all pixel values in the matrix form an m*n matrix A; calculate the covariance matrix of A C = A*A T / m; and find the eigenvector B of matrix C; where A T Represents the transpose of matrix A; the direction of eigenvector B is the direction of the rain line, and the angle between eigenvector B and the image height direction is D; calculate the mean D' of all angles with the image height direction, and rotate the image by angle D' according to the matrix rotation formula to obtain the rain lines in the vertical direction; The original coordinates of a pixel point (x1, y1) are obtained according to the matrix rotation formula to obtain the rotated coordinates (x2, y2); Based on the rotated coordinates (x2, y2), a rain curtain image is obtained after the angle normalization of the rain line is rotated to the vertical direction.
7. The method for measuring rainfall intensity using camera parameter normalization according to claim 5, wherein: The method of obtaining the actual height of the liquid level according to the liquid level position and the height of the rain gauge itself includes: Given a rain gauge height of L, and the position of the liquid level, the distance between the liquid level and the bottom of the rain gauge is P1 pixels, and the height of the rain gauge is P2 pixels, the actual liquid level is calculated as:
8. The method for measuring rain intensity using camera parameter normalization according to claim 1, wherein: The step of training the constructed initial rainfall measurement neural network according to the actual liquid level and the corresponding third rain curtain image to obtain a trained rainfall measurement neural network includes: Read the actual liquid level in the rain gauge to obtain the corresponding rainfall label of the third rain curtain image; the details are as follows: Among them, the rain gauge reading A1 is read at time t1, the rain gauge reading A2 is read at time t2, and R is the rainfall label from t1 to t2; A Mask R-CNN neural network is trained based on the third rain curtain image and the rainfall label to obtain a rainfall measurement neural network.
9. The method for measuring rain intensity using camera parameter normalization according to claim 4, wherein: The method further includes: performing convolution kernel screening on the convolution layer; The convolution kernel is screened according to the image features to obtain the color convolution kernel and the line convolution kernel; According to the characteristics of the obtained rain curtain image, only the line convolution kernel is retained.
10. The method for measuring rain intensity using camera parameter normalization according to claim 4, wherein: The method uses a parameter-normalized camera to obtain a rain curtain image to be measured, and after image normalization processing, uses a trained rainfall measurement neural network to obtain a measured rainfall value, including: After the rain curtain image to be measured is input into the rainfall measurement neural network, an output value is obtained; the output value is the rainfall label, and the rainfall value corresponding to the rainfall label is found to be the obtained rainfall value.
Citation Information
Patent Citations
Method and device for automatically identifying and predicting rainfall
CN111950812A
Object detection under rainy conditions for autonomous systems
US20220041185A1