CN114189634B - Image acquisition method, electronic device and computer storage medium - Google Patents

Image acquisition method, electronic device and computer storage medium Download PDF

Info

Publication number
CN114189634B
CN114189634B CN202210091084.9A CN202210091084A CN114189634B CN 114189634 B CN114189634 B CN 114189634B CN 202210091084 A CN202210091084 A CN 202210091084A CN 114189634 B CN114189634 B CN 114189634B
Authority
CN
China
Prior art keywords
image
value
target brightness
digital gain
image acquisition
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210091084.9A
Other languages
Chinese (zh)
Other versions
CN114189634A (en
Inventor
唐俊珂
张海滨
丁虎平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba Damo Institute Hangzhou Technology Co Ltd
Original Assignee
Alibaba Damo Institute Hangzhou Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba Damo Institute Hangzhou Technology Co Ltd filed Critical Alibaba Damo Institute Hangzhou Technology Co Ltd
Priority to CN202210091084.9A priority Critical patent/CN114189634B/en
Publication of CN114189634A publication Critical patent/CN114189634A/en
Application granted granted Critical
Publication of CN114189634B publication Critical patent/CN114189634B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/71Circuitry for evaluating the brightness variation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/73Circuitry for compensating brightness variation in the scene by influencing the exposure time
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/741Circuitry for compensating brightness variation in the scene by increasing the dynamic range of the image compared to the dynamic range of the electronic image sensors

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Studio Devices (AREA)

Abstract

The embodiment of the application provides an image acquisition method, electronic equipment and a computer storage medium, wherein the image acquisition method is applied to an automatic driving system, and the method comprises the following steps: acquiring a brightness mean value of an image acquired by an image acquisition device; adjusting exposure parameters of the image acquisition device according to the brightness mean value and a preset target brightness value, wherein the exposure parameters comprise: an exposure time, a first digital gain for high dynamic range image synthesis, and a second digital gain for post-synthesis high dynamic range image brightness adjustment; and acquiring a new image according to the adjusted exposure parameters. Through the embodiment of the application, the exposure parameter is adjusted more flexibly and the self-adaptability is stronger.

Description

Image acquisition method, electronic device and computer storage medium
Technical Field
The embodiment of the application relates to the technical field of images, in particular to an image acquisition method, electronic equipment and a computer storage medium.
Background
For the field of automatic driving, a perception system plays an important role. In the sensing system, a device for image acquisition such as a camera is one of the most important sensors.
However, in the automatic driving process, on one hand, since the vehicle itself moves, most of the motion pictures collected by the image collecting device are required, the image collecting device has a strong motion picture capturing capability, and the excellent exposure algorithm plays a crucial role in capturing the motion pictures. On the other hand, due to the variability of the driving environment, the illumination intensity can be greatly changed, so that high requirements are made on the adaptive capacity of the exposure algorithm. At present, one way adopted by the exposure algorithm is: the calibrated one or more groups of exposure parameters and gain parameters are stored in a fixed lookup table in advance, after the exposure algorithm is started, the table is looked up according to the photometric result, and the image acquisition device is configured after the exposure parameters and the gain parameters are obtained.
However, on the one hand, limited data cannot cover all possible cases; on the other hand, even the data obtained by table lookup may not be well suited for the current driving environment. Therefore, how to configure appropriate exposure parameters for image acquisition to achieve a better image acquisition effect becomes an urgent problem to be solved.
Disclosure of Invention
In view of the above, embodiments of the present application provide an image capturing scheme to at least partially solve the above problems.
According to a first aspect of the embodiments of the present application, there is provided an image capturing method applied to an automatic driving system, the method including: acquiring a brightness mean value of an image acquired by an image acquisition device; adjusting exposure parameters of the image acquisition device according to the brightness mean value and a preset target brightness value, wherein the exposure parameters comprise: an exposure time, a first digital gain for high dynamic range image synthesis, and a second digital gain for post-synthesis high dynamic range image brightness adjustment; and acquiring a new image according to the adjusted exposure parameters.
According to a second aspect of embodiments of the present application, there is provided an electronic device including: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus; the memory is used for storing at least one executable instruction, and the executable instruction causes the processor to execute the operation corresponding to the image acquisition method according to the first aspect.
According to a third aspect of embodiments of the present application, there is provided a computer storage medium having stored thereon a computer program which, when executed by a processor, implements the image acquisition method according to the first aspect.
According to a fourth aspect of embodiments of the present application, there is provided a computer program product including computer instructions for instructing a computing device to perform operations corresponding to the image capturing method according to the first aspect.
According to the image acquisition scheme provided by the embodiment of the application, parameters related to exposure, such as exposure time, and first and second digital gains related to high dynamic range image synthesis, are adjusted based on the acquired brightness mean value of the current image and a preset target brightness value, so that the brightness mean value tends to the direction of the target brightness value. The target brightness value can be a preset value that can generally achieve better image quality, and therefore, the fact that the adjusted brightness mean value approaches the target brightness value means that the adjustment results of the exposure parameters, such as the exposure time, the first digital gain and the second digital gain, are more ideal. Therefore, regardless of the driving environment, the exposure parameter can be adjusted to be most adaptive to the current driving environment based on the brightness mean value and the target brightness value of the current image without depending on manual parameter setting, and the exposure parameter is more flexible to adjust and has stronger adaptivity.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the embodiments of the present application, and other drawings can be obtained by those skilled in the art according to the drawings.
FIG. 1 is a schematic diagram of an exemplary autopilot system suitable for use with an image acquisition method according to an embodiment of the present application;
FIG. 2A is a flowchart illustrating steps of an image capturing method according to a first embodiment of the present disclosure;
FIG. 2B is a schematic diagram illustrating an adjustment process of an exposure parameter in the embodiment shown in FIG. 2A;
FIG. 3A is a flowchart illustrating steps of an image capturing method according to a second embodiment of the present disclosure;
FIG. 3B is a diagram illustrating an adjustment process of a target brightness value in the embodiment shown in FIG. 3A;
fig. 4 is a schematic structural diagram of an electronic device according to a third embodiment of the present application.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in the embodiments of the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, but not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application shall fall within the scope of the protection of the embodiments in the present application.
The following further describes specific implementations of embodiments of the present application with reference to the drawings of the embodiments of the present application.
Fig. 1 illustrates an exemplary system to which the image acquisition method according to the embodiment of the present application is applied. As shown in FIG. 1, the autopilot system 100 may include a driving control system 102, a context awareness system 104, and a driving performance system 106. The autopilot system 100 may be implemented as an autopilot vehicle, or an unmanned aerial vehicle, or an indoor robot, etc. in a specific application, which is not limited in this embodiment of the present application.
The driving control system 102 may be a software plus hardware system for performing automatic driving control, such as a chip capable of executing corresponding functions. In some embodiments, the driving control system 102 may obtain the corresponding environmental information from the environmental perception system 104, make a decision based on the environmental information, and operate the driving execution system 106 based on the decision to realize the final automatic driving control. For example, in some embodiments, the driving control system 102 may be configured to perform exposure parameter adjustment according to an image captured by an image capturing device in the environmental awareness system 104, so that the image capturing device can perform exposure adjustment adaptively according to the external environment. As an alternative example, in some embodiments, the driving control system 102 may be configured to adjust exposure-related parameters, such as an exposure time, a first digital gain for high dynamic range image synthesis, and a second digital gain for brightness adjustment of a synthesized high dynamic range image, according to a brightness average value of a current image captured by an image capturing device in the environment sensing system 104 and a preset target brightness value, so that the adjusted exposure parameters can be maximally adapted to an external environment, so that a next captured image can achieve better image quality.
In some embodiments, the environmental awareness system 104 may include an image capturing device such as a camera, a point cloud data capturing device such as a radar, a positioning device such as a GPS, and the like, based on which the environmental awareness system 104 can effectively capture information of the external environment and transmit the information to the driving control system 102 to provide a basis for the driving control system 102 to perform decision control.
The driving performance system 106 may be implemented by specific performance devices, including but not limited to: transmissions, steering gears, brake-by-wire and drive-by-wire devices, and the like. These specific actuators may perform corresponding operations, such as shifting, steering, braking, etc., according to the commands of the driving control system 102, so as to achieve normal driving of the automatic driving system 100.
Based on the above system, the present application provides an image capturing method, which is described below with reference to a plurality of embodiments.
Example one
Referring to fig. 2A, a flowchart illustrating steps of an image capturing method according to a first embodiment of the present application is shown.
In this embodiment, an image capturing method according to an embodiment of the present application is described with emphasis on adjusting exposure parameters. The image acquisition method of the embodiment comprises the following steps:
step S202: and acquiring the brightness mean value of the image acquired by the image acquisition device.
The average value of the brightness of the image can be obtained by averaging the brightness values corresponding to the pixels of the image. In a feasible manner, the image may be first converted into a corresponding color space with a luminance component, such as an HSV color space or an HSL color space, then the H component values corresponding to each pixel are obtained, and then the H component values of all pixels are averaged, so as to obtain the luminance mean value of the image. But not limited thereto, other ways of obtaining the brightness mean of the image are also applicable to the solution of the embodiment of the present application. For example, the image blocks may be weighted according to different regions by using different weight values to obtain the brightness average value.
Step S204: and adjusting the exposure parameters of the image acquisition device according to the brightness mean value and a preset target brightness value.
The target brightness value can be set by a person skilled in the art at the beginning according to actual requirements, so that the image with the brightness value can present a clearer effect, namely better image quality. For example, the initial value of the target luminance value may be set to 1000-2000 luminance values. In the subsequent process, the target brightness value can be adjusted according to the brightness of the acquired image.
Based on the target brightness value and the brightness mean value of the acquired current image, the exposure parameters of the image acquisition device can be adjusted, wherein the exposure parameters comprise: exposure time, a first digital gain for high dynamic range image synthesis, and a second digital gain for post-synthesis high dynamic range image brightness adjustment.
High dynamic range, also referred to as HDR, is a technique for improving the dynamic range of an image capture device, such as a camera sensor, which combines a plurality of captured images into one image.
The first digital gain and the second digital gain are inherent parameters of the image acquisition device, but specific numerical values of the first digital gain and the second digital gain can be adjusted according to requirements, wherein the first digital gain is digital gain applied to different image frames before HDR image synthesis; the second digital gain is a digital gain applied to the resultant image after the HDR image is synthesized.
In the embodiment of the present application, the brightness mean value of the image is used as a main basis for adjusting the exposure parameter, and the brightness mean value is adjusted to a target brightness value (i.e. an ideal brightness value).
In one possible approach, this step can be implemented as: and adjusting the exposure time, the first digital gain and the second digital gain according to the direct proportional relation between the brightness average value of the image and the exposure time, the first digital gain and the second digital gain so as to enable the brightness average value to approach to the direction of the target brightness value. Based on the direct proportional relation between the exposure parameters and the brightness mean value, the adjustment of the exposure parameters can be simpler, and the brightness mean value obtained after adjustment can be closer to the target brightness value as much as possible.
Further optionally, the adjusting the exposure time, the first digital gain, and the second digital gain to make the brightness mean approach to the target brightness value may be implemented as: if the illumination condition of the environment where the automatic driving system is located is determined to be changed from bright to dark, the exposure time, the second digital gain and the first digital gain are adjusted in sequence from high priority to low priority, so that the brightness average value obtained after adjustment approaches to the target brightness value; or if the lighting condition of the environment where the automatic driving system is located is determined to be changed from dark to light, the first digital gain, the second digital gain and the exposure time are adjusted in sequence from high priority to low priority, so that the brightness average value obtained after adjustment approaches to the target brightness value. Through the mutual switching control among the exposure time, the first digital gain and the second digital gain, the brightness of the picture acquired by the image acquisition device can be slowly adjusted, and the brightness is gradually reduced from the brightest. In a possible way, if the exposure time, the first digital gain and the second digital gain of the image acquisition device are read simultaneously, it can be clearly observed that they exhibit a three-segment distribution. Furthermore, less image noise may be introduced than a digital gain increase due to an increase in exposure time, and a digital gain adjustment after HDR synthesis may introduce less image noise than a digital gain adjustment before HDR synthesis. Therefore, the sequential adjustment mode can achieve better adjustment effect.
Wherein, the adjustment of each exposure parameter in the plurality of exposure parameters can be realized by adopting part or all of the following modes:
(1) the adjustment of the exposure time includes: determining according to the target brightness value, the exposure time corresponding to the previous frame image of the current frame image and the brightness mean value;
(2) the adjusting of the first digital gain comprises: determining according to the target brightness value, a first digital gain corresponding to a previous frame image of the current frame image and the brightness mean value;
(3) the adjusting of the second digital gain comprises: and determining according to the target brightness value, the second digital gain corresponding to the previous frame image of the current frame image and the brightness mean value.
In the specific adjustment, each exposure parameter has its own adjustable range, and the adjustable range can be reset by those skilled in the art according to the actual requirement based on the adjustable range that the image capturing device can receive, for example, the adjustable range of the exposure time is 1-1500, the adjustable range of the first digital gain is 1-1200, and the adjustable range of the second digital gain is 1-1000.
For example, the exposure time to be adjusted is Texp, the first digital Gain is Gain1, the second digital Gain is Gain2, the mean value of the brightness obtained based on the adjusted exposure parameters is mean', and the target brightness value is Lum.
Lum ß-- mean’ = Texp * Gain1 * Gain2 * X
The mean 'tends to the Lum beta-mean', and when the lens of the image acquisition device and the external illumination condition are not changed, X represents a constant determined by the performance of the image acquisition device, which is not limited in the embodiment of the application. As can be seen from the above formula, mean' is in direct proportion to Texp, Gain1 and Gain 2.
Based on this, when each exposure parameter is adjusted, exemplarily:
Texp=Lum/mean* TexpLast
wherein mean represents the brightness mean value of the current frame image, and TexpLast represents the exposure time of the previous frame image of the current frame image;
Gain1 =Lum/mean * Gain1Last
wherein mean represents the brightness mean value of the current frame image, and Gain1Last represents the first digital Gain of the previous frame image of the current frame image;
Gain2 =Lum/mean * Gain2Last
wherein mean represents the luminance mean value of the current frame image, and Gain2Last represents the second digital Gain of the previous frame image of the current frame image.
The TexpLast, Gain1Last and Gain2Last may be obtained in different manners according to actual needs, for example, a static variable or a global variable may be used to store a Last value during the cyclic execution of the exposure algorithm, or a value in a register inside the sensor may be read to obtain the Last value, and so on.
In an exemplary adjustment manner, if the ambient lighting conditions are changed from bright to dark, Texp may be adjusted, then Gain2 may be adjusted, and then Gain1 may be adjusted. For example, if Lum =1200, mean =200, TexpLast =1000, X =1, Gain2=1, and Gain1=1, then Texp =1200/200 × 1000=6000 (the number of exposure rows), but since the adjustable range of Texp is between 1 and 1500, and Gain2 and Gain1 need to be adjusted, then, considering all of the three, Texp is adjusted to 1500, Gain2 is adjusted to 4, and Gain1 is adjusted to 1, and mean' obtained after adjustment approaches 1200.
Step S206: and acquiring a new image according to the adjusted exposure parameter.
After the new exposure parameters are determined, the image acquisition device can acquire images according to the new exposure parameters next time, so that the acquired images can be adapted to the external illumination conditions as much as possible, and images with better quality can be acquired.
The adjustment process is described below with an example, as shown in fig. 2B.
The process of a single adjustment is shown in fig. 2B, which includes:
step A: judging whether the Gain1< = Gain1Min and & Gain2< = Gain2Min or not; if yes, executing step B; otherwise, executing step C.
Wherein "&" represents the relationship of "and", Gain1Min represents the lower limit of the adjustable range of Gain1, and Gain2Min represents the lower limit of the adjustable range of Gain 2. Correspondingly, hereinafter, Gain1Max represents the upper limit of the adjustable range of Gain1, and Gain2Max represents the upper limit of the adjustable range of Gain 2.
In this step, by determining Gain1 and Gain2, it is possible to determine the change of the external illumination condition, thereby further controlling the adjustment sequence of the exposure parameters.
And B: the exposure time is calculated directly.
The method comprises the following steps: judging whether Texp > = TexpMax; if yes, then Texp = TexpMax, Gain2= Gain2Min +1, and then the adjustment of Texp is stopped; if not, continuously judging whether the Texp < = TexpMin exists; if the current value is less than or equal to the preset value, the Texp = TexpMin, and then the adjustment of the Texp is stopped; otherwise, the calculation and adjustment of the exposure time are continued.
Wherein, TexpMax represents the upper limit of the adjustable range of Texp, and TexpMin represents the lower limit of the adjustable range of Texp.
After the adjustment of Texp is completed, the start can be returned again to start to adjust other exposure parameters.
And C: judging whether Texp > = TexpMax & & Gain1< = Gain1Min or not; if yes, executing step D; otherwise, executing step E.
Because after the adjustment of the Texp, there are cases (1) that Gain1< = Gain1Min & & Gain2< = Gain2Min does not stand; (2) texp = TexpMax & & Gain2= Gain2Min + 1; (3) texp = TexpMin. Based on this, in case (1), the flow would go directly to step E; in case (2), the process will go to step D; in case (3), the flow will also go to step E.
Step D: the second digital gain is calculated directly.
The method comprises the following steps: judging whether Gain2> = Gain2Max or not; if yes, then Gain2= Gain2Max, Gain1= Gain1Min +1, and then adjustment of Gain2 is stopped; if not, continuously judging whether the Gain2< = Gain2Min exists or not; if the current value is less than or equal to the preset value, the Gain2= Gain2Min, and the Texp = TexpMax-1, and then stopping the adjustment of the Gain 2; otherwise, the computational adjustment of the second digital gain is continued.
After the adjustment of Gain2 is completed, the start can be returned again to start the adjustment of other exposure parameters.
Step E: judging whether Gain2> = Gain2Max & & Texp > = TexpMax; if yes, executing step F; otherwise, step G is performed.
After the adjustment of the Gain2, there is a case (1) that Texp > = TexpMax & & Gain1< = Gain1Min does not hold; (2) gain2= Gain2Max & & Gain1= Gain1Min + 1; (3) gain2= Gain2Min & & Texp = TexpMax-1. Based on this, in case (1), the flow goes to step G; in case (2), the process will go to step F; in case (3), the flow will also go to step G.
Step F: the first digital gain is directly calculated.
The method comprises the following steps: judging whether Gain1> = Gain1Max or not; if yes, then Gain1= Gain1Max, and then adjustment of Gain1 is stopped; if not, continuously judging whether the Gain1< = Gain1Min exists or not; if the current value is less than or equal to the preset value, the Gain1= Gain1Min, the Gain2= Gain2Max-1, and then the adjustment of the Gain1 is stopped; otherwise, the calculation adjustment of the first digital gain is continued.
Step G: setting Gain1= Gain1Min, Gain2= Gain2Min, and ending the adjustment.
Thus, the adjustment of the three exposure parameters is completed.
Because the light and shade change of the automatic driving environment is severe, the response speed of the exposure algorithm is required to be fast enough, the traditional exposure algorithm adopts a slow approaching convergence algorithm, the adjustment can be completed only by more than 5 exposure cycles, the exposure calculation in the mode in the embodiment can be completed only by 1-2 times, and the convergence speed of the exposure algorithm is greatly improved.
With the present embodiment, based on the acquired brightness average value of the current image and the preset target brightness value, parameters related to exposure, such as the exposure time, the first digital gain and the second digital gain related to the high dynamic range image synthesis, are adjusted to make the brightness average value trend towards the target brightness value direction. The target brightness value can be a preset value that can generally achieve better image quality, and therefore, the fact that the adjusted brightness mean value approaches the target brightness value means that the adjustment results of the exposure parameters, such as the exposure time, the first digital gain and the second digital gain, are more ideal. Therefore, regardless of the driving environment, the exposure parameter can be adjusted to be most adaptive to the current driving environment based on the brightness mean value and the target brightness value of the current image without depending on manual parameter setting, and the exposure parameter is more flexible to adjust and has stronger adaptivity.
Example two
Referring to fig. 3A, a flowchart illustrating steps of an image capturing method according to a second embodiment of the present application is shown.
In this embodiment, the image acquisition method in the embodiment of the present application is described with a focus on the adjustment of the target brightness value. The image acquisition method of the embodiment comprises the following steps:
step S302: and acquiring a brightness mean value of the image acquired by the image acquisition device, and counting the number of pixels of which the illumination in the image is smaller than a preset first illumination threshold value.
In this step, the number of low-illumination pixels is counted in addition to the luminance mean value of the image.
The illuminance is the short term of illumination intensity, and refers to the luminous flux of visible light received in a unit area. In the embodiment of the present application, a first illumination threshold is preset, and pixels lower than the first illumination threshold are all regarded as low-illumination pixels. The first illuminance threshold may be set by a person skilled in the art according to actual requirements, which is not limited in the embodiment of the present application and may be, for example, 200-300 illuminance units.
For example, if the first illumination threshold is THL, in this step, the total number of pixels with illumination lower than THL is recorded as lowCount.
Step S304: and determining a target brightness value according to the relation between the pixel quantity and a quantity threshold value.
For example, if the number of pixels is less than a first number threshold, the target brightness value is decreased; if the number of pixels is greater than a second number threshold, increasing a target brightness value; wherein the first number threshold is less than the second number threshold.
When the dynamic range of the external environment is not large, different exposures can enable the gray level of the image to be distributed at different positions of the histogram, if the target brightness value is too large, the exposure value is larger, the image brightness is too large, and meanwhile, more serious moving object smear can be introduced; if the target brightness value is too small, the gray level of the image is mainly distributed on the left side of the histogram, the whole image is dark, and more details are lost. Therefore, the target brightness value is different in different scenes, and the target brightness value needs to be dynamically adjustedAnd (6) finishing. This dynamic adjustment follows the principle of availability and minimization, i.e. ensuring that the number of pixels in the dark of the image varies within some suitable range, namely: lowCountmin<lowCount<lowCountmax. Wherein, lowCountminRepresents a first quantity threshold, lowCountmaxRepresenting a second quantity threshold. The specific values of the first quantity threshold and the second quantity threshold can be set by those skilled in the art according to practical situations, and the embodiments of the present application do not limit this. Exemplarily, lowCountminMay be 1000, lowCountmaxMay be 2000.
To ensure that lowCount is within a reasonable range, when lowCount is within a reasonable range>lowCountmaxWhen the target value brightness needs to be increased, namely Lum = Lum + a, and a is a brightness increase step coefficient; on the contrary, when lowCount<lowCountminWhen the target value luminance needs to be decreased, i.e., Lum = Lum-b, b is a luminance decrease step coefficient. Illustratively, a and b can both range from 1 to 5 brightness values. At the same time, there is a limit to the adjustable range of Lum, which is denoted as Lummin(lower limit of Adjustable Range), Lummax(upper limit of adjustable range), the Lum needs to be adjusted within the adjustable range.
It should be noted that the above-mentioned manner of increasing or decreasing the target brightness value may also be used, such as: it is also within the scope of the embodiments of the present application based on the way the original target luminance value is multiplied by the corresponding coefficient.
In addition, in a feasible manner, if the reduced target brightness value is less than the minimum target brightness threshold, the low-illumination image acquisition mode is closed; or if the increased target brightness value is greater than the maximum target brightness threshold value, starting the low-illumination image acquisition mode.
This is because, although increasing the target brightness value may increase the brightness of the image, it is possible that the lighting conditions of the external environment may be already very dark, and adjusting the target brightness value may not be enough to increase the brightness of the image to a level that can achieve higher image quality, and at this time, the low-illumination image capturing mode may be turned on to further increase the brightness.
It should be noted thatThe above processes are based on the number of pixels in the statistical image whose illuminance is smaller than the preset first illuminance threshold, but in practical applications, a mode in which the number of pixels in the statistical image whose illuminance is larger than the preset second illuminance threshold is used as a reference may also be adopted. Counting the number of pixels with the illumination intensity larger than a preset second illumination intensity threshold value in the image; if the number of pixels is greater than a first number threshold, reducing a target brightness value; if the number of pixels is less than a second number threshold, increasing a target brightness value; wherein the first number threshold is greater than the second number threshold. The specific values of the first quantity threshold and the second quantity threshold in this manner can also be set by those skilled in the art according to actual situations, and the embodiment of the present application does not limit this. Illustratively, the first quantity threshold is represented as lowCountmaxThe value can be 2000; the second quantity threshold is denoted lowCountminThe value may be 1000. However, the target brightness value can be effectively adjusted by any reference method.
Step S306: and adjusting the exposure parameters of the image acquisition device according to the brightness mean value of the current image and the adjusted target brightness value.
Wherein the exposure parameters include: exposure time, a first digital gain for high dynamic range image synthesis, and a second digital gain for post-synthesis high dynamic range image brightness adjustment.
Step S308: and acquiring a new image according to the adjusted exposure parameter.
The specific implementation of steps S306-S308 can refer to the description of the relevant parts in the first embodiment, and will not be described herein again.
Hereinafter, the adjustment process of the target brightness value is exemplarily described as a specific example, as shown in fig. 3B.
The process comprises the following steps:
step P: judging whether lowCount is present>lowCountmax| Gain1= = Gain1 Max; if yes, executing step Q; otherwise, step S is executed.
Wherein, "|" represents the relation of "or", and Gain1Max represents the adjustable range of Gain1The upper limit of the circumference. Gain1 is a digital Gain applied to an image frame before HDR image synthesis, and when Gain1= = Gain1Max, this Gain is maximum, and needs to be further adjusted for a target luminance value; and lowCount>lowCountmaxIndicating that the number of low-light pixels is too large. Therefore, both cases indicate that the illumination is dark and the target brightness value needs to be increased.
Step Q: lum = Lum + a.
I.e. the target brightness value Lum is increased by the brightness increase step factor a.
Step R: judging whether Lum is present>Lummax(ii) a If yes, set Lum = LummaxAnd ending the Lum adjustment after starting the low illumination mode of the image acquisition device, and executing the step W if the Lum adjustment is not started.
Step S: judging whether lowCount exists or not<lowCountmin| Gain1= = Gain1 Min; if yes, executing step T; if not, the Lum adjustment is carried out.
Wherein, Gain1Min represents the lower limit of the adjustable range of Gain 1. When Gain1= = Gain1Min, indicating that the Gain is minimum, further adjustment needs to be performed for the target brightness value; and lowCount<lowCountminIndicating that the number of low-light pixels is too small. Therefore, both cases indicate strong illumination and the target brightness value needs to be reduced.
And T: lum = Lum-b. Then, the procedure returns to step R.
Namely, the target luminance value Lum is reduced by the luminance reduction step coefficient b.
Step W: judging whether it is Lum<Lummin(ii) a If yes, set Lum = LumminAnd closing the low illumination mode of the image acquisition device, and ending the Lum adjustment. If not, the method directly ends the Lum adjustment.
Therefore, the problem that due to the fact that the automatic driving environment changes very quickly, objects in the collected images move quickly, and the traditional exposure algorithm causes serious object smear due to the fact that the brightness target value is set unreasonably and the like is solved. By the target brightness value adjusting method in this embodiment, the target brightness value can be dynamically adjusted along with the illumination change of the environment, and the exposure time is reduced as much as possible to reduce the smear problem caused by the movement of the object. In addition, the traditional exposure algorithm can not set a special mode for a low-illumination scene, and in the mode of the embodiment, the low-illumination mode can be started when the light is insufficient, so that the photosensitive adaptive capacity of image acquisition in the low-illumination scene is greatly improved.
EXAMPLE III
Referring to fig. 4, a schematic structural diagram of an electronic device according to a third embodiment of the present application is shown, and the specific embodiment of the present application does not limit a specific implementation of the electronic device.
As shown in fig. 4, the electronic device may include: a processor (processor)402, a communication Interface 404, a memory 406, and a communication bus 408.
Wherein:
the processor 402, communication interface 404, and memory 406 communicate with each other via a communication bus 408.
A communication interface 404 for communicating with other electronic devices or servers.
The processor 402 is configured to execute the program 410, and may specifically execute relevant steps in the above-described embodiment of the image acquisition method.
In particular, program 410 may include program code comprising computer operating instructions.
The processor 402 may be a CPU, or an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits configured to implement embodiments of the present application. The intelligent device comprises one or more processors which can be the same type of processor, such as one or more CPUs; or may be different types of processors such as one or more CPUs and one or more ASICs.
And a memory 406 for storing a program 410. Memory 406 may comprise high-speed RAM memory, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
The program 410 may be specifically configured to enable the processor 402 to perform operations corresponding to any one of the foregoing multiple embodiments of image acquisition methods.
The specific implementation of each step in the program 410 may refer to corresponding steps and corresponding descriptions in units in the above embodiments of the image acquisition method, and has corresponding beneficial effects, which are not described herein again. It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described devices and modules may refer to the corresponding process descriptions in the foregoing method embodiments, and are not described herein again.
An embodiment of the present application further provides a computer program product, which includes a computer instruction, where the computer instruction instructs a computing device to execute an operation corresponding to any one of the image capturing methods in the foregoing method embodiments.
It should be noted that, according to the implementation requirement, each component/step described in the embodiment of the present application may be divided into more components/steps, and two or more components/steps or partial operations of the components/steps may also be combined into a new component/step to achieve the purpose of the embodiment of the present application.
The above-described methods according to embodiments of the present application may be implemented in hardware, firmware, or as software or computer code storable in a recording medium such as a CD ROM, a RAM, a floppy disk, a hard disk, or a magneto-optical disk, or as computer code originally stored in a remote recording medium or a non-transitory machine-readable medium downloaded through a network and to be stored in a local recording medium, so that the methods described herein may be stored in such software processes on a recording medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware such as an ASIC or FPGA. It will be appreciated that the computer, processor, microprocessor controller or programmable hardware includes memory components (e.g., RAM, ROM, flash memory, etc.) that can store or receive software or computer code that, when accessed and executed by the computer, processor or hardware, implements the image acquisition methods described herein. Further, when a general-purpose computer accesses code for implementing the image capture methods illustrated herein, execution of the code transforms the general-purpose computer into a special-purpose computer for performing the image capture methods illustrated herein.
Those of ordinary skill in the art will appreciate that the various illustrative elements and method steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the technical solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the embodiments of the present application.
The above embodiments are only used for illustrating the embodiments of the present application, and not for limiting the embodiments of the present application, and those skilled in the relevant art can make various changes and modifications without departing from the spirit and scope of the embodiments of the present application, so that all equivalent technical solutions also belong to the scope of the embodiments of the present application, and the scope of patent protection of the embodiments of the present application should be defined by the claims.

Claims (7)

1. An image acquisition method is applied to an automatic driving system, and comprises the following steps:
acquiring a brightness mean value of an image acquired by an image acquisition device;
adjusting exposure parameters of the image acquisition device according to the brightness mean value and a preset target brightness value, wherein the exposure parameters comprise: an exposure time, a first digital gain for high dynamic range image synthesis, and a second digital gain for post-synthesis high dynamic range image brightness adjustment;
acquiring a new image according to the adjusted exposure parameter;
wherein, according to the brightness mean value and a preset target brightness value, adjusting the exposure parameter of the image acquisition device includes: judging whether the Gain1 & Gain1Min & Gain2 & Gain2 Min; if yes, directly calculating and adjusting the exposure time Texp; if not, judging whether the adjusted Texp > ═ TexpMax & & Gain1< ═ Gain1 Min; if yes, directly calculating and adjusting a second digital Gain 2; if not, judging whether the adjusted Gain2> ═ Gain2Max & & Texp > ═ TexpMax; if yes, directly calculating and adjusting a first digital Gain 1; if not, setting Gain1 ═ Gain1Min and Gain2 ═ Gain2 Min; the brightness mean value is made to approach the target brightness value through the adjusted exposure parameters; wherein, Gain1Min represents the lower limit of the adjustable range of Gain1, Gain2Min represents the lower limit of the adjustable range of Gain2, Gain1Max represents the upper limit of the adjustable range of Gain1, Gain2Max represents the upper limit of the adjustable range of Gain2, TexpMax represents the upper limit of the adjustable range of Texp, and TexpMin represents the lower limit of the adjustable range of Texp.
2. The method of claim 1, wherein,
the adjusting of the exposure time comprises: determining according to the target brightness value, the exposure time corresponding to the previous frame image of the current frame image and the brightness average value;
and/or the presence of a gas in the gas,
the adjustment of the first digital gain comprises: determining according to the target brightness value, a first digital gain corresponding to a previous frame image of the current frame image and the brightness mean value;
and/or the presence of a gas in the atmosphere,
the adjustment of the second digital gain comprises: and determining according to the target brightness value, a second digital gain corresponding to a previous frame image of the current frame image and the brightness mean value.
3. The method of claim 1, wherein the method further comprises;
counting the number of pixels of which the illumination in the image is smaller than a preset first illumination threshold value;
if the number of pixels is less than a first number threshold, decreasing the target brightness value;
if the number of pixels is larger than a second number threshold, increasing the target brightness value;
wherein the first quantity threshold is less than the second quantity threshold.
4. The method of claim 1, wherein the method further comprises:
counting the number of pixels with the illumination intensity larger than a preset second illumination intensity threshold value in the image;
if the number of pixels is greater than a first number threshold, decreasing the target brightness value;
if the number of pixels is less than a second number threshold, increasing the target brightness value;
wherein the first quantity threshold is greater than the second quantity threshold.
5. The method of claim 3 or 4, wherein the method further comprises:
if the reduced target brightness value is smaller than the minimum target brightness threshold value, closing the low-illumination image acquisition mode;
alternatively, the first and second electrodes may be,
and if the increased target brightness value is larger than the maximum target brightness threshold value, starting a low-illumination image acquisition mode.
6. An electronic device, comprising: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus;
the memory is used for storing at least one executable instruction, and the executable instruction causes the processor to execute the operation corresponding to the image acquisition method according to any one of claims 1-5.
7. A computer storage medium having stored thereon a computer program which, when executed by a processor, implements the image acquisition method as claimed in any one of claims 1 to 5.
CN202210091084.9A 2022-01-26 2022-01-26 Image acquisition method, electronic device and computer storage medium Active CN114189634B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210091084.9A CN114189634B (en) 2022-01-26 2022-01-26 Image acquisition method, electronic device and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210091084.9A CN114189634B (en) 2022-01-26 2022-01-26 Image acquisition method, electronic device and computer storage medium

Publications (2)

Publication Number Publication Date
CN114189634A CN114189634A (en) 2022-03-15
CN114189634B true CN114189634B (en) 2022-06-14

Family

ID=80545782

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210091084.9A Active CN114189634B (en) 2022-01-26 2022-01-26 Image acquisition method, electronic device and computer storage medium

Country Status (1)

Country Link
CN (1) CN114189634B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115134492B (en) * 2022-05-31 2024-03-19 北京极光智芯科技有限公司 Image acquisition method, electronic device, and computer-readable medium
CN116758551A (en) * 2023-07-03 2023-09-15 读书郎教育科技有限公司 OCR character recognition method applied to dictionary pen
CN117061878B (en) * 2023-10-11 2024-01-23 北方夜视技术股份有限公司 Automatic exposure control method based on EBAPS sensor camera and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101262567A (en) * 2008-04-07 2008-09-10 北京中星微电子有限公司 Automatic exposure method and device
CN107071308A (en) * 2016-12-27 2017-08-18 福建新大陆自动识别技术有限公司 A kind of CMOS is quickly adjusted to as system and method
CN107995411A (en) * 2016-10-26 2018-05-04 株式会社电装 Video generation device
CN108259774A (en) * 2018-01-31 2018-07-06 珠海市杰理科技股份有限公司 Image combining method, system and equipment
CN111314622A (en) * 2020-02-26 2020-06-19 杭州涂鸦信息技术有限公司 Adaptive adjustment method, device and system for image brightness under various scenes
CN111491108A (en) * 2019-01-28 2020-08-04 杭州海康威视数字技术股份有限公司 Exposure parameter adjusting method and device
CN113452901A (en) * 2021-05-12 2021-09-28 北京迈格威科技有限公司 Image acquisition method and device, electronic equipment and computer readable storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9172889B2 (en) * 2012-02-09 2015-10-27 Semiconductor Components Industries, Llc Imaging systems and methods for generating auto-exposed high-dynamic-range images
US9077913B2 (en) * 2013-05-24 2015-07-07 Google Inc. Simulating high dynamic range imaging with virtual long-exposure images

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101262567A (en) * 2008-04-07 2008-09-10 北京中星微电子有限公司 Automatic exposure method and device
CN107995411A (en) * 2016-10-26 2018-05-04 株式会社电装 Video generation device
CN107071308A (en) * 2016-12-27 2017-08-18 福建新大陆自动识别技术有限公司 A kind of CMOS is quickly adjusted to as system and method
CN108259774A (en) * 2018-01-31 2018-07-06 珠海市杰理科技股份有限公司 Image combining method, system and equipment
CN111491108A (en) * 2019-01-28 2020-08-04 杭州海康威视数字技术股份有限公司 Exposure parameter adjusting method and device
CN111314622A (en) * 2020-02-26 2020-06-19 杭州涂鸦信息技术有限公司 Adaptive adjustment method, device and system for image brightness under various scenes
CN113452901A (en) * 2021-05-12 2021-09-28 北京迈格威科技有限公司 Image acquisition method and device, electronic equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN114189634A (en) 2022-03-15

Similar Documents

Publication Publication Date Title
CN114189634B (en) Image acquisition method, electronic device and computer storage medium
CN111418201B (en) Shooting method and equipment
CN108419023B (en) Method for generating high dynamic range image and related equipment
CN110728648B (en) Image fusion method and device, electronic equipment and readable storage medium
CN110619593B (en) Double-exposure video imaging system based on dynamic scene
CN111479072B (en) High dynamic range image synthesis method and device, image processing chip and aerial camera
CN108205796B (en) Multi-exposure image fusion method and device
CN109194882B (en) Image processing method, image processing device, electronic equipment and storage medium
US10742892B1 (en) Apparatus and method for capturing and blending multiple images for high-quality flash photography using mobile electronic device
CN104184958A (en) Automatic exposure control method and device based on FPGA and suitable for space exploration imaging
JP5974125B2 (en) Method and control unit for controlling the exposure of a camera
JP4600684B2 (en) Imaging apparatus and imaging method
WO2020051898A1 (en) Automatic exposure method and apparatus for dual-light image, and dual-light image camera and machine storage medium
CN107533756B (en) Image processing device, imaging device, image processing method, and storage medium storing image processing program for image processing device
JP5728498B2 (en) Imaging apparatus and light emission amount control method thereof
KR101972032B1 (en) Adaptive exposure control apparatus for a camera
WO2021237575A1 (en) Exposure control method and apparatus, and device, movable platform and storage medium
CN114449175A (en) Automatic exposure adjusting method, automatic exposure adjusting device, image acquisition method, medium and equipment
JP6600216B2 (en) Image processing apparatus, image processing method, program, and storage medium
JP2017063245A (en) Imaging device
US9922410B2 (en) Image processing apparatus and image processing method
KR20120122574A (en) Apparatus and mdthod for processing image in a digital camera
CN108337448B (en) High dynamic range image acquisition method and device, terminal equipment and storage medium
CN114666512B (en) Method and system for adjusting rapid automatic exposure
CN110072050B (en) Self-adaptive adjustment method and device of exposure parameters and shooting equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20220315

Assignee: Women Xili Environmental Technology Group Co.,Ltd.

Assignor: Alibaba Dharma Institute (Hangzhou) Technology Co.,Ltd.

Contract record no.: X2024980000597

Denomination of invention: Image acquisition methods, electronic devices, and computer storage media

Granted publication date: 20220614

License type: Common License

Record date: 20240112

EE01 Entry into force of recordation of patent licensing contract
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20220315

Assignee: Hangzhou Jinyong Technology Co.,Ltd.

Assignor: Alibaba Dharma Institute (Hangzhou) Technology Co.,Ltd.

Contract record no.: X2024980001317

Denomination of invention: Image acquisition methods, electronic devices, and computer storage media

Granted publication date: 20220614

License type: Common License

Record date: 20240123

Application publication date: 20220315

Assignee: Golden Wheat Brand Management (Hangzhou) Co.,Ltd.

Assignor: Alibaba Dharma Institute (Hangzhou) Technology Co.,Ltd.

Contract record no.: X2024980001316

Denomination of invention: Image acquisition methods, electronic devices, and computer storage media

Granted publication date: 20220614

License type: Common License

Record date: 20240123

Application publication date: 20220315

Assignee: Hangzhou Xinlong Huazhi Trademark Agency Co.,Ltd.

Assignor: Alibaba Dharma Institute (Hangzhou) Technology Co.,Ltd.

Contract record no.: X2024980001315

Denomination of invention: Image acquisition methods, electronic devices, and computer storage media

Granted publication date: 20220614

License type: Common License

Record date: 20240123

EE01 Entry into force of recordation of patent licensing contract