Disclosure of Invention
An object of the present invention is to solve at least the above problems and to provide at least the advantages described later.
The invention also aims to provide a high-speed automatic driving exposure control method based on image gradient and entropy fusion, which effectively increases the dynamic range of images acquired by a camera, ensures better exposure control performance under complex light and further improves the quality of images acquired by automatic driving vehicles.
In order to achieve the above objects and other objects, the present invention adopts the following technical solutions:
a high-speed automatic driving automatic exposure control method based on image gradient and entropy fusion comprises the following steps:
acquiring a frame of image by a camera;
carrying out gradient and image entropy weighting on the image to obtain a measurement value of the exposure quality of the image; the weighting method of the gradient and the image entropy is shown as formula 1:
I=α∑mi+ (1- α). H equation 1;
wherein, I is a measurement value, α is a fusion proportion parameter of gradient and image entropy, miThe gradient value of the ith pixel point in the image is obtained; h is an image entropy value;
determining an optimal gamma value by utilizing gamma transformation; and
and obtaining the predicted value of the exposure time of the next frame of image shot by the camera by using the metric value and the gamma value.
Preferably, in the high-speed automatic driving automatic exposure control method based on image gradient and entropy fusion, the number of the cameras is not less than 1, and the exposure consistency of a plurality of cameras is ensured by the following method:
acquiring a public area image containing each camera shooting image;
calculating the public area image by using a formula 2 to obtain the optimal exposure time of each camera;
wherein N is the total number of cameras, i is the ith camera, j is the jth camera, β
ijIs ROI
ijThe weight of (c);
is a common area in camera i with camera j;
is the common area in camera j with camera i.
Preferably, in the method for controlling high-speed automatic driving exposure based on image gradient and entropy fusion, acquiring a common area image including images captured by the cameras includes: the method comprises the steps of obtaining feature points in images shot by adjacent cameras, carrying out matching association on the images to obtain the same feature point set, and determining a square minimum pixel area containing all the feature points in the feature point set by using the feature point set, wherein the minimum pixel area is the public area image.
Preferably, in the method for controlling high-speed automatic driving automatic exposure based on image gradient and entropy fusion, the
formula 1
Is determined by equation 3:
wherein N is log (lambda (1-delta) + 1); λ is the gradient gain coefficient; δ is the gradient threshold.
Preferably, in the high-speed automatic driving automatic exposure control method based on image gradient and entropy fusion, a nonlinear method is used to obtain a predicted value of the exposure time of the next frame of image taken by the camera by using the metric value and the gamma value; the nonlinear method is specifically shown in formula 4:
ti+1=(1+Kp(R-1))tiformula 4;
wherein, ti+1Is the exposure time value of the next frame image predicted; kpThe convergence speed value from the current exposure time value to the target exposure time value; r is an updating function; t is tiThe exposure time value of the image of the current frame.
Preferably, in the automatic exposure control method for high-speed automatic driving based on image gradient and entropy fusion, the update function R is obtained by formula 5:
wherein d is a nonlinear degree value of the updated parameter;
the optimal gamma value is obtained.
Preferably, in the method for controlling high-speed automatic driving exposure based on image gradient and entropy fusion, obtaining a predicted value of exposure time for the camera to capture the next frame of image by using the metric value and the γ value further includes writing the predicted value of exposure time into the camera as the value of exposure time for obtaining the next frame of image.
Preferably, in the method for controlling high-speed automatic driving exposure based on image gradient and entropy fusion, writing the predicted exposure time value into the camera as the exposure time value for obtaining the next frame of image further comprises calculating the predicted exposure time value for the next frame of image by using the image shot by the predicted exposure time value.
The invention at least comprises the following beneficial effects:
in the high-speed automatic driving automatic exposure control method based on image gradient and entropy fusion, the image acquired by the camera is processed by a gradient and image entropy weighting method, so that the obtained measurement value of the exposure quality is more accurate than the measurement value obtained by processing the image by the existing simple gradient, and the analysis of the brightness change in the image is more detailed, namely the dynamic range of the processed image is enlarged, the finally obtained predicted value of the exposure time of the next frame of image is ensured to be more accurate, the quality of the image acquired by the camera is improved, and the powerful guarantee is provided for the driving safety of the subsequent automatic driving.
Additional advantages, objects, and features of the invention will be set forth in part in the description which follows and in part will become apparent to those having ordinary skill in the art upon examination of the following or may be learned from practice of the invention.
Detailed Description
The present invention is described in detail below with reference to the attached drawings so that those skilled in the art can implement the invention by referring to the description.
As shown in fig. 1 and 2, a high-speed automatic driving automatic exposure control method based on image gradient and entropy fusion includes: acquiring a frame of image by a camera;
carrying out gradient and image entropy weighting on the image to obtain a measurement value of the exposure quality of the image; the weighting method of the gradient and the image entropy is shown as formula 1:
I=α∑mi+ (1- α). H equation 1;
wherein, I is a measurement value, α is a fusion proportion parameter of gradient and image entropy, miThe gradient value of the ith pixel point in the image is obtained; h is an image entropy value;
determining an optimal gamma value by utilizing gamma transformation; and
and obtaining the predicted value of the exposure time of the next frame of image shot by the camera by using the metric value and the gamma value.
In the scheme, the image acquired by the camera is processed by a gradient and image entropy weighting method, so that the obtained measurement value of the exposure quality is more accurate than the measurement value obtained by processing the image by the existing simple gradient, and the analysis of the brightness change in the image is more detailed, namely, the dynamic range of the processed image is increased, the finally obtained predicted value of the exposure time of the next frame of image is more accurate, the quality of the image acquired by the camera is improved, and the powerful guarantee is provided for the driving safety of subsequent automatic driving.
As shown in fig. 1 and fig. 2, the predicted value of the exposure time of the next frame of image is determined by the optimal gamma value and the metric value, and compared with a method for controlling the exposure time in real time, the calculation of the optimal gamma value can enable the gamma value to quickly converge to the optimal value in the quick and complicated change process of light, so that the image with the optimal exposure can be quickly obtained, that is, the image with the optimal gradient can be quickly obtained, and the navigation method based on the image gradient information in automatic driving can obtain better precision.
In a preferred scheme, the number of the cameras is not less than 1, and the exposure consistency of a plurality of cameras is ensured by the following method:
acquiring a public area image containing each camera shooting image;
calculating the public area image by using a formula 2 to obtain the optimal exposure time of each camera;
wherein N is the total number of cameras, i is the ith camera, j is the jth camera, β
ijIs ROI
ijThe weight of (c);
is a common area in camera i with camera j;
is the common area in camera j with camera i.
In the above solution, in an automatic driving system, more than one camera is often installed on one vehicle, for example, cameras are needed to be installed on the left side, the right side and the front of the vehicle, and a traditional exposure control method can only be used for a single camera and is not suitable for the automatic driving field, so that a common area image including images taken by the cameras is obtained; and the public area image is calculated by using the formula 2, so that the optimal exposure time of each camera can be obtained, the intensity difference of the same area shot by different cameras is minimum, namely, the brightness consistency of the images shot by a plurality of cameras is ensured, and the obstacle analysis is more accurate.
In a preferred embodiment, acquiring a common area image including images captured by the respective cameras includes: the method comprises the steps of obtaining feature points in images shot by adjacent cameras, carrying out matching association on the images to obtain the same feature point set, and determining a square minimum pixel area containing all the feature points in the feature point set by using the feature point set, wherein the minimum pixel area is the public area image.
In a preferred embodiment, the
formula 1
Is determined by equation 3:
wherein N is log (lambda (1-delta) + 1); λ is the gradient gain coefficient; δ is the gradient threshold.
In the scheme, the gradient value of each pixel point in the image is calculated by introducing the gradient threshold value, so that the noise in the image can be effectively filtered, and the accuracy of the obtained gradient value is improved.
In a preferred scheme, a nonlinear method is adopted to obtain a predicted value of the exposure time of the next frame of image shot by the camera by utilizing the metric value and the gamma value; the nonlinear method is specifically shown in formula 4:
ti+1=(1+Kp(R-1))tiformula 4;
wherein, ti+1Is the exposure time value of the next frame image predicted; kpThe convergence speed value from the current exposure time value to the target exposure time value; r is an updating function; t is tiThe exposure time value of the image of the current frame.
In a preferred embodiment, the update function R is obtained by equation 5:
wherein d is a nonlinear degree value of the updated parameter;
the optimal gamma value is obtained.
In the above scheme, referring to fig. 3, the influence of the convergence rate value from the current exposure time value to the target exposure time value on the preset exposure time value is found by fixing the nonlinear degree value of the updated parameter, and the larger the convergence rate value is, the larger the curvature of the image is, the faster the convergence of the exposure time value is; referring to fig. 4, it is found that by fixing the convergence speed value and then considering the influence of the non-linear degree value of the update parameter on the predicted value of the exposure time, the non-linear degree value of the update parameter can control the stability of the update of the exposure value, i.e., the closer to the predicted value of the exposure time (optimal value of the exposure time), the smoother the gain of the exposure, and thus the predicted value of the exposure time is predicted by combining both the non-linear degree value of the update parameter and the convergence speed value from the current exposure time value to the target exposure time value, while the stability and the convergence speed of the update of the exposure value are.
In a preferred embodiment, obtaining the predicted value of the exposure time for the next frame of image taken by the camera using the metric and the γ value further includes writing the predicted value of the exposure time into the camera as the value of the exposure time for obtaining the next frame of image.
In the above scheme, the predicted exposure time value is written into the camera, so that the camera can obtain the next frame of image according to the predicted exposure time value.
In a preferred embodiment, writing the predicted exposure time value into the camera as the exposure time value for obtaining the next frame of image further includes calculating the predicted exposure time value for the next frame of image by using the image captured by the predicted exposure time value.
In the above scheme, the exposure time value of the next frame image is calculated by using the current frame image, and the process is repeated, so that the camera can continuously obtain the image with higher exposure quality.
While embodiments of the invention have been described above, it is not limited to the applications set forth in the description and the embodiments, which are fully applicable in various fields of endeavor to which the invention pertains, and further modifications may readily be made by those skilled in the art, it being understood that the invention is not limited to the details shown and described herein without departing from the general concept defined by the appended claims and their equivalents.