Vehicle-mounted camera light supplement lamp brightness self-adaptive adjusting system and vehicle-mounted camera light supplement lamp brightness self-adaptive adjusting method
By designing an adaptive adjustment system for filling lights on the vehicle camera, the brightness and state monitoring model of filling lights are used to adjust the brightness of filling lights in real time, solving the problem of traditional systems relying on manual adjustment, achieving more efficient energy use and better image quality.
Patent Information
- Application Number
- CN202510250562.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-04
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2045-03-04
AI Technical Summary
The brightness adjustment method of the traditional on-board camera fill light relies on manual adjustment, and lacks real-time environmental brightness monitoring and automatic adjustment functions, resulting in waste of energy, shortened service life and poor image quality.
Design an adaptive adjustment system for brightness adjustment of vehicle camera fill lights, including data acquisition, data processing, environmental monitoring, status monitoring and dynamic adjustment modules. Through preprocessing of camera image data and environmental parameters, an environmental brightness monitoring model and state monitoring model are built, and the brightness and current state of the fill light are adjusted in real time.
Real-time adaptive adjustment of fill lights is achieved, reducing energy waste, extending service life, and improving image quality and system robustness and accuracy.
Smart Images

Figure CN119888158A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of automatic control technology, and more specifically, to a system and method for adaptively adjusting the brightness of a vehicle-mounted camera fill light. Background Art
[0002] With the continuous development of automobile technology, vehicle-mounted cameras are increasingly used in areas such as vehicle safety, intelligent driving assistance systems, and panoramic surround view systems.
[0003] The patent application with the publication number CN115985218A discloses an adaptive dimming system and method for a car cabin based on visual monitoring, which can improve the quality of the collected image by performing fill light according to the brightness of the current environment, and can adaptively adjust the brightness of the on-board display screen in the cabin according to the brightness of the current environment to improve the driving experience. The system includes a first, a second, and a third in-car monitoring camera and a driver monitoring camera; the brightness of the current environment is obtained according to the image data from the driver's visual monitoring device; the car cabin monitoring controller judges the brightness of the current environment with the set light dim threshold, and notifies the driver's visual monitoring device to turn on the infrared fill light according to the judgment result; the car cabin monitoring controller sends the brightness of the current environment to the on-board display screen; the on-board display screen adjusts the brightness according to the received brightness of the current environment.
[0004] The traditional method of adjusting the brightness of the vehicle camera fill light mainly relies on mechanical adjustment and manual switch adjustment, which has the following main problems: Traditional vehicle-mounted cameras do not have the function of real-time monitoring of ambient brightness and automatic adjustment of fill light. The turning on and off and brightness adjustment of fill light rely on manual adjustment. The need for manual intervention makes the maintenance and management of fill light more troublesome. The vehicle-mounted system cannot accurately judge the current working status of the fill light, resulting in unnecessary energy waste. Without precise current and brightness control, it cannot prevent the fill light from working at too high or too low current and brightness for a long time, thereby increasing thermal stress, light decay and other adverse factors inside the lamp, thereby shortening the service life of the fill light. It does not take into account irrelevant information and interference in the image, and has obvious shortcomings in improving image quality, richness of feature data sets, system robustness and system accuracy. It does not adopt effective algorithms to enable the system to maintain high accuracy and robustness in different scenarios, and is prone to fall into local optimality.
[0005] In view of this, the present invention proposes a system and method for adaptively adjusting the brightness of a vehicle-mounted camera fill light to solve the above-mentioned problem. Summary of the invention
[0006] In order to overcome the above-mentioned defects of the prior art and to achieve the above-mentioned purpose, the present invention provides the following technical solution: a vehicle-mounted camera fill light brightness adaptive adjustment system, comprising: Data acquisition module, used to obtain Camera image data, environmental parameter data, POC parameter data and GPIO parameter data within a certain period of time; The data processing module is used to pre-process the acquired camera image data, environmental parameter data, POC parameter data and GPIO parameter data to obtain an image feature data set, an environmental feature data set, a POC feature data set and a GPIO feature data set; and weightedly fuse the image feature data set with the environmental feature data set to obtain a comprehensive feature data set; The environment monitoring module is used to build an environment brightness monitoring model, input the comprehensive feature data set into the trained environment brightness monitoring model, and obtain the predicted environment brightness; compare the predicted environment brightness with the preset environment brightness threshold to determine whether the current environment needs to be supplemented with light; If the current environment does not require fill light, the current environment brightness is continuously monitored; if the current environment requires fill light, the fill light is turned on; The state monitoring module is used to monitor the changes of POC parameter data and GPIO parameter data when the fill light is turned on; construct a state monitoring model, input the POC feature data set and the GPIO feature data set into the trained state monitoring model to obtain the predicted current-brightness state; compare the predicted current-brightness state with the preset current-brightness state threshold to determine whether adjustment is needed; The dynamic adjustment module continues to monitor the POC parameter data and the GPIO parameter data if no adjustment is required; if adjustment is required, dynamic adjustment is performed according to changes in the monitored POC parameter data and the GPIO parameter data.
[0007] Furthermore, the acquisition The method for obtaining camera image data, environmental parameter data, POC parameter data and GPIO parameter data within a certain period of time includes: Discretization in time At each time point, camera image data, environmental parameter data, POC parameter data and GPIO parameter data are collected; Camera image data includes brightness data, shape data and texture data; environmental parameter data includes ambient light intensity data, weather condition data and timestamp data; timestamp data includes Discretized in time The specific time and date of a time point; the POC parameter data includes POC voltage data and POC current data.
[0008] Furthermore, the method for preprocessing the acquired camera image data, environmental parameter data, POC parameter data and GPIO parameter data includes: Extract brightness features and morphological features from the camera image data to obtain an image feature data set; perform data cleaning and standard deviation normalization on the environmental parameter data, POC parameter data, and GPIO parameter data, converting them into a standard normal distribution with a mean of 0 and a standard deviation of 1, and obtain an environmental feature data set, a POC feature data set, and a GPIO feature data set; The method for extracting brightness features includes: using a weighted average method to convert the format of camera image data, converting the RGB value of each pixel in the camera image data into a single grayscale value through a grayscale conversion formula, and then obtaining grayscale image data; using a Gaussian filter to smooth the grayscale image data and remove image noise; The brightness distribution of the grayscale image data is adjusted by histogram equalization, and the total number of pixels of the grayscale image data is recorded as , using the probability density function to calculate the cumulative distribution function of each gray level of the grayscale image data ;in, From grayscale arrive The cumulative distribution function of is the index of the grayscale category; is the gray level in the grayscale image data The number of pixels; To sum the grayscale index; perform histogram equalization mapping on the grayscale image data based on the cumulative distribution function to obtain a new grayscale; calculate the average brightness and brightness standard deviation of the grayscale image data according to the new grayscale, and then obtain the brightness feature; Methods for morphological feature extraction include: Use the Sobel operator to calculate the gradient component of each pixel in the grayscale image data and obtain the horizontal gradient and vertical gradient ; Based on the horizontal gradient obtained and vertical gradient , calculate the gradient amplitude of each pixel of the grayscale image data and the gradient direction ; For each pixel, compare its gradient amplitude with the gradient amplitude of the two adjacent pixels along the gradient direction, and retain the local maximum value; if the gradient amplitude of the current pixel is greater than the gradient amplitude of the two adjacent pixels, retain the pixel; otherwise, remove the pixel; integrate the remaining pixels to obtain the edge pixel set; set the threshold and , the edge pixel points with gradient magnitude greater than The pixels with a gradient magnitude less than The pixel points with gradient amplitude between and The pixels between the edges are marked as weak edges; the weak edges are connected with the strong edges to form a complete edge structure; based on the complete edge structure, the morphological features of the camera image data are extracted; Setting thresholds using Otsu's algorithm and ,include: Based on the gradient amplitude of each pixel point of the grayscale image data, a gradient amplitude image is obtained; by counting the number of pixels at each gray level in the gradient amplitude image, a histogram of the gradient amplitude image is obtained. ; Preset threshold , at the threshold The gradient amplitude image is divided into foreground and background; the degree of separation between the foreground and background is measured by the inter-class variance calculation formula, and the inter-class variance calculation formula is: ;in, is the between-class variance; is the background weight; is the background mean; is the foreground weight; is the foreground mean; use grid search to traverse the preset threshold Of all possible values, choose The threshold with the largest value is the optimal threshold ; Based on the optimal threshold Setting the Threshold and ;Threshold ;Threshold ;in, and The thresholds and The proportionality factor.
[0009] Furthermore, the method for obtaining the comprehensive feature data set includes: The image feature dataset and the environment feature dataset are weightedly fused through the weighted fusion formula. The preset image feature dataset is: , the environmental feature dataset is , the comprehensive feature dataset is ; The weighted fusion formula is: ;in, is the weight coefficient of the image feature dataset; is the weight coefficient of the environmental feature dataset; The weight coefficients are optimized by particle swarm optimization algorithm. and Perform dynamic adjustments, including: initializing the particle swarm, where each particle in the particle swarm represents a set of weight coefficients , randomly generate the position of each particle and speed ; Define the fitness function ; Among them, the fitness function For the The position of the particle The corresponding fitness function value; is the index of the particle number; is the total number of particle samples; is the index of the particle sample; For particle samples The target brightness; For particles The weight coefficient of the image feature dataset; For particle samples Feature values in the image feature dataset; For particles The weight coefficient of the environmental characteristic data set; For particle samples Feature values in the environmental feature dataset; The particle speed and position are updated through the particle speed update formula; the particle speed update formula is: ;in, For particles In the The velocity vector after iterations; For particles In the The velocity vector at the iteration; is the inertia weight; and is the cognitive factor, and the value is taken through the cognitive factor restriction formula; the cognitive factor restriction formula is: ;in, is the cognitive factor after restriction; is the total number of iterations of the particle; is the total number of particles; and for A random number between For particles The historical optimal position vector of is the global optimal position vector; For particles In the The position vector at the iteration; Update the particle's historical optimal position and global optimal position; repeat the above steps until the maximum number of iterations is reached, and then obtain the final global optimal position. , that is, to obtain the optimal set of weight coefficients ; Apply the optimal set of weight coefficients to the weighted fusion formula to obtain a comprehensive feature data set.
[0010] Furthermore, the method for constructing the environment brightness monitoring model includes: The environmental brightness monitoring model is constructed through the convolutional neural network model. The environmental brightness monitoring model includes input layer, convolution layer, pooling layer, fully connected layer and output layer. The input data of the model is a comprehensive feature data set, and the output label is the corresponding environmental brightness. The data set is divided into training set, test set and validation set. Softmax is used as the activation function. The mean square error is used as the loss function to measure the difference between the model's predicted value and the actual value. The model is trained using the training set data and the loss function is minimized using the Adam optimizer. The model is evaluated using the validation set and the accuracy index is calculated to measure the performance of the model. The model's hyperparameters are tuned based on the evaluation results of the model's performance. The model's performance in the prediction task is evaluated using the test set. When the model's performance in the prediction task reaches the preset performance threshold, the test is stopped to obtain a trained ambient brightness monitoring model.
[0011] Furthermore, the method for determining whether fill light is required in the current environment includes: If the predicted ambient brightness is greater than or equal to the preset ambient brightness threshold, it is determined that the current environment does not need fill light; If the predicted ambient brightness is less than the preset ambient brightness threshold, it is determined that the current environment needs fill light.
[0012] Furthermore, the method for constructing the condition monitoring model includes: The data set is divided into training set, test set and validation set; the data set includes POC feature data set and GPIO feature data set and the corresponding current-brightness state; a state monitoring model is constructed, which includes an input layer, a fully connected layer and two output layers; The two output layers of the model correspond to the current state task and the brightness state task; the input layer is used to input the historical POC feature data set and the GPIO feature data set; the output layer is used to output the current state and the brightness state respectively; the state monitoring model is a multi-task learning network model; For the current state task and the brightness state task, two mean square error loss functions are defined respectively: and , which measures the difference between the model's predicted values and the actual values; Mean Squared Error Loss Function ;in, For current state tasks The actual value of For current state tasks The predicted value of is the index of the sample in the current state task; is the number of samples in the current state task; Mean Squared Error Loss Function ;in, For brightness status tasks The actual value of For brightness status tasks The predicted value of is the index of the sample in the brightness state task; is the number of samples in the brightness state task; The loss function and Perform weighted fusion to obtain a comprehensive loss function; use the training set to train the condition monitoring model, and update the model parameters through the back propagation algorithm to minimize the comprehensive loss function; use the validation set to evaluate the performance of the condition monitoring model by calculating the performance evaluation index; The Adam optimization algorithm is selected as the optimizer, and the model is tuned according to the performance feedback of the validation set. The model parameters are adjusted until the preset number of iterations is reached. The performance of the model in the prediction task is evaluated using the test set, and the trained state monitoring model is used to predict the current POC feature data set and GPIO feature data set to obtain the current-brightness state.
[0013] Furthermore, the method of comparing the predicted current-brightness state with a preset current-brightness state threshold to determine whether adjustment is required includes: If the predicted current-brightness state matches the preset current-brightness state threshold, it is determined that no adjustment is required; If the predicted current-brightness state does not match the preset current-brightness state threshold, it is determined that adjustment is required.
[0014] Furthermore, the method for dynamically adjusting according to the changes of the monitored POC parameter data and GPIO parameter data includes: Adjust the PWM duty cycle: when the predicted current state is greater than the preset current state threshold, the POC voltage is increased by increasing the PWM0 duty cycle; when the predicted current state is less than the preset current state threshold, the POC voltage is lowered by reducing the PWM0 duty cycle; When the predicted brightness state is higher than the preset brightness state threshold, the fill light brightness is lowered by reducing the PWM1 duty cycle; when the predicted brightness state is lower than the preset brightness state threshold, the fill light brightness is increased by increasing the PWM1 duty cycle.
[0015] Furthermore, a vehicle-mounted camera fill light brightness adaptive adjustment system is characterized by comprising: S1. Acquisition Camera image data, environmental parameter data, POC parameter data and GPIO parameter data within a certain period of time; S2. Preprocess the acquired camera image data, environmental parameter data, POC parameter data and GPIO parameter data to obtain an image feature data set, an environmental feature data set, a POC feature data set and a GPIO feature data set; perform weighted fusion of the image feature data set and the environmental feature data set to obtain a comprehensive feature data set; S3. Build an environment brightness monitoring model, input the comprehensive feature data set into the trained environment brightness monitoring model, and obtain the predicted environment brightness; compare the predicted environment brightness with the preset environment brightness threshold to determine whether the current environment needs to be supplemented with light; If the current environment does not require fill light, the current environment brightness is continuously monitored; if the current environment requires fill light, the fill light is turned on; S4. Monitor the changes of POC parameter data and GPIO parameter data when the fill light is turned on; construct a state monitoring model, input the POC feature data set and the GPIO feature data set into the trained state monitoring model, and obtain the predicted current-brightness state; compare the predicted current-brightness state with the preset current-brightness threshold to determine whether adjustment is needed; S5. If no adjustment is required, the POC parameter data and GPIO parameter data continue to be monitored; if adjustment is required, dynamic adjustment is performed based on changes in the monitored POC parameter data and GPIO parameter data. The technical effects and advantages of the adaptive brightness adjustment system for the fill light of a vehicle-mounted camera of the present invention are as follows: By preprocessing the camera image data, irrelevant information and interference in the image are effectively reduced, providing a clearer image foundation for subsequent processing. It has significant advantages in improving image quality, enriching feature data sets, enhancing system robustness and improving system accuracy.
[0016] The particle swarm optimization algorithm is used to dynamically adjust the weight coefficient, which helps the system maintain high accuracy and robustness in different scenarios. The cognitive factor restriction formula is introduced so that the cognitive factor gradually increases with the number of iterations, but the growth rate is controlled, which helps to maintain a large global search capability in the early stage of the search and avoid falling into the local optimum. In the later stage of the search, the local search capability can be gradually enhanced to improve the search accuracy.
[0017] By real-time monitoring of POC and GPIO data, the system can accurately determine the current working status of the fill light and avoid unnecessary energy waste; when it is predicted that the current or brightness status deviates from the preset threshold, the system automatically adjusts the PWM duty cycle to ensure that the fill light operates at the optimal current and brightness, thereby saving energy; precise current and brightness control can prevent the fill light from operating at excessively high or low current and brightness for a long time, which helps to reduce adverse factors such as thermal stress and light decay inside the lamp, thereby extending the service life of the fill light; the automatic adjustment function reduces the need for manual intervention, making the maintenance and management of the fill light more convenient. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 It is a schematic diagram of the structure of a vehicle-mounted camera fill light brightness adaptive adjustment system of the present invention; Figure 2 The present invention is a flow chart of a method for adaptively adjusting the brightness of a vehicle-mounted camera fill light. DETAILED DESCRIPTION
[0019] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0020] Example 1
[0021] See also Figure 1 and Figure 2 As shown, this embodiment provides a vehicle-mounted camera fill light brightness adaptive adjustment system, including: Data acquisition module, used to obtain Camera image data, environmental parameter data, POC (power over coaxial) parameter data and GPIO (input / output port) parameter data within a certain period of time; The data processing module is used to pre-process the acquired camera image data, environmental parameter data, POC parameter data and GPIO parameter data to obtain an image feature data set, an environmental feature data set, a POC feature data set and a GPIO feature data set; and weightedly fuse the image feature data set with the environmental feature data set to obtain a comprehensive feature data set; The environment monitoring module is used to build an environment brightness monitoring model, input the comprehensive feature data set into the trained environment brightness monitoring model, and obtain the predicted environment brightness; compare the predicted environment brightness with the preset environment brightness threshold to determine whether the current environment needs to be supplemented with light; If the current environment does not require fill light, the current environment brightness is continuously monitored; if the current environment requires fill light, the fill light is turned on; The state monitoring module is used to monitor the changes of POC parameter data and GPIO parameter data when the fill light is turned on; construct a state monitoring model, input the POC feature data set and the GPIO feature data set into the trained state monitoring model to obtain the predicted current-brightness state; compare the predicted current-brightness state with the preset current-brightness state threshold to determine whether adjustment is needed; The dynamic adjustment module continues to monitor the POC parameter data and the GPIO parameter data if no adjustment is required; if adjustment is required, dynamic adjustment is performed according to changes in the monitored POC parameter data and the GPIO parameter data.
[0022] Get The method for obtaining camera image data, environmental parameter data, POC parameter data and GPIO parameter data within a certain period of time includes: Discretization in time At each time point, camera image data, environmental parameter data, POC parameter data and GPIO parameter data are collected; Camera image data includes brightness data, shape data and texture data; environmental parameter data includes ambient light intensity data, weather condition data and timestamp data; timestamp data includes Discretized in time The specific time and date of a time point; the POC parameter data includes POC voltage data and POC current data.
[0023] The method for preprocessing the acquired camera image data, environmental parameter data, POC parameter data and GPIO parameter data includes: Extract brightness features and morphological features from the camera image data to obtain an image feature data set; perform data cleaning and standard deviation normalization on the environmental parameter data, POC parameter data, and GPIO parameter data, converting them into a standard normal distribution with a mean of 0 and a standard deviation of 1, and obtain an environmental feature data set, a POC feature data set, and a GPIO feature data set; The method for extracting brightness features includes: using a weighted average method to convert the format of the camera image data, converting the RGB value of each pixel in the camera image data into a single grayscale value through a grayscale conversion formula, and then obtaining grayscale image data; the grayscale conversion formula is: ;in, Indicates the intensity of red light in the image; Indicates the intensity of green light in the image; Indicates the intensity of blue light in the image; uses a Gaussian filter to smooth the grayscale image data and remove image noise; It should be noted that the grayscale conversion formula appears , and A set of fixed weight coefficients used to convert color images into grayscale images. This set of weight coefficients is mainly related to the sensitivity of the human eye to light of different bands (red, green, and blue). It first appeared in the calculation of the brightness component of the analog television standard NTSC and was also used in subsequent digital video standards. It approximately reflects the subjective brightness perception of RGB by the human eye, allowing grayscale images to better match the subjective perception of brightness by the human eye. The human eye is most sensitive to green, followed by red, and least sensitive to blue. Therefore, when converting the RGB value of each pixel into a single grayscale value, green light will be given a larger weight, followed by red light, and blue light the smallest. The brightness distribution of the grayscale image data is adjusted by histogram equalization, so that the grayscale distribution of the image is more uniform and the overall contrast is improved; the total number of pixels of the grayscale image data is recorded as , using the probability density function to calculate the cumulative distribution function of each gray level of the grayscale image data ;in, From grayscale arrive The cumulative distribution function of is the index of the grayscale category, which is used to represent the grayscale currently calculated, and the range is arrive ; is the gray level in the grayscale image data The number of pixels; To sum the grayscale index, when calculating the cumulative distribution function, it is used to traverse from arrive grayscale; based on the cumulative distribution function, the grayscale image data is histogram-equalized to obtain a new grayscale; the average brightness and brightness standard deviation of the grayscale image data are calculated according to the new grayscale, thereby obtaining the brightness feature; Methods for morphological feature extraction include: Use the Sobel operator to calculate the gradient component of each pixel in the grayscale image data and obtain the horizontal gradient and vertical gradient ; Based on the horizontal gradient obtained and vertical gradient , calculate the gradient amplitude of each pixel of the grayscale image data and the gradient direction ; The calculation formula for the gradient amplitude of a pixel is: ;in, is the gradient amplitude of the pixel; is the horizontal gradient; is the vertical gradient; The calculation formula for the gradient direction of a pixel is: ;in, is the inverse tangent function; For each pixel, compare its gradient amplitude with the gradient amplitude of the two adjacent pixels along the gradient direction, and retain the local maximum value; for example, if the gradient direction is 0°, select the pixels on the left and right sides of the current pixel; if the gradient direction is 45°, select the pixels to the upper right and lower left of the current pixel; if the gradient amplitude of the current pixel is greater than the gradient amplitude of the two adjacent pixels, retain the pixel; otherwise, remove the pixel; integrate the remaining pixels to obtain the edge pixel set; set the threshold and , the edge pixel points with gradient magnitude greater than The pixels with a gradient magnitude less than The pixel points with gradient amplitude between and The pixels between the pixels are marked as weak edges; the weak edges are connected with the strong edges to form a complete edge structure; based on the complete edge structure, the morphological features of the camera image data are extracted; the morphological features include the length, curvature, and area of the connected region of the edge of the dark area in the camera image data; Setting thresholds using Otsu's algorithm and ,include: Based on the gradient amplitude of each pixel point of the grayscale image data, a gradient amplitude image is obtained; by counting the number of pixels at each gray level in the gradient amplitude image, a histogram of the gradient amplitude image is obtained. ; Preset threshold , at the threshold The gradient amplitude image is divided into foreground (edge area) and background (non-edge area); the degree of separation between the foreground and the background is measured by the inter-class variance calculation formula, and the inter-class variance calculation formula is: ;in, is the between-class variance; is the background weight, which is the ratio of the number of background pixels to the total number of pixels; is the background mean, the average value of the gradient amplitude of the background pixels; is the foreground weight, which is the ratio of the number of foreground pixels to the total number of pixels; is the foreground mean, the average value of the foreground pixel gradient amplitude; use grid search to traverse the preset threshold Of all possible values, choose The threshold with the largest value is the optimal threshold ; Based on the optimal threshold Setting the Threshold and ;Threshold ;Threshold ;in, and The thresholds and The proportionality factor.
[0024] The method for obtaining the comprehensive feature data set includes: The image feature dataset and the environment feature dataset are weightedly fused through the weighted fusion formula. The preset image feature dataset is: , the environmental feature dataset is , the comprehensive feature dataset is ; The weighted fusion formula is: ;in, is the weight coefficient of the image feature dataset; is the weight coefficient of the environmental feature dataset; The weight coefficients are optimized by particle swarm optimization algorithm. and Perform dynamic adjustments, including: initializing the particle swarm, where each particle in the particle swarm represents a set of weight coefficients , randomly generate the position of each particle and speed ; Define the fitness function ; Among them, the fitness function For the The position of the particle The corresponding fitness function value is used to evaluate the position of each particle; is the index of the particle number; is the total number of particle samples; is the index of the particle sample; For particle samples The target brightness; For particles The weight coefficient of the image feature dataset; For particle samples Feature values in the image feature dataset; For particles The weight coefficient of the environmental characteristic data set; For particle samples Feature values in the environmental feature dataset; The particle speed and position are updated through the particle speed update formula; the particle speed update formula is: ;in, For particles In the The velocity vector after iterations; For particles In the The velocity vector at the iteration; is the inertia weight; and is the cognitive factor, and the value is taken through the cognitive factor restriction formula; the cognitive factor restriction formula is: ;in, is the cognitive factor after restriction; is the total number of iterations of the particle; is the total number of particles; and for A random number between For particles The historical optimal position vector of is the global optimal position vector; For particles In the The position vector at the iteration; The cognitive factor restriction formula draws on the ideas of adaptive parameter adjustment and time decay model, and introduces a dynamic adjustment strategy based on the standard PSO algorithm to balance the relationship between exploration and exploitation, and improve the global search ability and convergence speed. In the standard PSO algorithm, the search behavior of particles is affected by cognitive factors and social factors, and fixed cognitive factors may lead to uneven search efficiency of the algorithm at different stages. Therefore, the cognitive factor restriction formula dynamically adjusts the cognitive factors, so that the algorithm can explore a wider range in the early stage of the search and achieve faster convergence in the later stage of the search, thereby improving the search ability of the global optimal solution. In the early stage of the search, particles should be encouraged to explore the search space more to avoid falling into the local optimal solution too early; in the later stage of the search, the dependence of particles on the historical optimal and global optimal solutions should be enhanced to accelerate the convergence speed. To achieve this goal, the cognitive factor restriction formula controls the weight of the cognitive factor through iterative progress, so that it changes over time.
[0025] Update the particle's historical optimal position and global optimal position; repeat the above steps until the maximum number of iterations is reached, and then obtain the final global optimal position. , that is, to obtain the optimal set of weight coefficients ; Apply the optimal set of weight coefficients to the weighted fusion formula to obtain a comprehensive feature data set.
[0026] The method for constructing the ambient brightness monitoring model includes: The environmental brightness monitoring model is constructed through the convolutional neural network model. The environmental brightness monitoring model includes input layer, convolution layer, pooling layer, fully connected layer and output layer. The input data of the model is a comprehensive feature data set, and the output label is the corresponding environmental brightness. The data set is divided into training set, test set and validation set. Softmax is used as the activation function. The mean square error is used as the loss function to measure the difference between the model's predicted value and the actual value. The model is trained using the training set data and the loss function is minimized using the Adam optimizer. The model is evaluated using the validation set and the accuracy index is calculated to measure the performance of the model. The model's hyperparameters are tuned based on the evaluation results of the model's performance. The model's performance in the prediction task is evaluated using the test set. When the model's performance in the prediction task reaches the preset performance threshold, the test is stopped to obtain a trained ambient brightness monitoring model.
[0027] Methods for determining whether fill light is needed in the current environment include: If the predicted ambient brightness is greater than or equal to the preset ambient brightness threshold, it is determined that the current environment does not need fill light; If the predicted ambient brightness is less than the preset ambient brightness threshold, it is determined that the current environment needs fill light.
[0028] The construction method of the condition monitoring model includes: The data set is divided into training set, test set and validation set; the data set includes POC feature data set and GPIO feature data set and the corresponding current-brightness state; a state monitoring model is constructed, which includes an input layer, a fully connected layer and two output layers; The two output layers of the model correspond to the current state task and the brightness state task; the input layer is used to input the historical POC feature data set and the GPIO feature data set; the output layer is used to output the current state and the brightness state respectively; the state monitoring model is a multi-task learning network model; For the current state task and the brightness state task, two mean square error loss functions are defined respectively: and , which measures the difference between the model's predicted values and the actual values; Mean Squared Error Loss Function ;in, For current state tasks The actual value of For current state tasks The predicted value of is the index of the sample in the current state task; is the number of samples in the current state task; Mean Squared Error Loss Function ;in, For brightness status tasks The actual value of For brightness status tasks The predicted value of is the index of the sample in the brightness state task; is the number of samples in the brightness state task; The loss function and Perform weighted fusion to obtain a comprehensive loss function; use the training set to train the condition monitoring model, and update the model parameters through the back propagation algorithm to minimize the comprehensive loss function; use the validation set to evaluate the performance of the condition monitoring model by calculating the performance evaluation index; The Adam optimization algorithm is selected as the optimizer, and the model is tuned according to the performance feedback of the validation set. The model parameters are adjusted until the preset number of iterations is reached. The performance of the model in the prediction task is evaluated using the test set, and the trained state monitoring model is used to predict the current POC feature data set and GPIO feature data set to obtain the current-brightness state.
[0029] The method of comparing the predicted current-brightness state with a preset current-brightness state threshold to determine whether adjustment is required includes: If the predicted current-brightness state matches the preset current-brightness state threshold, it is determined that no adjustment is required; If the predicted current-brightness state does not match the preset current-brightness state threshold, it is determined that adjustment is required.
[0030] According to the changes of the monitored POC parameter data and GPIO parameter data, the methods for dynamic adjustment include: Adjust the PWM (pulse width modulation) duty cycle: when the predicted current state is greater than the preset current state threshold, the POC voltage is increased by increasing the PWM0 (pulse width modulation 0) duty cycle; when the predicted current state is less than the preset current state threshold, the POC voltage is lowered by reducing the PWM0 duty cycle; PWM0 is responsible for regulating the POC voltage. The adjustment of its duty cycle affects the stability of the system power supply current. POC voltage rises Supply current increases Increase the brightness of the fill light; reduce the duty cycle of PWM0 POC voltage reduction Supply current reduction The brightness of the fill light is reduced; When the predicted brightness state is higher than the preset brightness state threshold, the fill light brightness is lowered by reducing the PWM1 (pulse width modulation 1) duty cycle; when the predicted brightness state is lower than the preset brightness state threshold, the fill light brightness is increased by increasing the PWM1 duty cycle; PWM1 is responsible for controlling the brightness of the fill light. Adjusting its duty cycle affects the brightness of the light. Fill light power supply time is reduced Reduce the brightness of the fill light; increase the duty cycle of PWM1 Increased power supply time of fill light The fill light brightness is enhanced.
[0031] This embodiment, through preprocessing of camera image data, effectively reduces irrelevant information and interference in the image, provides a clearer image basis for subsequent processing, and has significant advantages in improving image quality, enriching feature data sets, enhancing system robustness and improving system accuracy.
[0032] The particle swarm optimization algorithm is used to dynamically adjust the weight coefficient, which helps the system maintain high accuracy and robustness in different scenarios. The cognitive factor restriction formula is introduced, so that the cognitive factor gradually increases with the increase in the number of iterations, but the growth rate is controlled, which helps to maintain a large global search capability in the early stage of the search and avoid falling into the local optimum. In the later stage of the search, the local search capability can be gradually enhanced to improve the search accuracy. By real-time monitoring of POC and GPIO data, the system can accurately determine the current working status of the fill light and avoid unnecessary energy waste; when it is predicted that the current or brightness status deviates from the preset threshold, the system automatically adjusts the PWM duty cycle to ensure that the fill light operates at the optimal current and brightness, thereby saving energy; precise current and brightness control can prevent the fill light from operating at excessively high or low current and brightness for a long time, which helps to reduce adverse factors such as thermal stress and light decay inside the lamp, thereby extending the service life of the fill light; the automatic adjustment function reduces the need for manual intervention, making the maintenance and management of the fill light more convenient.
[0033] Example 2
[0034] See also Figure 2 As shown, the part not described in detail in this embodiment is described in Example 1, which provides a method for adaptively adjusting the brightness of a fill light of a vehicle camera, including: S1. Acquisition Camera image data, environmental parameter data, POC parameter data and GPIO parameter data within a certain period of time; S2. Preprocess the acquired camera image data, environmental parameter data, POC parameter data and GPIO parameter data to obtain an image feature data set, an environmental feature data set, a POC feature data set and a GPIO feature data set; perform weighted fusion of the image feature data set and the environmental feature data set to obtain a comprehensive feature data set; S3. Build an environment brightness monitoring model, input the comprehensive feature data set into the trained environment brightness monitoring model, and obtain the predicted environment brightness; compare the predicted environment brightness with the preset environment brightness threshold to determine whether the current environment needs to be supplemented with light; If the current environment does not require fill light, the current environment brightness is continuously monitored; if the current environment requires fill light, the fill light is turned on; S4. Monitor the changes of POC parameter data and GPIO parameter data when the fill light is turned on; construct a state monitoring model, input the POC feature data set and the GPIO feature data set into the trained state monitoring model, and obtain the predicted current-brightness state; compare the predicted current-brightness state with the preset current-brightness threshold to determine whether adjustment is needed; S5. If no adjustment is required, the POC parameter data and the GPIO parameter data continue to be monitored; if adjustment is required, dynamic adjustment is performed according to changes in the monitored POC parameter data and the GPIO parameter data.
[0035] Since the electronic device introduced in this embodiment is an electronic device used to implement the embodiment of this application based on a vehicle-mounted camera fill light brightness adaptive adjustment system, based on the vehicle-mounted camera fill light brightness adaptive adjustment system introduced in the embodiment of this application, the technical personnel of this field can understand the specific implementation of the electronic device of this embodiment and its various variations, so how the electronic device implements the method in the embodiment of this application is not described in detail here. As long as the technical personnel of this field implement the electronic device used in the vehicle-mounted camera fill light brightness adaptive adjustment system in the embodiment of this application, it belongs to the scope of protection of this application.
[0036] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters and thresholds in the formula are set by technicians in this field according to actual conditions.
[0037] The above is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technical users in this technical field, some improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.
Claims
1. A vehicle-mounted camera fill light brightness adaptive adjustment system, characterized in that: include: Data acquisition module, used to obtain Camera image data, environmental parameter data, POC parameter data and GPIO parameter data within a certain period of time; The data processing module is used to pre-process the acquired camera image data, environmental parameter data, POC parameter data and GPIO parameter data to obtain an image feature data set, an environmental feature data set, a POC feature data set and a GPIO feature data set; and weightedly fuse the image feature data set with the environmental feature data set to obtain a comprehensive feature data set; The environment monitoring module is used to build an environment brightness monitoring model, input the comprehensive feature data set into the trained environment brightness monitoring model, and obtain the predicted environment brightness; compare the predicted environment brightness with the preset environment brightness threshold to determine whether the current environment needs to be supplemented with light; If the current environment does not require fill light, the current environment brightness is continuously monitored; If the current environment requires fill light, turn on the fill light; The state monitoring module is used to monitor the changes of POC parameter data and GPIO parameter data when the fill light is turned on; construct a state monitoring model, input the POC feature data set and the GPIO feature data set into the trained state monitoring model to obtain the predicted current-brightness state; compare the predicted current-brightness state with the preset current-brightness state threshold to determine whether adjustment is needed; The dynamic adjustment module continues to monitor the POC parameter data and the GPIO parameter data if no adjustment is required; if adjustment is required, dynamic adjustment is performed according to changes in the monitored POC parameter data and the GPIO parameter data.
2. The vehicle-mounted camera fill light brightness adaptive adjustment system according to claim 1, characterized in that: The acquisition The method for obtaining camera image data, environmental parameter data, POC parameter data and GPIO parameter data within a certain period of time includes: Discretization in time time points, and collects camera image data, environmental parameter data, POC parameter data and GPIO parameter data at each time point; camera image data includes brightness data, morphology data and texture data; environmental parameter data includes ambient light intensity data, weather condition data and timestamp data; timestamp data includes Discretized in time The specific time and date of a time point; the POC parameter data includes POC voltage data and POC current data.
3. The vehicle-mounted camera fill light brightness adaptive adjustment system according to claim 2, characterized in that: The method for preprocessing the acquired camera image data, environmental parameter data, POC parameter data and GPIO parameter data comprises: Extract brightness features and morphological features from the camera image data to obtain an image feature data set; perform data cleaning and standard deviation normalization on the environmental parameter data, POC parameter data, and GPIO parameter data, converting them into a standard normal distribution with a mean of 0 and a standard deviation of 1, and obtain an environmental feature data set, a POC feature data set, and a GPIO feature data set; The method for extracting brightness features includes: using a weighted average method to convert the format of camera image data, converting the RGB value of each pixel in the camera image data into a single grayscale value through a grayscale conversion formula, and then obtaining grayscale image data; using a Gaussian filter to smooth the grayscale image data and remove image noise; The brightness distribution of the grayscale image data is adjusted by histogram equalization, and the total number of pixels of the grayscale image data is recorded as , using the probability density function to calculate the cumulative distribution function of each gray level of the grayscale image data ;in, From grayscale arrive The cumulative distribution function of is the index of the grayscale category; is the gray level in the grayscale image data The number of pixels; To sum the grayscale index; perform histogram equalization mapping on the grayscale image data based on the cumulative distribution function to obtain a new grayscale; calculate the average brightness and brightness standard deviation of the grayscale image data according to the new grayscale, and then obtain the brightness feature; Methods for extracting morphological features include: Use the Sobel operator to calculate the gradient component of each pixel in the grayscale image data and obtain the horizontal gradient and vertical gradient ; Based on the horizontal gradient obtained and vertical gradient , calculate the gradient amplitude of each pixel of the grayscale image data and the gradient direction ; For each pixel, compare its gradient amplitude with the gradient amplitude of the two adjacent pixels along the gradient direction, and retain the local maximum value; if the gradient amplitude of the current pixel is greater than the gradient amplitude of the two adjacent pixels, retain the pixel; otherwise, remove the pixel; integrate the remaining pixels to obtain the edge pixel set; set the threshold and , the edge pixel points with gradient magnitude greater than The pixels with a gradient magnitude less than The pixel points with gradient amplitude between and The pixels between the edges are marked as weak edges; the weak edges are connected with the strong edges to form a complete edge structure; based on the complete edge structure, the morphological features of the camera image data are extracted; Setting thresholds using Otsu's algorithm and ,include: Based on the gradient amplitude of each pixel point of the grayscale image data, a gradient amplitude image is obtained; by counting the number of pixels at each gray level in the gradient amplitude image, a histogram of the gradient amplitude image is obtained. ; Preset threshold , at the threshold The gradient amplitude image is divided into foreground and background; the degree of separation between the foreground and background is measured by the inter-class variance calculation formula, and the inter-class variance calculation formula is: ;in, is the between-class variance; is the background weight; is the background mean; is the foreground weight; is the foreground mean; use grid search to traverse the preset threshold Of all possible values, choose The threshold with the largest value is the optimal threshold ; Based on the optimal threshold Setting the Threshold and ;Threshold ;Threshold ;in, and The thresholds and The proportionality factor.
4. The vehicle-mounted camera fill light brightness adaptive adjustment system according to claim 3, characterized in that: The method for obtaining the comprehensive feature data set includes: The image feature dataset and the environment feature dataset are weightedly fused through the weighted fusion formula. The preset image feature dataset is: , the environmental feature dataset is , the comprehensive feature dataset is ; The weighted fusion formula is: ;in, is the weight coefficient of the image feature dataset; is the weight coefficient of the environmental feature dataset; The weight coefficients are optimized by particle swarm optimization algorithm. and Perform dynamic adjustments, including: initializing the particle swarm, each particle in the particle swarm represents a set of weight coefficients , randomly generate the position of each particle and speed ; Define the fitness function ; Among them, the fitness function For the The position of the particle The corresponding fitness function value; is the index of the particle number; is the total number of particle samples; is the index of the particle sample; For particle samples The target brightness; For particles The weight coefficient of the image feature dataset; For particle samples Feature values in the image feature dataset; For particles The weight coefficient of the environmental characteristic data set; For particle samples Feature values in the environmental feature dataset; The particle speed and position are updated through the particle speed update formula; the particle speed update formula is: ;in, For particles In the The velocity vector after iterations; For particles In the The velocity vector at the iteration; is the inertia weight; and is the cognitive factor, and the value is taken through the cognitive factor restriction formula; the cognitive factor restriction formula is: ;in, is the cognitive factor after restriction; is the total number of iterations of the particle; is the total number of particles; and for A random number between For particles The historical optimal position vector of is the global optimal position vector; For particles In the The position vector at the iteration; Update the particle's historical optimal position and global optimal position; repeat the above steps until the maximum number of iterations is reached, and then obtain the final global optimal position. , that is, to obtain the optimal set of weight coefficients ; Apply the optimal set of weight coefficients to the weighted fusion formula to obtain a comprehensive feature data set.
5. The vehicle-mounted camera fill light brightness adaptive adjustment system according to claim 4, characterized in that: The method for constructing the environmental brightness monitoring model includes: The environmental brightness monitoring model is constructed through the convolutional neural network model. The environmental brightness monitoring model includes input layer, convolution layer, pooling layer, fully connected layer and output layer. The input data of the model is a comprehensive feature data set, and the output label is the corresponding environmental brightness. The data set is divided into training set, test set and validation set. Softmax is used as the activation function. The mean square error is used as the loss function to measure the difference between the model's predicted value and the actual value. The model is trained using the training set data and the loss function is minimized using the Adam optimizer. The model is evaluated using the validation set and the accuracy index is calculated to measure the performance of the model. The model's hyperparameters are tuned based on the evaluation results of the model's performance. The model's performance in the prediction task is evaluated using the test set. When the model's performance in the prediction task reaches the preset performance threshold, the test is stopped to obtain a trained ambient brightness monitoring model.
6. The vehicle-mounted camera fill light brightness adaptive adjustment system according to claim 5, characterized in that: The method for determining whether fill light is required in the current environment includes: If the predicted ambient brightness is greater than or equal to the preset ambient brightness threshold, it is determined that the current environment does not need fill light; If the predicted ambient brightness is less than the preset ambient brightness threshold, it is determined that the current environment needs fill light.
7. The vehicle-mounted camera fill light brightness adaptive adjustment system according to claim 6, characterized in that: The method for constructing the condition monitoring model includes: The data set is divided into training set, test set and validation set; the data set includes POC feature data set and GPIO feature data set and the corresponding current-brightness state; a state monitoring model is constructed, which includes an input layer, a fully connected layer and two output layers; The two output layers of the model correspond to the current state task and the brightness state task; the input layer is used to input the historical POC feature data set and the GPIO feature data set; the output layer is used to output the current state and the brightness state respectively; the state monitoring model is a multi-task learning network model; For the current state task and the brightness state task, two mean square error loss functions are defined respectively: and , which measures the difference between the model's predicted values and the actual values; Mean Squared Error Loss Function ;in, For current state tasks The actual value of For current state tasks The predicted value of is the index of the sample in the current state task; is the number of samples in the current state task; Mean Squared Error Loss Function ;in, For brightness status tasks The actual value of For brightness status tasks The predicted value of is the index of the sample in the brightness state task; is the number of samples in the brightness state task; The loss function and Perform weighted fusion to obtain a comprehensive loss function; use the training set to train the condition monitoring model, and update the model parameters through the back propagation algorithm to minimize the comprehensive loss function; use the validation set to evaluate the performance of the condition monitoring model by calculating the performance evaluation index; The Adam optimization algorithm is selected as the optimizer, and the model is tuned according to the performance feedback of the validation set. The model parameters are adjusted until the preset number of iterations is reached. The performance of the model in the prediction task is evaluated using the test set, and the trained state monitoring model is used to predict the current POC feature data set and GPIO feature data set to obtain the current-brightness state.
8. The vehicle-mounted camera fill light brightness adaptive adjustment system according to claim 7, characterized in that: The method of comparing the predicted current-brightness state with a preset current-brightness state threshold to determine whether adjustment is required includes: If the predicted current-brightness state matches the preset current-brightness state threshold, it is determined that no adjustment is required; If the predicted current-brightness state does not match the preset current-brightness state threshold, it is determined that adjustment is required.
9. The vehicle-mounted camera fill light brightness adaptive adjustment system according to claim 8, characterized in that: The method for dynamically adjusting according to changes in the monitored POC parameter data and GPIO parameter data includes: Adjust the PWM duty cycle: when the predicted current state is greater than the preset current state threshold, the POC voltage is increased by increasing the PWM0 duty cycle; when the predicted current state is less than the preset current state threshold, the POC voltage is lowered by reducing the PWM0 duty cycle; When the predicted brightness state is higher than the preset brightness state threshold, the fill light brightness is lowered by reducing the PWM1 duty cycle; when the predicted brightness state is lower than the preset brightness state threshold, the fill light brightness is increased by increasing the PWM1 duty cycle.
10. A method for adaptively adjusting the brightness of a vehicle camera fill light, used to implement a vehicle camera fill light adaptive brightness adjustment system according to any one of claims 1 to 9, characterized in that: include: S1. Acquisition Camera image data, environmental parameter data, POC parameter data and GPIO parameter data within a certain period of time; S2. Preprocess the acquired camera image data, environmental parameter data, POC parameter data and GPIO parameter data to obtain an image feature data set, an environmental feature data set, a POC feature data set and a GPIO feature data set; perform weighted fusion of the image feature data set and the environmental feature data set to obtain a comprehensive feature data set; S3. Build an environment brightness monitoring model, input the comprehensive feature data set into the trained environment brightness monitoring model, and obtain the predicted environment brightness; compare the predicted environment brightness with the preset environment brightness threshold to determine whether the current environment needs to be supplemented with light; If the current environment does not require fill light, the current environment brightness is continuously monitored; If the current environment requires fill light, turn on the fill light; S4. Monitor the changes of POC parameter data and GPIO parameter data when the fill light is turned on; construct a state monitoring model, input the POC feature data set and the GPIO feature data set into the trained state monitoring model, and obtain the predicted current-brightness state; compare the predicted current-brightness state with the preset current-brightness threshold to determine whether adjustment is needed; S5. If no adjustment is required, the POC parameter data and the GPIO parameter data continue to be monitored; if adjustment is required, dynamic adjustment is performed according to changes in the monitored POC parameter data and the GPIO parameter data.
Citation Information
Patent Citations
Vehicle-mounted camera and automatic dimming method thereof
CN113364946A
Light supplementing method and system for vehicle camera
CN114827485A
Vehicle-mounted DMS camera light supplement lamp brightness self-adaptive adjusting system
CN119629816A
Using parallel data lines for GPIO purposes
US20180324386A1