Vehicle-mounted highway tunnel brightness real-time monitoring and early warning system

By monitoring tunnel brightness in real time through an onboard system and using a seven-dimensional spatiotemporal feature vector and a multilayer perceptron model, a dangerous brightness threshold is generated for early warning. This solves the problems of real-time monitoring and accuracy of early warning in tunnel brightness monitoring, reduces tunnel safety protection costs, and improves driving safety.

CN121963496AActive Publication Date: 2026-05-01CHANGSHA UNIVERSITY OF SCIENCE AND TECHNOLOGY
View PDF 15 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHANGSHA UNIVERSITY OF SCIENCE AND TECHNOLOGY
Filing Date
2026-04-01
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing tunnel brightness monitoring methods cannot achieve real-time dynamic data acquisition, resulting in high deployment thresholds and high costs for tunnel safety protection. Furthermore, the early warning mechanism lacks continuous quantitative assessment of the dynamic environment, failing to meet the real-time intervention requirements for traffic safety.

Method used

A vehicle-mounted real-time monitoring and early warning system for highway tunnel brightness was adopted. Tunnel brightness test data was obtained through actual vehicle driving experiments. A seven-dimensional spatiotemporal feature vector was extracted using an image preprocessing module to establish a brightness recognition model, generate dangerous brightness thresholds and issue early warnings. Combined with a multilayer perceptron and an improved clustering algorithm, continuous quantitative assessment of the dynamic environment was achieved.

Benefits of technology

It enables accurate brightness monitoring on ordinary vehicles without modification, lowering the deployment threshold and cost of tunnel safety protection, improving the accuracy and environmental adaptability of early warning, and reducing the risk of traffic accidents caused by blind spots.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121963496A_ABST
    Figure CN121963496A_ABST
Patent Text Reader

Abstract

The invention provides a vehicle-mounted highway tunnel brightness real-time monitoring and early warning system, and belongs to the technical field of vehicle driving, and the system comprises a data obtaining module which obtains tunnel brightness test data through a real vehicle driving experiment; the image preprocessing module obtains a tunnel driving image and preprocesses the tunnel driving image to obtain a seven-dimensional spatial-temporal feature vector; the brightness identification monitoring module establishes a tunnel brightness identification model according to the test data and the seven-dimensional spatial-temporal feature vector, and extracts a tunnel brightness value; the threshold generation and early warning module classifies the brightness values by using an improved clustering algorithm to obtain a tunnel dangerous brightness threshold and performs early warning; and the vehicle-mounted integrated module connects the tunnel brightness identification model and the tunnel dangerous brightness threshold to the vehicle to realize real-time monitoring and early warning. The problems that tunnel safety protection is high in deployment threshold and high in cost due to the fact that a professional brightness detection instrument is needed to obtain accurate brightness detection capacity when a vehicle enters and exits a tunnel, and an existing early warning mechanism lacks dynamic environment continuous quantitative evaluation are solved.
Need to check novelty before this filing date? Find Prior Art

Description

A vehicle-mounted real-time monitoring and early warning system for brightness in highway tunnels. Technical Field

[0001] This invention belongs to the field of automotive driving technology, and in particular relates to a vehicle-mounted real-time monitoring and early warning system for brightness in highway tunnels. Background Technology

[0002] Tunnel driving safety is one of the core challenges in traffic management, and the dynamic changes in ambient light play a crucial role. At tunnel entrances and exits, drastic fluctuations in light intensity can significantly affect drivers' visual adaptation, leading to temporary visual impairment and increasing the risk of rear-end collisions or lane departures. Therefore, real-time monitoring and early warning of ambient light during tunnel entry and exit have become key to improving tunnel traffic safety.

[0003] Existing brightness monitoring methods face significant real-time bottlenecks in driving scenarios. Traditional methods rely on fixed, dedicated brightness detection instruments, which need to be pre-deployed on tunnel walls or roadsides and cannot dynamically collect data as vehicles move. During driving, the vehicle's position constantly changes, and fixed sensors can only provide localized, static data, failing to cover the brightness variation trends throughout the entire driving path. Furthermore, deploying and maintaining these dedicated devices is costly and difficult to integrate widely into ordinary vehicles, resulting in a persistent lack of real-time access to brightness indicators in driving environments.

[0004] During driving, especially in high-risk sections such as tunnels, drivers need immediate warnings of potential dangers, such as blind spots or reduced visibility caused by sudden changes in brightness. Existing warning mechanisms are mostly based on post-event data analysis or static threshold alarms, lacking continuous quantitative assessment of dynamic environments. This lag limits the timeliness of warnings and cannot meet the needs of real-time intervention for driving safety. Summary of the Invention

[0005] To address the aforementioned shortcomings in existing technologies, this invention provides a vehicle-mounted real-time brightness monitoring and early warning system for highway tunnels. This system solves the problems of high deployment thresholds and high costs in tunnel safety protection due to the need for professional brightness detection instruments to obtain accurate brightness detection capabilities when vehicles enter and exit tunnels, as well as the lack of dynamic environmental continuous quantitative assessment in existing early warning mechanisms.

[0006] To achieve the above objectives, the technical solution adopted by this invention is as follows: a vehicle-mounted real-time monitoring and early warning system for highway tunnel brightness, comprising: a data acquisition module for acquiring tunnel brightness test data through actual vehicle driving experiments; an image preprocessing module for acquiring tunnel driving RGB images based on the tunnel brightness test data, and preprocessing the tunnel driving RGB images to obtain a seven-dimensional spatiotemporal feature vector; a brightness recognition and monitoring module for establishing a video-based tunnel brightness recognition model based on the tunnel brightness test data and the seven-dimensional spatiotemporal feature vector, and extracting tunnel brightness values ​​through the tunnel brightness recognition model; a threshold generation and early warning module for classifying brightness indicators based on the tunnel brightness values ​​using an improved clustering algorithm to obtain tunnel dangerous brightness thresholds, and issuing early warnings based on the tunnel dangerous brightness thresholds; and a vehicle-mounted integration module for connecting the tunnel brightness recognition model and the tunnel dangerous brightness thresholds to the vehicle for real-time monitoring and early warning of highway tunnel brightness.

[0007] Further: The image preprocessing module includes: an image acquisition unit for acquiring a tunnel RGB image based on tunnel brightness test data; a color conversion unit for converting the tunnel RGB image into a tunnel HSV image and extracting the brightness channel of the tunnel HSV image to obtain a tunnel grayscale image; a threshold calculation unit for dynamically calculating the optimal segmentation threshold of the tunnel grayscale image using the Otsu algorithm; a binarization processing unit for binarizing the tunnel grayscale image based on the optimal segmentation threshold to obtain a tunnel black-and-white image; a morphological processing unit for obtaining a tunnel binary image based on the tunnel black-and-white image through median filtering, erosion, and dilation operations; and a seven-dimensional feature calculation unit for calculating a seven-dimensional spatiotemporal feature vector based on the tunnel binary image.

[0008] The further beneficial effects mentioned above are as follows: by converting the RGB image of the vehicle recording to the HSV space and extracting the luminance channel, the interference of color information on illumination information is removed. Binarization processing ensures the accuracy and robustness of threshold selection under different tunnel illumination conditions. At the same time, morphological processing such as median filtering, erosion operation and dilation operation can eliminate noise such as road surface reflection and markings, so that the final generated seven-dimensional spatiotemporal feature vector can more comprehensively and stably represent the complex illumination information and dynamic changes inside and outside the tunnel.

[0009] Furthermore, the seven-dimensional spatiotemporal feature vector includes: global white pixel ratio, used to reflect the overall brightness level of the preprocessed black-and-white tunnel image; top white pixel ratio, used to quantify the sky reflection area in the preprocessed black-and-white tunnel image; bottom white pixel ratio, used to quantify the ground reflection area in the preprocessed black-and-white tunnel image; centroid of the white pixel vertical coordinate, used to describe the vertical distribution of white areas in the preprocessed black-and-white tunnel image; maximum connected region ratio, used to identify sky blocks in the preprocessed black-and-white tunnel image; top brightness change rate, used to capture the dynamic changes in brightness of the preprocessed black-and-white tunnel image; and white pixel distribution standard deviation, used to distinguish between natural light and artificial light sources in the preprocessed black-and-white tunnel image.

[0010] The further beneficial effects mentioned above are: the seven-dimensional spatiotemporal feature vector expands a single image brightness value into a structured feature rich in spatiotemporal context, which enhances the representation and differentiation of complex lighting scenes at the tunnel entrance, interior and exit, and facilitates accurate and adaptive brightness recognition and early warning in the future.

[0011] Furthermore: the expression for the global white pixel ratio is as follows:

[0012] in, The global white pixel ratio, This represents the number of white pixels in the binary image of the tunnel traffic. The width of the binary image of the tunnel traffic. The height of the binary image of the tunnel traffic is given; the expression for the proportion of the top white pixels is as follows:

[0013] in, The ratio of the top white pixels, This represents the number of white pixels in the top 30% area of ​​the binary image of the tunnel traffic; the expression for the bottom white pixel ratio is as follows:

[0014] in, The ratio of the bottom white pixels. This represents the number of white pixels in the bottom 30% region of the binary image of the tunnel traffic; the expression for the centroid of the vertical coordinate of these white pixels is as follows:

[0015] in, The centroid of the white pixel's vertical coordinate. For the first The ordinate of each white pixel. Let be the pixel index; the expression for the maximum connected region percentage is as follows:

[0016] in, The percentage of the largest connected region. To obtain the maximum area value among all connected regions, For the first The area of ​​each connected region; the expression for the top brightness change rate is as follows:

[0017] in, The rate of change of brightness at the top. for The ratio of the top white pixels at any given moment. for The ratio of the top white pixels at any given moment. and All are time indices; the expression for the standard deviation of the white pixel distribution is as follows:

[0018]

[0019] in, The standard deviation of the white pixel distribution. For the first The x-coordinate of each white pixel. This is the average of the horizontal coordinates of all white pixels.

[0020] The further beneficial effects mentioned above are: the seven-dimensional time-series feature vector is calculated through mathematical expressions, and the consistency and reproducibility of feature extraction are ensured by setting clear calculation rules.

[0021] Further: The brightness recognition and monitoring module includes: a data alignment unit, used to align the tunnel brightness test data and the seven-dimensional spatiotemporal feature vector with timestamps to obtain data samples; a model building unit, used to establish a real-time brightness detection model based on a multilayer perceptron; a model training unit, used to train the real-time brightness detection model according to the data samples to obtain a tunnel brightness recognition model; and a brightness value extraction unit, used to process the tunnel brightness test data using the tunnel brightness recognition model to obtain the tunnel brightness value.

[0022] The further beneficial effects mentioned above are as follows: by aligning the row timestamps, tunnel brightness test data and image features can be integrated; by adopting a multilayer perceptron model, high-precision determination of tunnel brightness values ​​can be achieved while ensuring real-time performance; stability and generalization ability in the vehicle environment can be ensured; and continuous detection and identification of the lighting environment inside and outside the tunnel can be achieved, providing a reliable data foundation for dynamic safety early warning.

[0023] Furthermore, the expression for the tunnel brightness recognition model is as follows:

[0024]

[0025]

[0026] in, The tunnel brightness prediction value is output by the tunnel brightness recognition model. This is the output layer weight matrix. For the output of the time fusion layer, For the bias of the output layer, The size of the time window. For time indexing, for The output of the feature extraction layer at time step 1. The output of the feature extraction layer, For activation function, This is the weight matrix of the fully connected layer. It is a seven-dimensional spatiotemporal feature vector. This is the bias of the feature extraction layer.

[0027] The further beneficial effects mentioned above are: the feature extraction layer captures nonlinear relationships, the temporal fusion layer uses continuous frame information to smooth noise and enhance temporal consistency, and the final output layer achieves accurate regression, which can complete the high-precision acquisition from image features to physical brightness values ​​with low latency under the limited resources of the vehicle system.

[0028] Further, training the real-time brightness detection model specifically includes: obtaining the actual tunnel brightness value and the predicted tunnel brightness value output by the real-time brightness detection model based on data samples; calculating the loss function of the real-time brightness detection model based on the actual tunnel brightness value and the predicted tunnel brightness value; updating the weight parameters of the real-time brightness detection model using the backpropagation algorithm based on the loss function of the real-time brightness detection model, and calculating the final weight parameters of the real-time brightness detection model by combining the gradient calculation acceleration algorithm and the freezing mechanism; using the final weight parameters as the model parameters of the real-time brightness detection model to complete the training of the real-time brightness detection model and obtain the tunnel brightness recognition model.

[0029] The further beneficial effects mentioned above are: the gradient calculation acceleration algorithm improves the training efficiency of the model under complex features and ensures rapid convergence; the freezing mechanism enhances the generalization ability and stability of the model in the variable tunnel environment; and the final trained tunnel brightness recognition model has high accuracy, strong robustness and engineering practicality.

[0030] Further: The threshold generation and early warning module includes: a standardization unit, used to perform standardization processing based on the tunnel brightness value to obtain a standardized tunnel brightness value; a clustering unit, used to calculate the distance between the sample and the cluster center based on the standardized tunnel brightness value using a clustering algorithm, assign the sample to the nearest cluster, and update the cluster center to obtain a dangerous cluster; a threshold calculation unit, used to calculate the tunnel dangerous brightness threshold based on the dangerous cluster, the tunnel dangerous brightness threshold including a global brightness threshold, a top brightness threshold, and a brightness change threshold; and an early warning execution unit, used to issue early warnings for different states based on the global brightness threshold, the top brightness threshold, and the brightness change threshold.

[0031] The further beneficial effects mentioned above are: standardization can eliminate the influence of dimensions, which facilitates subsequent cluster analysis; the global brightness threshold, top brightness threshold and brightness change threshold calculated by the hazard cluster solve the defects of the traditional method of manually setting thresholds, so that the early warning can adapt to the tunnel environment under different time periods and weather conditions, and improve the accuracy and environmental adaptability of the early warning.

[0032] Furthermore, the expression for the dangerous cluster is as follows:

[0033]

[0034]

[0035]

[0036]

[0037] in, For indexes of dangerous clusters, The global white pixel ratio, The sample set corresponding to the index of the dangerous cluster. To identify the category with the lowest proportion of white pixels, For the updated number The center of each cluster, To be assigned to the The set of all samples in a cluster For the first The number of samples in each cluster To find the distance smallest value, For the sample with cluster The square of the Euclidean distance between the centers For the first The standardized feature vector of each sample. For the first The coordinates of the center point of each cluster For standardized tunnel brightness values, For the first The first sample Each tunnel brightness value, For all samples in the first The average value of each indicator For all samples in the first The standard deviation of each indicator.

[0038] The further beneficial effects mentioned above are: by calculating and identifying dangerous clusters, data representing dangerous states can be extracted from complex brightness data, providing a basic mathematical basis for safety thresholds and improving the reliability and practicality of the early warning system.

[0039] Furthermore: the warnings for the different states specifically include:

[0040]

[0041]

[0042]

[0043] in, Warnings for different states For time indexing, This is a dangerous situation. In a warning state, For safety reasons, for The global white pixel ratio at any given time. for The ratio of the top white pixels at any given moment. The global brightness threshold for dangerous conditions. The top brightness threshold for a dangerous state. for The change in the proportion of the top white pixels at any given moment. The threshold for brightness change in warning status. To calculate the 0.05 quantile of the dataset, To calculate the 0.95 quantile of the dataset, For the first The proportion of global white pixels in each sample. For the first The proportion of the top white pixels of each sample. For the first The proportion of the top white pixels of each sample. The sample set corresponding to the index of the dangerous cluster. To be assigned to the The set of all samples in a cluster.

[0044] The further beneficial effects mentioned above are as follows: the tunnel hazard brightness threshold calculated based on hazard clusters can correspond to various environments such as dim lighting inside the tunnel and sudden changes at the tunnel entrance, avoiding false alarms and missed alarms caused by a single or fixed threshold, improving the accuracy and environmental adaptability of early warning, and enhancing the reliability of active safety protection for tunnel traffic.

[0045] The beneficial effects of this invention are as follows: This invention uses a driving recorder to capture changes in ambient light in real time. When the brightness at the tunnel entrance or exit exceeds the safety threshold, an audible and visual alarm is immediately triggered, enabling the driver to take timely safety measures such as slowing down during the visual adaptation period, thereby reducing the risk of collisions caused by blurred vision.

[0046] This invention utilizes existing vehicle equipment, such as a dashcam, to achieve professional-grade safety monitoring. By analyzing the dashcam video stream using a brightness prediction model, it eliminates the reliance on specialized brightness detection instruments found in traditional technologies. This allows ordinary vehicles to obtain accurate brightness monitoring capabilities without modification, lowering the deployment threshold and cost of tunnel safety protection. Attached Figure Description

[0047] Figure 1 is a schematic diagram of the vehicle-mounted real-time monitoring and early warning system for highway tunnel brightness; Figure 2 is an example of a real-vehicle driving test for tunnel brightness monitoring; Figure 3 is a tunnel driving HSV image; Figure 4 is a tunnel driving grayscale image; Figure 5 is a tunnel driving black and white image; Figure 6 is a tunnel driving binary image; Figure 7 is the training loss curve; Figure 8 is a scatter plot of predicted values; Figure 9 is a feature importance plot; Figure 10 is an error histogram; Figure 11 is a prediction timeline; Figure 12 is a prediction residual analysis plot; Figure 13 is an error analysis statistics plot; Figure 14 is a visualization of the clustering results (PCA). Figure 15 shows the global white pixel distribution of each cluster; Figure 16 shows the pie chart of the warning status distribution; Figure 17 shows the time distribution of the warning status; Figure 18 shows the threshold analysis of the global white pixel ratio; Figure 19 shows the threshold analysis of the top white pixel ratio; Figure 20 shows the threshold analysis of the brightness change value; Figure 21 shows the threshold heatmap; Figure 22 shows the statistical chart of the warning status; Figure 23 shows the global white pixel ratio distribution of each status; Figure 24 shows the time distribution of the warning status; Figure 25 shows the distribution of the warning status in the PCA space; Figure 26 shows the importance analysis of features in the warning. Detailed Implementation

[0048] The specific embodiments of the present invention are described below to enable those skilled in the art to understand the present invention. However, it should be understood that the present invention is not limited to the scope of the specific embodiments. For those skilled in the art, various changes are obvious as long as they are within the spirit and scope of the present invention as defined and determined by the appended claims. All inventions utilizing the concept of the present invention are protected.

[0049] Example 1, as shown in Figure 1, is a schematic diagram of a vehicle-mounted real-time monitoring and early warning system for highway tunnel brightness. It includes: a data acquisition module for acquiring tunnel brightness test data through real-vehicle driving experiments; an image preprocessing module for acquiring RGB images of the tunnel based on the tunnel brightness test data and preprocessing these images to obtain a seven-dimensional spatiotemporal feature vector; a brightness recognition and monitoring module for establishing a video-based tunnel brightness recognition model based on the tunnel brightness test data and the seven-dimensional spatiotemporal feature vector, and extracting tunnel brightness values ​​through the model; a threshold generation and early warning module for classifying brightness indicators using an improved clustering algorithm based on the tunnel brightness values, obtaining a dangerous tunnel brightness threshold, and issuing an early warning based on the dangerous tunnel brightness threshold; and a vehicle-mounted integration module for connecting the tunnel brightness recognition model and the dangerous tunnel brightness threshold to the vehicle for real-time monitoring and early warning of highway tunnel brightness.

[0050] In one embodiment of the present invention, the data acquisition module is used to acquire tunnel brightness test data through a real-vehicle driving experiment. An experimental team consisting of a driver, test vehicle, equipment operator, and data engineer can be assembled. A 1080P resolution, 25fps dashcam is installed at the center rearview mirror of the windshield. A brightness sensor with a range of 0-100000 lux and an accuracy of ±5% is installed directly below it, ensuring the lens and sensor's light-receiving surface are parallel. Millisecond-level time synchronization is achieved through a GPS timing module. The experimental vehicle drives through long, medium, and short tunnels under normal driving conditions, maintaining normal driving status, and synchronously acquiring video streams and brightness data throughout the process. After the experiment, all equipment data is downloaded, and timestamps are used to align video frames and brightness sampling points. After removing invalid data, valid video data in 1080P / 25fps format and the corresponding brightness dataset with a sampling rate of 100Hz are obtained, thus yielding the tunnel brightness test data, which is stored as a matrix in time series for subsequent use. RGB images of vehicles traveling in tunnels can be obtained from valid video data. The color space is RGB, with Red, Green, and Blue as the three basic colors. Various colors are formed by superposition. In computer vision, an RGB image of a vehicle is composed of a 1920×1080 matrix, where each element is the value of the three RGB channels, with a value range of (0, 255). However, the RGB color space is easily affected by light intensity and does not easily reflect the essence of color. When used for brightness detection when vehicles enter or exit tunnels, it is difficult to reflect the true brightness, causing false alarms in brightness warnings. Therefore, this invention converts it into an HSV image and performs feature extraction to obtain a seven-dimensional time-space feature vector.

[0051] In one embodiment of the present invention, the image preprocessing module includes: an image acquisition unit, used to acquire a tunnel vehicle RGB image based on tunnel brightness test data; and a color conversion unit, used to convert the tunnel vehicle RGB image into a tunnel vehicle HSV image, and extract the brightness channel of the tunnel vehicle HSV image to obtain a tunnel vehicle grayscale image. In a specific embodiment of the present invention, the color space of the tunnel vehicle HSV image consists of three channels: hue (H), saturation (S), and value (V). The hue value refers to the color attribute it represents when describing a pure color, measured by angle, and ranges from 0° to 360°, where red is 0° and green is 120°. Blue is 240°; saturation refers to the purity of a color, ranging from 0% to 100%, with higher saturation values ​​indicating a deeper color; brightness refers to the lightness of a color, ranging from 0% to 100%, with higher brightness values ​​indicating a brighter color. Compared to the RGB color space, the HSV color space can make the hue, saturation, and brightness components independent, eliminating the influence of color intensity on color information. Therefore, in this invention, the HSV image can accurately reflect the dynamic brightness changes of a vehicle entering and exiting a tunnel. As shown in Figure 2, which is an example of a real-vehicle driving test for tunnel brightness monitoring, it is an RGB image. It is converted into a tunnel driving HSV image as shown in Figure 3. The specific expression for converting an RGB image into an HSV image is as follows:

[0052]

[0053]

[0054] in, Hue indicates the type of color in the image; V represents saturation, indicating the purity of image colors; V represents brightness, indicating the purity of colors. This represents the value of the R channel in an RGB image. This represents the value of the G channel in an RGB image. This represents the value of the B channel in an RGB image. The maximum value among R, G, and B; It is the minimum value among R, G, and B.

[0055] After obtaining the HSV image of the tunnel vehicle, although the interference of color information on brightness information is eliminated, the problem of inaccurate brightness prediction due to color space conversion and noise interference still exists. Therefore, this invention extracts the lightness channel, i.e., the V channel, of the HSV color space as the main source of brightness. Using an adaptive threshold segmentation algorithm such as the Otsu algorithm, the segmentation threshold is dynamically calculated, and the image is binarized to distinguish between bright and dark areas, resulting in the grayscale image of the tunnel vehicle as shown in Figure 4. This determines the proportion of bright pixels in the vehicle image to improve the accuracy of subsequent brightness prediction. The expression for extracting the lightness channel is as follows:

[0056] in, coordinates The brightness channel grayscale image at that location; For HSV images in coordinates The brightness value of the pixel.

[0057] The threshold calculation unit is used to dynamically calculate the optimal segmentation threshold of the tunnel traffic grayscale image using the Otsu algorithm; the expression for the optimal segmentation threshold is as follows:

[0058] in, The optimal image segmentation threshold obtained by the Otsu algorithm. To find the expression within the parentheses that maximizes its value. A function of value This represents the proportion of pixels with brightness ≤ T out of the total number of pixels in the image. This represents the proportion of pixels with brightness greater than T out of the total number of pixels in the image. This represents the average brightness of pixels in darker areas. This represents the average brightness of the pixels in the highlighted area.

[0059] The binarization unit is used to binarize the grayscale image of the tunnel traffic based on the optimal segmentation threshold, resulting in the black-and-white image of the tunnel traffic as shown in Figure 5. The expression for binarization is as follows:

[0060] in, coordinate point The pixel binary at that location, This indicates that the pixel is a high-brightness pixel; This indicates that the pixel is a low-brightness pixel.

[0061] S205. Based on the black-and-white image of the tunnel traffic, a binary image of the tunnel traffic is obtained through median filtering, erosion, and dilation operations. While the black-and-white image can roughly represent brightness changes, it contains some noise interference, such as white markings on the ground and white parts of signs. Noise affects the accuracy of highlight area recognition and reduces the accuracy of brightness prediction. Therefore, noise removal is needed to reduce the impact of noise on recognition accuracy. Morphological processing is performed on the image through erosion and dilation operations to further remove noise in small areas and fill holes in the image, achieving overall optimization of the image structure. The expressions for median filtering, erosion, and dilation operations are as follows:

[0062]

[0063]

[0064] in, After median filtering Output value at; Center pixel; Median selection operation The sequence of pixels in the neighborhood of the center pixel; The image shows the vehicle after the etching process is complete. The source image is the input; This is a dilated image of the vehicle.

[0065] This invention removes fine noise from a black-and-white image of a tunnel vehicle using median filtering, while preserving important information such as the image's contours and edges to improve the accuracy of brightness feature extraction. While most of the fine noise in the median-filtered image is eliminated, some larger noise remains. To address this, based on the need for accurate highlight region recognition, this invention employs image morphology techniques of erosion and dilation for further processing. Through erosion, the median-filtered black-and-white image of the tunnel vehicle is convolved to find the minimum value within the kernel region. This minimum value is then assigned to the pixel at the kernel center, eliminating bulges in the median-filtered image and yielding the eroded black-and-white image of the tunnel vehicle. Through dilation, the maximum value within the kernel region is calculated and assigned to the pixel at the kernel center, filling in holes in the median-filtered image and connecting the blank hole regions. Finally, a binary image of the tunnel vehicle is obtained as shown in Figure 6.

[0066] A seven-dimensional feature calculation unit is used to calculate a seven-dimensional spatiotemporal feature vector based on the binary image of the tunnel traffic. After obtaining the binary image of the tunnel traffic, its bright areas are almost identical to the corresponding bright areas in the RGB image of the tunnel traffic. Therefore, this invention uses the proportion and distribution of bright pixels in the binary image of the tunnel traffic as input features for brightness prediction, and defines the spatial partitioning rules of the binary image of the tunnel traffic: let the height of the image be H pixels, the width be W pixels, the top area be the area of ​​the upper 30% height of the image, and the bottom area be the area of ​​the lower 30% height of the image; and extract the seven-dimensional spatiotemporal feature vector accordingly. The seven-dimensional spatiotemporal feature vector is then input into a pre-trained brightness prediction model to obtain the brightness prediction value.

[0067] In a specific embodiment of the present invention, the seven-dimensional spatiotemporal feature vector includes: a global white pixel ratio, used to reflect the overall brightness level of the preprocessed tunnel driving black-and-white image, and the expression for the global white pixel ratio is as follows:

[0068] in, The global white pixel ratio, This represents the number of white pixels in the binary image of the tunnel traffic. The width of the binary image of the tunnel traffic. The height of the binary image of the tunnel traffic is denoted as ; the top white pixel ratio is used to quantize the sky reflection area in the preprocessed black and white image of the tunnel traffic. The expression for the top white pixel ratio is as follows:

[0069] in, The ratio of the top white pixels, This represents the number of white pixels in the top 30% region of the binary image of tunnel traffic; the bottom white pixel ratio is used to quantize the ground reflection area in the preprocessed black and white image of tunnel traffic. The expression for the bottom white pixel ratio is as follows:

[0070] in, The ratio of the bottom white pixels. This represents the number of white pixels in the bottom 30% region of the binary image of tunnel traffic; the centroid of the white pixel's ordinate is used to describe the vertical distribution of the white area in the preprocessed black-and-white image of tunnel traffic. The expression for the centroid of the white pixel's ordinate is as follows:

[0071] in, The centroid of the white pixel's vertical coordinate. For the first The ordinate of each white pixel. is the pixel index; is the maximum connected region percentage, used to identify sky blocks in the preprocessed black-and-white image of tunnel traffic. The expression for the maximum connected region percentage is as follows:

[0072] in, The percentage of the largest connected region. To obtain the maximum area value among all connected regions, For the first The area of ​​each connected region; the top brightness change rate, used to capture the dynamic brightness changes of the preprocessed tunnel driving black-and-white image, is expressed as follows:

[0073] in, The rate of change of brightness at the top. for The ratio of the top white pixels at any given moment. for The ratio of the top white pixels at any given moment. and All are time indices; the standard deviation of the white pixel distribution is used to distinguish between natural light and artificial light sources in the preprocessed black-and-white tunnel traffic images. The expression for the standard deviation of the white pixel distribution is as follows:

[0074]

[0075] in, The standard deviation of the white pixel distribution. For the first The x-coordinate of each white pixel. This is the average of the horizontal coordinates of all white pixels.

[0076] The seven-dimensional spatiotemporal feature vector can comprehensively and dynamically display the complex lighting transition scene inside and outside the tunnel, providing reliable input features for the real-time brightness detection model, improving the accuracy of real-time brightness detection, and reducing the driving safety risks caused by sudden changes in light when entering and exiting the tunnel.

[0077] In one embodiment of the present invention, a brightness recognition and monitoring module is used to establish a video-based tunnel brightness recognition model based on tunnel brightness test data and a seven-dimensional spatiotemporal feature vector, and to extract tunnel brightness values ​​through the tunnel brightness recognition model. The brightness recognition and monitoring module includes: a data alignment unit, used to align the tunnel brightness test data and the seven-dimensional spatiotemporal feature vector with timestamps to obtain data samples; a model building unit, used to establish a real-time brightness detection model based on a multilayer perceptron; a model training unit, used to train the real-time brightness detection model based on the data samples to obtain a tunnel brightness recognition model; and a brightness value extraction unit, used to process the tunnel brightness test data using the tunnel brightness recognition model to obtain tunnel brightness values.

[0078] In a specific embodiment of the present invention, a tunnel driving video sequence with a duration of 1 minute is acquired, and video frames are extracted at 10 frames per sampling point, resulting in a total of 180 sampling points. The video frames corresponding to each sampling point are subjected to image binarization processing, and a seven-dimensional spatiotemporal feature vector is extracted from each binarized image to construct a data sample set for model training.

[0079] In a specific embodiment of the present invention, a real-time brightness detection model is established based on a multilayer perceptron. The multilayer perceptron design is simple. In this invention, by fusing seven-dimensional spatiotemporal feature vectors, high-precision brightness detection can be achieved with low computational cost, improving adaptability to real-time changes in lighting conditions inside and outside the tunnel, and enhancing the accuracy of the final warning. The real-time brightness detection model includes a feature extraction layer, a temporal fusion layer, and an output layer. Specifically, the expression for the feature extraction layer is as follows: ; , , ,

[0080] in, The output of the feature extraction layer, For activation function, This is the weight matrix of the fully connected layer. It is a seven-dimensional spatiotemporal feature vector. The bias of the feature extraction layer is used; the expression for the temporal fusion layer is as follows: ; , , ;in, For the output of the time fusion layer, The size of the time window. For time indexing, for The output of the feature extraction layer at time step 1. express and It is a 16-dimensional real vector; To represent a fixed time window of 13 frames, the expression for the output layer is as follows:

[0081] , ,

[0082] in, This is the predicted brightness value. This is the output layer weight matrix; For output layer bias

[0083] In a specific embodiment of the present invention, the model training unit is used to train the real-time brightness detection model based on data samples to obtain a tunnel brightness recognition model; wherein, training the real-time brightness detection model specifically includes: dividing the data samples into a training set and a test set in a 7:3 ratio, and training the established real-time brightness detection model; obtaining the actual tunnel brightness value based on the data samples. Tunnel brightness prediction value output by the real-time brightness detection model Based on the actual value of tunnel brightness and tunnel brightness prediction value The loss function of the real-time brightness detection model is calculated, and its expression is as follows:

[0084] in, Let be the loss function of the real-time brightness detection model. This is the predicted brightness value; The actual brightness value; based on the loss function of the real-time brightness detection model. The weight parameters of the real-time brightness detection model are updated using the backpropagation algorithm, and the final weight parameters of the model are obtained by combining a gradient calculation acceleration algorithm and a freezing mechanism. Specifically, the weight parameters of the brightness prediction model based on the loss function are first calculated using the backpropagation algorithm. The gradient of is expressed as follows:

[0085] in, For the loss function with respect to the weight parameters gradient, For the loss function Find the weight parameters The partial derivatives of the partial derivatives are used to update the weights; the expression for updating the weights using gradient descent is as follows:

[0086] in, for The weight parameters of the brightness prediction model at each time step. for Weight parameters of the brightness prediction model at any given time; The learning rate is a hyperparameter used to adjust the step size; the weight parameters of the brightness prediction model are updated using the backpropagation algorithm until the convergence condition is met. ,in, The preset convergence threshold, for The loss function at time step 1. for The loss function at each time step; updating the weight parameters of the brightness prediction model through backpropagation ensures that the weight parameters can converge stably to the global optimum, thus improving the accuracy of the brightness prediction model.

[0087] Meanwhile, addressing the problems of low training efficiency, overfitting, and difficulty in converging to the optimal solution in traditional deep learning models for tunnel brightness detection applications due to the complexity of input feature vectors, this invention adds a hybrid training framework based on acceleration algorithms and freezing mechanisms to the backpropagation algorithm. This further improves the training speed and weight generalization ability of the brightness prediction model, enabling it to maintain high-precision prediction stability in complex driving environments. The gradient calculation acceleration algorithm includes the following forward propagation calculation method:

[0088] in, The linear output of the convolutional layer. For vectorization operations; the convolutional layer weights in the weight parameters of the brightness prediction model. The gradient calculation uses the im2col gradient calculation acceleration algorithm, and the expression is as follows:

[0089] in, To obtain the partial derivative of the loss function with respect to the weights of the convolutional layer, For rearranging the input data; The im2col function; This is the matrix transpose. The error propagated from upstream; the weights of the fully connected layers in the weight parameters of the brightness prediction model. The gradient calculation is simplified, and the expression is as follows:

[0090] in, To obtain the partial derivative of the loss function with respect to the weights of the fully connected layer, To obtain the partial derivative of the brightness prediction value with respect to the loss function; The derivative of the activation function; The input vector is the fully connected layer; the freezing mechanism is: determining the loss function of the validation set. If the weights are less than a preset loss function threshold, the final weight parameters of the brightness prediction model are obtained; otherwise, the weight parameters of the brightness prediction model are updated using the backpropagation algorithm. The expression for the final weight parameters of the brightness prediction model is as follows:

[0091] in, These are the final weight parameters for the brightness prediction model. To minimize the parameter finder; For model prediction functions; The actual label values; the final weight parameters The real-time brightness detection model was trained using the model parameters to obtain the tunnel brightness recognition model. The model was then validated using a test set to test its performance.

[0092] In a specific embodiment of the present invention, the model exhibits excellent convergence and stability during training, achieving prediction accuracy at an engineering-practical level, with reasonable error control and strong feature interpretability. The training loss curve is shown in Figure 7. The model reaches a stable state after approximately 2000 training rounds, with both training and validation losses decreasing to 50.79, indicating no overfitting and good training performance. The scatter distribution of predicted values ​​is shown in Figure 8, demonstrating extremely high prediction accuracy (R² = 0.9017, MSE = 46.70, MAE = 5.49). The predicted and true values ​​are closely distributed near the ideal diagonal, indicating excellent fitting ability and generalization performance. The feature importance analysis is shown in Figure 9, showing a reasonable distribution of feature contributions. The centroid of the white pixel's vertical coordinate has the greatest impact on brightness prediction (weight 22.7%), followed by the largest connected region (weight 16.2%), while the proportion of top white pixels has the least impact (weight 8.8%). The ranking of feature importance has clear physical significance. The prediction error analysis is shown in Figure 10, showing an error distribution that basically conforms to a normal distribution. The error distribution has a mean of -0.0546 close to 0, a standard deviation of 6.8336 which is moderate, and a median of 0.6334 slightly larger than the mean, indicating a slight right skew in the error distribution, but overall it is concentrated within a reasonable range. The prediction time comparison curve is shown in Figure 11. The time series prediction trend matches well, and the curves of the actual value and the predicted value are basically consistent. Although there are deviations at individual sample points, the model can accurately capture the brightness change pattern overall. The prediction residual analysis is shown in Figure 12. The residuals have no obvious pattern, and the residual points are randomly distributed near the 0 line. The mean of -0.0546 is close to 0, and the standard deviation of 6.8336 shows that the error fluctuation range is reasonable. The error analysis statistics are shown in Figure 13. The model has excellent overall performance, with R²=0.9017, MSE=46.70, MAE=5.50, and 84.6% of the sample errors are within 10, indicating that the model is accurate in most cases.

[0093] In one embodiment of the present invention, a threshold generation and early warning module is used to classify brightness indicators based on tunnel brightness values ​​using an improved clustering algorithm to obtain a dangerous brightness threshold for the tunnel, and to issue an early warning based on the dangerous brightness threshold. The threshold generation and early warning module includes: a standardization unit, used to perform standardization processing on the tunnel brightness values ​​to obtain standardized tunnel brightness values; and a clustering unit, used to calculate the distance between samples and cluster centers based on the standardized tunnel brightness values ​​using a clustering algorithm, assign samples to the nearest cluster, update the cluster centers, and obtain dangerous clusters. The specific steps are as follows: Standardize the original brightness index to eliminate the influence of dimensions. The expression is as follows:

[0094] in For standardized tunnel brightness values, For the first The first sample Each tunnel brightness value, For all samples in the first The average value of each indicator For all samples in the first The standard deviation of each indicator is calculated; the squared Euclidean distance between each sample and the cluster center is expressed as follows:

[0095] in, For the sample with cluster The square of the Euclidean distance between the centers For the first The standardized feature vector of each sample; For the first The coordinates of the center point of each cluster; assign the sample to the nearest cluster, as shown in the following expression:

[0096] in, For the sample The index of the cluster to which it was assigned. To find the distance smallest Value; based on the newly assigned samples, recalculate the cluster centers, as shown in the following expression:

[0097] in, For the updated number The center of each cluster, To be assigned to the The set of all samples in a cluster; For the first Number of samples in each cluster; identify cluster indices representing dangerous states. The expression is as follows:

[0098] in, For the index of clusters identified as being in a dangerous state, To identify the category with the lowest proportion of white pixels, Index of clusters in dangerous state The corresponding sample set; a threshold calculation unit, used to calculate the tunnel hazard brightness threshold based on the hazard clusters, the tunnel hazard brightness threshold including a global brightness threshold, a top brightness threshold, and a brightness change threshold; and a warning execution unit, used to issue warnings for different states based on the global brightness threshold, the top brightness threshold, and the brightness change threshold; the warnings for different states specifically include:

[0099]

[0100]

[0101]

[0102] in, Warnings for different states For time indexing, This is a dangerous situation. In a warning state, For safety reasons, for The global white pixel ratio at any given time. for The ratio of the top white pixels at any given moment. The global brightness threshold for dangerous conditions. The top brightness threshold for a dangerous state. for The change in the proportion of the top white pixels at any given moment. The threshold for brightness change in warning status. To calculate the 0.05 quantile of the dataset, To calculate the 0.95 quantile of the dataset, For the first The proportion of global white pixels in each sample. For the first The proportion of the top white pixels of each sample. For the first The proportion of the top white pixels of each sample. The sample set corresponding to the index of the dangerous cluster. To be assigned to the The set of all samples in a cluster.

[0103] In a specific embodiment of the present invention, the system automatically determines the dangerous brightness threshold of the tunnel through intelligent clustering analysis, which can accurately classify the tunnel's operating status and provide timely warnings. The clustering results and PCA visualization are shown in Figure 14. The clustering effect is good, and the three clusters are clearly separated in the PCA dimensionality reduction space. The center positions of the dangerous clusters are accurately marked, providing a reliable clustering basis for subsequent threshold calculation. The global white pixel distribution of each cluster is shown in Figure 15. The dangerous clusters are accurately identified. The global white pixel ratio of cluster 2 is significantly lower than that of the other two clusters, and a large number of samples are below the danger threshold of 0.191, verifying the correctness and effectiveness of the clustering analysis. The warning status distribution is shown in Figure 16. The warning distribution is reasonable, with safe status accounting for 91.7%, warning status accounting for 5.0%, and dangerous status accounting for 3.3%. This distribution conforms to the safety rules of actual tunnel operation, and the system's warning strategy is scientific. The warning status time distribution is shown in Figure 17. The warning time distribution is clear. The safe status dominates in the time series, while the dangerous and warning statuses appear sporadically, showing a reasonable fluctuation pattern of tunnel brightness changes. The global brightness threshold analysis is shown in Figure 18. The threshold setting is reasonable. Dangerous status mainly occurs in the sample index range of 130-150. At this time, the global white pixel ratio is significantly lower than the danger threshold of 0.191, and the warning mechanism is responsive. The analysis of the top brightness threshold is shown in Figure 19. The top features are effective, and the proportion of white pixels at the top fluctuates significantly. The dangerous state occurs when the brightness falls below the threshold of 0.144, highlighting the importance of monitoring the brightness at the top of the tunnel. The analysis of the brightness change threshold is shown in Figure 20. The change monitoring is sensitive, and the brightness change exceeds the warning threshold of 0.779 multiple times. The system successfully captured the sudden change in tunnel brightness, and the early warning mechanism is functioning well. The heatmap of the mean values ​​of each state feature is shown in Figure 21. The feature distinction is obvious. The mean values ​​of the features in the safe state are generally higher than those in the warning and dangerous states. In particular, the standard deviation of the feature in the safe state reaches 1081.42, showing good feature discrimination ability. The statistics of the early warning state are shown in Figure 22. The statistics are intuitive and clear. There are 165 samples in the safe state, 9 samples in the warning state, and 6 samples in the dangerous state. The bar chart intuitively shows the sample distribution of the early warning state. Figure 23 shows the global white pixel proportion distribution of each state. The state distinction is significant. The proportion of white pixels in the safe state is significantly higher than that in the warning and dangerous states, and the dangerous state data is concentrated in the range of 0.1-0.15, which is below 0.The danger threshold of 191 verified the accuracy of the early warning judgment. The temporal distribution of early warning states, as shown in Figure 24, indicates stable and reliable system operation, with the safe state dominating. Warning and danger states only appear sporadically at specific times, demonstrating the rationality of the early warning mechanism design and the high reliability of the system. The distribution of early warning states in the PCA space, as shown in Figure 25, shows good distinguishability among different early warning states in the feature space. Safe state points are concentrated, while warning and danger state points are scattered in specific areas, verifying the effectiveness of feature extraction and cluster analysis. The importance analysis of features in early warning, as shown in Figure 26, demonstrates reasonable feature weight settings, clearly presenting the contribution of each feature to the early warning judgment. The global white ratio and top white ratio have the highest weights, while the weights of other features are appropriately set, conforming to the physical laws and engineering practice experience of tunnel brightness monitoring.

[0104] In one embodiment of the present invention, an in-vehicle integrated module is used to connect the tunnel brightness recognition model and the tunnel dangerous brightness threshold to the vehicle for real-time monitoring and early warning of highway tunnel brightness. It can be connected to a dashcam for brightness detection, solving the problem of high cost and high barriers to entry caused by the need for additional professional brightness detection instruments and image acquisition equipment when vehicles enter and exit tunnels. This eliminates the reliance on professional brightness detection instruments for brightness detection during vehicle movement, building all-weather driving safety protection based on the existing general-purpose dashcam. It can respond in real-time to changes in the brightness of the driving environment, reducing potential driving risks caused by sudden brightness changes when vehicles enter and exit tunnels. Simultaneously, by acquiring driving images through the vehicle's dashcam, deployment costs are reduced, and continuous 24 / 7 video capture ensures the real-time and continuous nature of the data, providing scientifically reliable continuous driving environment data for proactive safety warnings in tunnels, and achieving continuous quantitative assessment of the driving environment.

[0105] The beneficial effects of this invention are as follows: This invention uses a driving recorder to capture changes in ambient light in real time. When the brightness at the tunnel entrance or exit exceeds the safety threshold, an audible and visual alarm is immediately triggered, enabling the driver to take timely safety measures such as slowing down during the visual adaptation period, thereby reducing the risk of collisions caused by blurred vision.

[0106] This invention utilizes existing vehicle equipment, such as a dashcam, to achieve professional-grade safety monitoring. By analyzing the dashcam video stream using a brightness prediction model, it eliminates the reliance on specialized brightness detection instruments found in traditional technologies. This allows ordinary vehicles to obtain accurate brightness monitoring capabilities without modification, lowering the deployment threshold and cost of tunnel safety protection.

Claims

1. A vehicle-mounted real-time monitoring and early warning system for brightness in highway tunnels, characterized in that, include: The data acquisition module is used to acquire tunnel brightness test data through real vehicle driving experiments; The image preprocessing module is used to acquire the tunnel RGB image of the vehicle based on the tunnel brightness test data, and to preprocess the tunnel RGB image to obtain a seven-dimensional spatiotemporal feature vector. The brightness recognition and monitoring module is used to establish a video-based tunnel brightness recognition model based on tunnel brightness test data and a seven-dimensional spatiotemporal feature vector, and to extract the tunnel brightness value through the tunnel brightness recognition model. The threshold generation and early warning module is used to classify brightness indicators based on tunnel brightness values ​​using an improved clustering algorithm, obtain dangerous brightness thresholds for tunnels, and issue early warnings based on these thresholds. The vehicle-mounted integrated module is used to connect the tunnel brightness recognition model and the tunnel dangerous brightness threshold to the vehicle for real-time monitoring and early warning of highway tunnel brightness.

2. The vehicle-mounted real-time monitoring and early warning system for highway tunnel brightness according to claim 1, characterized in that, The image preprocessing module includes: an image acquisition unit for acquiring an RGB image of a tunnel vehicle based on tunnel brightness test data; a color conversion unit for converting the RGB image of the tunnel vehicle into an HSV image of the tunnel vehicle, and extracting the brightness channel of the HSV image to obtain a grayscale image of the tunnel vehicle; a threshold calculation unit for dynamically calculating the optimal segmentation threshold of the grayscale image of the tunnel vehicle using the Otsu algorithm; a binarization processing unit for binarizing the grayscale image of the tunnel vehicle based on the optimal segmentation threshold to obtain a black and white image of the tunnel vehicle; a morphological processing unit for obtaining a binary image of the tunnel vehicle based on the black and white image of the tunnel vehicle through median filtering, erosion, and dilation operations; and a seven-dimensional feature calculation unit for calculating a seven-dimensional spatiotemporal feature vector based on the binary image of the tunnel vehicle.

3. The vehicle-mounted real-time monitoring and early warning system for highway tunnel brightness according to claim 2, characterized in that, The seven-dimensional spatiotemporal feature vector includes: global white pixel ratio, used to reflect the overall brightness level of the preprocessed black-and-white tunnel image; top white pixel ratio, used to quantify the sky reflection area in the preprocessed black-and-white tunnel image; bottom white pixel ratio, used to quantify the ground reflection area in the preprocessed black-and-white tunnel image; centroid of the white pixel vertical coordinate, used to describe the vertical distribution of white areas in the preprocessed black-and-white tunnel image; maximum connected region ratio, used to identify sky blocks in the preprocessed black-and-white tunnel image; top brightness change rate, used to capture the dynamic changes in brightness of the preprocessed black-and-white tunnel image; and white pixel distribution standard deviation, used to distinguish between natural light and artificial light sources in the preprocessed black-and-white tunnel image.

4. The vehicle-mounted real-time monitoring and early warning system for highway tunnel brightness according to claim 3, characterized in that, The expression for the global white pixel ratio is as follows: in, The global white pixel ratio, This represents the number of white pixels in the binary image of the tunnel traffic. The width of the binary image of the tunnel traffic. The height of the binary image of the tunnel traffic is given; the expression for the proportion of the top white pixels is as follows: in, The ratio of the top white pixels, This represents the number of white pixels in the top 30% area of ​​the binary image of the tunnel traffic; the expression for the bottom white pixel ratio is as follows: in, The ratio of the bottom white pixels. This represents the number of white pixels in the bottom 30% region of the binary image of the tunnel traffic; the expression for the centroid of the vertical coordinate of these white pixels is as follows: in, The centroid of the white pixel's vertical coordinate. For the first The ordinate of each white pixel. Let be the pixel index; the expression for the maximum connected region percentage is as follows: in, The percentage of the largest connected region. To obtain the maximum area value among all connected regions, For the first The area of ​​each connected region; the expression for the top brightness change rate is as follows: in, The rate of change of brightness at the top. for The ratio of the top white pixels at any given moment. for The ratio of the top white pixels at any given moment. and All are time indices; the expression for the standard deviation of the white pixel distribution is as follows: in, The standard deviation of the white pixel distribution. For the first The x-coordinate of each white pixel. This is the average of the horizontal coordinates of all white pixels.

5. The vehicle-mounted real-time monitoring and early warning system for highway tunnel brightness according to claim 1, characterized in that, The brightness recognition and monitoring module includes: a data alignment unit for aligning tunnel brightness test data and a seven-dimensional spatiotemporal feature vector with timestamps to obtain data samples; a model building unit for establishing a real-time brightness detection model based on a multilayer perceptron; a model training unit for training the real-time brightness detection model based on the data samples to obtain a tunnel brightness recognition model; and a brightness value extraction unit for processing the tunnel brightness test data using the tunnel brightness recognition model to obtain the tunnel brightness value.

6. The vehicle-mounted real-time monitoring and early warning system for highway tunnel brightness according to claim 5, characterized in that, The expression for the tunnel brightness recognition model is as follows: in, The tunnel brightness prediction value is output by the tunnel brightness recognition model. This is the output layer weight matrix. For the output of the time fusion layer, For the bias of the output layer, The size of the time window. For time indexing, for The output of the feature extraction layer at time step 1. The output of the feature extraction layer, For activation function, This is the weight matrix of the fully connected layer. It is a seven-dimensional spatiotemporal feature vector. This is the bias of the feature extraction layer.

7. The vehicle-mounted real-time monitoring and early warning system for highway tunnel brightness according to claim 5, characterized in that, The training of the real-time brightness detection model specifically includes: obtaining the actual tunnel brightness value and the predicted tunnel brightness value output by the real-time brightness detection model based on data samples; calculating the loss function of the real-time brightness detection model based on the actual tunnel brightness value and the predicted tunnel brightness value; updating the weight parameters of the real-time brightness detection model using the backpropagation algorithm based on the loss function of the real-time brightness detection model, and calculating the final weight parameters of the real-time brightness detection model by combining the gradient calculation acceleration algorithm and the freezing mechanism; using the final weight parameters as the model parameters of the real-time brightness detection model to complete the training of the real-time brightness detection model and obtain the tunnel brightness recognition model.

8. The vehicle-mounted real-time monitoring and early warning system for highway tunnel brightness according to claim 1, characterized in that, The threshold generation and early warning module includes: a standardization unit, used to perform standardization processing on the tunnel brightness value to obtain a standardized tunnel brightness value; a clustering unit, used to calculate the distance between the sample and the cluster center based on the standardized tunnel brightness value using a clustering algorithm, assign the sample to the nearest cluster, and update the cluster center to obtain dangerous clusters; a threshold calculation unit, used to calculate the tunnel dangerous brightness threshold based on the dangerous clusters, the tunnel dangerous brightness threshold including a global brightness threshold, a top brightness threshold, and a brightness change threshold; and an early warning execution unit, used to issue early warnings for different states based on the global brightness threshold, the top brightness threshold, and the brightness change threshold.

9. The vehicle-mounted real-time monitoring and early warning system for highway tunnel brightness according to claim 8, characterized in that, The expression for the dangerous cluster is as follows: in, For indexes of dangerous clusters, The global white pixel ratio, The sample set corresponding to the index of the dangerous cluster. To identify the category with the lowest proportion of white pixels, For the updated number The center of each cluster, To be assigned to the The set of all samples in a cluster For the first The number of samples in each cluster To find the distance smallest value, For the sample with cluster The square of the Euclidean distance between the centers For the first The standardized feature vector of each sample. For the first The coordinates of the center point of each cluster For standardized tunnel brightness values, For the first The first sample Each tunnel brightness value, For all samples in the first The average value of each indicator For all samples in the first The standard deviation of each indicator.

10. The vehicle-mounted real-time monitoring and early warning system for highway tunnel brightness according to claim 8, characterized in that, The different warning states specifically include: in, Warnings for different states For time indexing, This is a dangerous situation. In a warning state, For a safe state, for The global white pixel ratio at any given time. for The ratio of the top white pixels at any given moment. The global brightness threshold for dangerous conditions. The top brightness threshold for a dangerous state. for The change in the proportion of the top white pixels at any given moment. The threshold for brightness change in warning status. To calculate the 0.05 quantile of the dataset, To calculate the 0.95 quantile of the dataset, For the first The proportion of global white pixels in each sample. For the first The proportion of the top white pixels of each sample. For the first The proportion of the top white pixels of each sample. The sample set corresponding to the index of the dangerous cluster. To be assigned to the The set of all samples in a cluster.

Citation Information

Patent Citations

  • Imaging device, on-vehicle imaging system, road surface appearance detection method, and object detection device

    CN102668540A

  • Tunnel brightness detection system

    CN105466556A

  • Video-based tunnel brightness detection method

    CN106846328A

  • Tunnel ventilation and illumination system and method

    CN117145553A

  • Intelligent control system and method for highway tunnel illumination

    CN119255447A