Group fog forecasting method based on improved double-brightness difference method and gray forecasting model
Technical Field
The invention relates to a cluster fog forecasting method based on an improved double-brightness difference method and a gray forecasting model, and belongs to the field of cluster fog forecasting.
Background
The cluster fog is a weather phenomenon which has strong burst and small influence range but is extremely harmful to traffic safety, and visibility is generally used as an important parameter for cluster fog forecasting in the weather. The traditional cluster fog forecasting method mainly uses a visibility observer, a laser radar and other meteorological instruments for observation, but has the limitations of sparse equipment distribution, high equipment cost, complex maintenance and the like, so that the monitoring range is limited, local and transient characteristics of the cluster fog are difficult to capture, and the real-time and accurate requirements of cluster fog forecasting cannot be met. In recent years, the application of video monitoring and image processing technology enables capturing of the real-time dynamic of the generation of the mist, but different algorithms influence the accuracy of the visibility detection result, and monitoring and forecasting of the mist development trend cannot be achieved.
Disclosure of Invention
In order to solve the problems in the prior art, the invention provides a cluster fog forecasting method based on an improved double-brightness difference method and a gray forecasting model, which utilizes an improved image processing technology to analyze collected road monitoring video data so as to obtain a visibility time sequence, inputs the visibility time sequence into a GM (1, 1) gray forecasting model of an oscillation sequence, predicts the change trend of visibility along with time, realizes the forecasting of cluster fog and improves the safety of road traffic.
The invention provides a cluster fog forecasting method based on an improved double-brightness difference method and a gray forecasting model, which has the following technical scheme:
a cluster fog forecasting method based on an improved double-brightness difference method and a gray forecasting model comprises the following steps of (1) establishing a video image data set, (2) image graying, (3) image filtering and noise reduction, (4) feature area segmentation and extraction, (5) calculating visibility, (6) repeating the steps (2) to (5) to obtain a time sequence of the visibility, and (7) inputting the time sequence of the visibility to realize forecasting of the cluster fog based on the gray forecasting model.
The step (1) is specifically to decompose frame by frame based on video data collected by the road monitoring equipment to form a video image data set.
The step (2) is specifically as follows:
2.1 reading a color image in the video image dataset obtained in step (1);
2.2 the three red R, green G and blue B channels of each pixel in the color image are processed by a weighted average formula of GRAY=0.30r+0.59g+0.11b to become a GRAY GRAY single channel
2.3. And generating a gray image to realize image graying.
The step (3) specifically comprises the following steps:
and (3) filtering and denoising the gray image obtained in the step (2) by using a median filter.
In the step (4), the feature region is segmented by using a region growing method, and specifically includes the following steps:
4.1. selecting a pixel point as a seed in the sky area in the image obtained in the step (3);
4.2 merging similar pixel points in the neighborhood into the seed region through a threshold value, and performing neighborhood expansion;
4.3 repeating the step 4.1 and the step 4.2, combining the new pixel with the neighborhood thereof as a seed until all the pixels are contained in the characteristic region, and realizing region segmentation;
and 4.4, averaging the gray scale of each pixel point of the segmented sky area to obtain the gray scale Gt of the target object.
The step (5) specifically comprises the following steps:
Selecting two targets, wherein the gray scale of the two targets can be obtained in the step (4) and is respectively marked as Gt1 and Gt2, the distances from the targets to the camera lens are respectively L 1 and L 2,L2-L1, the distances are obtained through pavement marking, and the distances are substituted into a formula: Wherein, V d is visibility, G g1 and G g2 are background sky brightness of two targets respectively, and in order to reduce test error, the target of the selected area is consistent with the line of sight direction of the observation point, G g1=Gg2 is caused, thus the visibility V d is calculated.
In the step (6), the method specifically comprises the following steps:
Repeating the steps (2) to (5), calculating the visibility of all images in the video image dataset, and simultaneously extracting the time information of each image to obtain a time sequence of the visibility.
The step (7) specifically comprises the steps of inputting the time sequence of the visibility obtained in the step (6) into a GM (1, 1) gray prediction model based on an oscillation sequence, respectively constructing a generation column, a matrix B and a data vector Y, and obtaining a time response sequence of the GM (1, 1) gray prediction model of the oscillation sequence, wherein the time response sequence is as follows: therefore, the visibility is predicted and analyzed, and the prediction of the mist is realized.
The method has the advantages that the problems that the existing cluster fog forecasting method is limited in monitoring range, local and transient characteristics of cluster fog are difficult to capture and the accuracy of visibility detection results is not ideal, the cluster fog development trend cannot be monitored and forecasted by combining an improved double-brightness difference method with a gray forecasting model, and the cluster fog in road traffic is timely and accurately forecasted are solved.
Drawings
FIG. 1 is a flow chart of the method for forecasting the mist of the present invention.
FIG. 2 is a schematic diagram showing the selection of seeds in a characteristic region by using a region growing method according to the cluster fog forecasting method of the present invention.
FIG. 3 is a graph showing the effect of region segmentation in the method for forecasting the mass fog.
Fig. 4 is a graph of distance measurement by pavement marking according to the method for forecasting the mass fog of the present invention.
FIG. 5 is a graph showing the result of the grey prediction model prediction in the method for forecasting the mass fog according to the present invention.
Detailed Description
The invention will be further described with reference to specific embodiments, and advantages and features of the invention will become apparent from the description. These examples are merely exemplary and do not limit the scope of the invention in any way. It will be understood by those skilled in the art that various changes and substitutions of details and forms of the technical solution of the present invention may be made without departing from the spirit and scope of the present invention, but these changes and substitutions fall within the scope of the present invention.
Referring to fig. 1 to 5, the invention relates to a cluster fog forecasting method based on an improved double-brightness difference method and a gray forecasting model, which comprises the following steps of (1) establishing a video image data set, (2) image graying, (3) image filtering and noise reduction, (4) feature region segmentation and extraction, (5) calculating visibility, (6) repeating the steps (2) to (5) to obtain a time sequence of the visibility, and (7) inputting the time sequence of the visibility and realizing the forecasting of the cluster fog based on the gray forecasting model.
Based on the setting of the steps, the following steps are realized:
The accuracy is improved, and the formation and development of the mist can be more accurately captured and predicted by combining a double brightness difference method and a gray prediction model.
And the real-time data processing is that the real-time processing and the establishment of the video image data set can timely respond to the environmental change and provide timely mass fog forecast.
The automation degree is high, manual intervention is reduced in an automatic image processing and data analysis process, and the forecasting efficiency and objectivity are improved.
The data utilization is full, namely, the information in the video image data is fully mined and utilized through the steps of graying, filtering noise reduction, feature region segmentation and the like.
The method is suitable for different environments and climatic conditions, and has strong adaptability and universal applicability.
The prediction timeliness is good, and through time sequence analysis, the prediction of the development trend of the mist can be provided, so that preventive measures can be taken in advance.
The step (1) is specifically to decompose frame by frame based on video data collected by the road monitoring equipment to form a video image data set.
The step (2) is specifically as follows:
2.1 reading a color image in the video image dataset obtained in step (1);
2.2, the three channels of red R, green G and blue B of each pixel in the color image are changed into a GRAY GRAY single channel after being processed by a weighted average formula, wherein GRAY=0.30R+0.59G+0.11B;
and 2.3, generating a gray image to realize image graying.
The step (3) is specifically that a median filter is used for filtering and noise reduction treatment of the gray level image obtained in the step (2).
In the step (4), the feature region is segmented by using a region growing method, and specifically includes the following steps:
4.1 as shown in fig. 2, selecting a pixel point as a seed (red square) in the sky area in the image obtained in the step (3);
4.2 merging similar pixel points in the neighborhood into a seed region through a threshold value to carry out neighborhood expansion, 4.3 repeating the steps 4.1 and 4.2, merging new pixels with the neighborhood by taking the new pixels as seeds until all the pixels are contained in a characteristic region, realizing region segmentation, and 4.4 averaging the gray scales of the pixel points in the segmented sky region to obtain the gray scale Gt of the target object, wherein the gray scales of the pixel points in the sky region are shown in figure 3.
The step (5) specifically comprises the following steps:
As shown in FIG. 4, two targets are selected, the gray scale of which can be obtained in the step (4) and is respectively marked as Gt1 and Gt2, the distances from the targets to the camera lens are respectively L1 and L2, and L2-L1 are obtained through road surface identification distances and are substituted into the formula: The Vd is visibility, gg1 and Gg 2 are background sky brightness of two targets respectively, and in order to reduce test errors, the directions of the vision of the targets in the selected area are consistent with the directions of the vision points, G g1=Gg2 is enabled, so that the visibility Vd is calculated.
In the step (6), the method specifically comprises the following steps:
Repeating the steps (2) to (5), calculating the visibility of all images in the video image dataset, and simultaneously extracting the time information of each image to obtain a time sequence of the visibility.
The step (7) specifically comprises the steps of inputting the time sequence of the visibility obtained in the step (6) into a GM (1, 1) gray prediction model based on an oscillation sequence, respectively constructing a generation column, a matrix B and a data vector Y, and obtaining a time response sequence of the GM (1, 1) gray prediction model of the oscillation sequence, wherein the time response sequence is as follows: thus, the visibility is predicted and analyzed, the prediction of the mist is realized, and the prediction result is shown in figure 5.
The foregoing is only a preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art, who is within the scope of the present invention, should make equivalent substitutions or modifications according to the technical scheme of the present invention and the inventive concept thereof, and should be covered by the scope of the present invention.