WO2020192774A1 - 一种曝光控制方法及电子设备 - Google Patents

一种曝光控制方法及电子设备 Download PDF

Info

Publication number
WO2020192774A1
WO2020192774A1 PCT/CN2020/081809 CN2020081809W WO2020192774A1 WO 2020192774 A1 WO2020192774 A1 WO 2020192774A1 CN 2020081809 W CN2020081809 W CN 2020081809W WO 2020192774 A1 WO2020192774 A1 WO 2020192774A1
Authority
WO
WIPO (PCT)
Prior art keywords
brightness
exposure time
image
gain value
preset
Prior art date
Application number
PCT/CN2020/081809
Other languages
English (en)
French (fr)
Inventor
于淼
张国平
马伟民
Original Assignee
杭州海康威视数字技术股份有限公司
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 杭州海康威视数字技术股份有限公司 filed Critical 杭州海康威视数字技术股份有限公司
Publication of WO2020192774A1 publication Critical patent/WO2020192774A1/zh

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/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
    • 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

Definitions

  • This application relates to the technical field of exposure control, and in particular to an exposure control method and electronic equipment.
  • the current step size determined is It is relatively small, so that through multiple adjustments to the parameter values of other exposure parameters of the image capture device, it gradually approaches the stable brightness, that is, the image captured by the image capture device reaches the target brightness.
  • the embodiment of the present application is to provide an exposure control method and electronic device, so as to reduce the configuration times of the parameter value of the exposure parameter of the image acquisition device and shorten the exposure adjustment time.
  • the specific technical solutions are as follows:
  • an embodiment of the present application provides an exposure control method, and the method includes:
  • the second exposure time is calculated, where the first function is: the image brightness and the exposure time are used as parameters Function formula
  • the image capture device is configured so that the brightness of the image subsequently captured by the image capture device reaches the target brightness.
  • the method before the step of calculating the second exposure time based on the first function, the first brightness, the preset target brightness, and the first exposure time, the method further includes:
  • the step of calculating the second exposure time based on the first function, the first brightness, the target brightness, and the first exposure time is performed.
  • the method further includes:
  • a second gain value is calculated based on a second function, the first brightness, the target brightness, and the first gain value, where the second function is : Function formula with image brightness and gain as parameter variables;
  • the image acquisition device is configured so that all The brightness of the image subsequently collected by the image collecting device reaches the target brightness.
  • the method further includes:
  • the second gain value does not fall within the preset gain value interval, it is based on the second function, the lower limit of the preset gain value interval, the first gain value, and the The first brightness, the second brightness is calculated;
  • the method before the step of configuring the image capture device based on the first gain value, the second exposure time, and the first aperture value, the method further includes:
  • the third brightness is calculated
  • a third gain value is calculated, where the second function is: a function with image brightness and gain as parameter variables formula;
  • the third gain value falls within the preset gain value interval, based on the upper limit of the preset exposure time interval, the third gain value, and the first aperture value, configure the ⁇ Image acquisition equipment.
  • the step of calculating the second exposure time based on the first function, the first brightness, the preset target brightness, and the first exposure time includes:
  • the TarY represents the target brightness
  • the CurY0 represents the first brightness
  • the CurShut0 represents the first exposure time
  • the TarShut1 represents the second exposure time
  • the step of calculating a second gain value based on the second function, the first brightness, the target brightness, and the first gain value includes:
  • the formula used is: or Calculate the second gain value
  • the TarY represents the target brightness
  • the CurY0 represents the first brightness
  • the CurAgc0 represents the first gain value
  • the TarAgc1 represents the second gain value
  • the method before the step of acquiring an image acquired by an image acquisition device and the first exposure time, first aperture value, and first gain value when the image acquisition device acquires the image, the method also includes:
  • an aperture value modification instruction triggered by a user where the aperture value modification instruction carries a first aperture value to be modified; modifying the aperture value of the image acquisition device to the first aperture value;
  • the modified magnification is determined as the current magnification; based on the preset correspondence and the current magnification, the first aperture value to be modified is determined, where
  • the preset correspondence relationship includes: a correspondence relationship between a magnification and an aperture value; and modifying the aperture value of the image acquisition device to the first aperture value.
  • an embodiment of the present application provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete mutual communication through the communication bus;
  • Memory used to store computer programs
  • the processor is configured to implement any of the above-mentioned exposure control method steps provided in the embodiments of the present application when executing the computer program stored in the memory.
  • the technical solution provided by the embodiments of the present application acquires the image collected by the image acquisition device, and the first exposure time, the first aperture value, and the first gain value when the image acquisition device acquires the image; calculate the brightness of the image and record it as the first brightness ; Based on the first function, the first brightness, the preset target brightness, and the first exposure time, the second exposure time is calculated, where the first function is: a function formula with image brightness and exposure time as parameters; based on the first A gain value, a second exposure time, and a first aperture value are configured to configure the image capture device so that the brightness of the image subsequently captured by the image capture device reaches the target brightness.
  • the second exposure time can be calculated at one time, and then based on the second The exposure time, the first gain value, and the first aperture value are configured to configure the image capture device so that the brightness of the image subsequently captured by the image capture device reaches the target brightness.
  • the first function can be achieved by taking the image brightness and the exposure time as the parameter variable.
  • Configure the image capture device once that is, configure the parameter value of the exposure parameter of the image capture device, that is, make the brightness of the image captured by the configured image capture device reach the target brightness, and achieve the purpose of reducing the number of times the image capture device is configured, that is, reduce The configuration times of the parameter value of the exposure parameter of the image acquisition device shorten the exposure adjustment time.
  • any product or method of the present application does not necessarily need to achieve all the advantages described above at the same time.
  • FIG. 1 is a schematic flowchart of an exposure control method provided by an embodiment of the application
  • FIG. 2 is a schematic flowchart of an exposure control method in the case where it is determined that the first brightness is less than the target brightness provided by an embodiment of the application;
  • Fig. 3 is a process provided by an embodiment of the application.
  • an image capture device is configured when the first brightness is greater than the target brightness, so that the image captured by the image capture device reaches the target brightness.
  • Figure 4 is provided by an embodiment of the application. Based on the process shown in Figure 3, the image capture device is configured when the second gain value does not fall within the preset gain value interval, so that the image captured by the image capture device A schematic diagram of a process for achieving the target brightness;
  • FIG. 5 is a schematic flowchart of a specific implementation of step S104 shown in FIG. 1 according to an embodiment of the application;
  • FIG. 6 is a schematic structural diagram of an electronic device provided by an embodiment of the application.
  • the embodiments of the present application provide an exposure control method and an electronic device, so as to reduce the configuration times of the parameter values of the exposure parameters of the image acquisition device and shorten the exposure adjustment time.
  • an embodiment of the present application provides an exposure control method, which may include the following steps:
  • S101 Acquire an image collected by an image acquisition device, and a first exposure time, a first aperture value, and a first gain value when the image acquisition device collects the image;
  • S102 Calculate the brightness of the image and record it as the first brightness
  • the exposure control method provided in the embodiments of the present application can be applied to any type of electronic equipment.
  • the electronic equipment can be a computer, a smart phone, an all-in-one machine, and an image capture device.
  • the image capture device can include a video camera and a camera. And other equipment.
  • the functional software that implements the exposure control method may exist in the form of special client software, or in the form of plug-ins of current client software, which is all right.
  • the current client software can be any client software that can call a camera to collect images.
  • the image capture device When the image capture device captures an image, it corresponds to a set of parameter values of exposure parameters, and the parameter values of the exposure parameters may include the exposure time of the shutter, the gain value of the gain, and the aperture value of the iris.
  • the image acquisition device After the image acquisition device acquires the current image, it can correspond to the current image and record the parameter value of the exposure parameter when the current image is acquired.
  • the image acquisition device can obtain the image it has collected, and obtain the first exposure time, first aperture value, and first gain value when the image is collected, and calculate The brightness of the captured image is used as the first brightness, and the subsequent exposure control process is executed to realize the exposure control of itself.
  • the electronic device when the electronic device is a non-image capture device, such as a computer, a smart phone, an all-in-one machine, etc., the electronic device can be connected to one or more image capture devices to obtain one or more connected image capture devices. Images captured by multiple image capture devices, and the first exposure time, first aperture value, and first gain value when each image capture device captures the corresponding image, and calculate the brightness of the image captured by each image capture device, As the first brightness. Among them, the image collected by each image acquisition device corresponds to a first brightness, and the subsequent exposure control process is executed for each image acquisition device to realize the exposure control of each image acquisition device.
  • the image acquired by the acquired image acquisition device may be the latest one or more images acquired by the image acquisition device.
  • the acquired first exposure time, first aperture value, and first gain value are the The exposure time, aperture value and gain value of an image.
  • the brightness of the image can be calculated directly based on the pixel points in the image, which is recorded as the first brightness.
  • the acquired first exposure time, first aperture value, and first gain value are the multiple images captured by the image capture device
  • the exposure time, aperture value and gain value of the image when the image acquisition device acquires the multiple images, the exposure time, aperture value, and gain value can be kept unchanged. Subsequently, the average brightness of the multiple images can be calculated directly based on the pixel points in the multiple images, which is recorded as the first brightness.
  • the first function is: a function formula with image brightness and exposure time as parameter variables, the image brightness is the image brightness;
  • S104 Based on the first gain value, the second exposure time, and the first aperture value, configure the image capture device so that the brightness of the image subsequently captured by the image capture device reaches the target brightness.
  • the exposure parameters of the image capture device affect the brightness of the image captured by the image capture device to a certain extent.
  • the brightness of images subsequently captured by the image capture device can be adjusted by reconfiguring the exposure time of the shutter of the image capture device, so that the image capture device is based on the reconfigured exposure time, aperture value, and gain value.
  • the brightness of the collected image can reach the target brightness.
  • a function formula with image brightness and exposure time as parameter variables can be determined in advance as the first function, Furthermore, when the first brightness is less than the preset target brightness, the second exposure time can be calculated based on the first function, the first brightness, the target brightness, and the first exposure time. In this way, based on the second exposure time, the first gain value, and the first aperture value, configuring the exposure parameters of the image capture device can make the brightness of the image subsequently captured by the image capture device reach the target brightness.
  • the foregoing process of configuring the exposure parameters of the image capture device based on the second exposure time, the first gain value, and the first aperture value may be: configuring the exposure time of the shutter of the image capture device as the second exposure time, maintaining The gain value of the gain of the image acquisition device is unchanged at the first gain value, and the aperture value of the iris of the image acquisition device is kept unchanged.
  • reaching the target brightness may be: the absolute value of the difference between the brightness of the collected image and the target brightness is not greater than the preset brightness difference. That is, the error between the brightness of the image collected based on the second exposure time, the first gain value and the first aperture value and the target brightness is within a certain range.
  • the staff in order to obtain the above-mentioned first function, can fix the aperture value and gain value of the image acquisition device in advance, change the exposure time of the image acquisition device, and obtain the images collected by the image acquisition device under different exposure times. Furthermore, the exposure time and the brightness of the image corresponding to the exposure time are recorded.
  • multiple sets of exposure times under fixed aperture values and gain values and the brightness of the images corresponding to the exposure times can be collected.
  • the exposure time recorded under each set of fixed aperture value and gain value and the brightness of the image corresponding to the exposure time can be used to determine a function formula with image brightness and exposure time as parameters to obtain the first function.
  • the formula used in the step of calculating the second exposure time based on the first function, the first brightness, the preset target brightness, and the first exposure time, can be expressed as:
  • the TarY represents the target brightness
  • the CurY0 represents the first brightness
  • the CurShut0 represents the first exposure time
  • the TarShut1 represents the second exposure time
  • the second exposure time can be calculated at one time, and then based on the second The exposure time, the first gain value, and the first aperture value are used to configure the exposure parameters of the image capture device so that the brightness of the image subsequently captured by the image capture device reaches the target brightness.
  • the number of times is the purpose of reducing the configuration times of the parameter values of the exposure parameters of the image acquisition device and shortening the exposure adjustment time.
  • the embodiment of the present application directly uses the first function, that is, the predetermined function formula with image brightness and exposure time as parameters, to determine the exposure time, which can make the brightness of the image captured by the image capture device reach the target brightness,
  • the gain value and iris value can be adjusted once to make the brightness of the collected image reach the target brightness. To a certain extent, the brightness fluctuation of the image during the adjustment of the exposure parameters can be reduced.
  • the exposure control method provided in the embodiment of the present application may include the following steps:
  • S201 Acquire an image collected by an image acquisition device, and a first exposure time, a first aperture value, and a first gain value when the image acquisition device collects the image;
  • S202 Calculate the brightness of the image and record it as the first brightness
  • the first function is: a function formula with image brightness and exposure time as parameters;
  • S205 Based on the first gain value, the second exposure time, and the first aperture value, configure the image capture device so that the brightness of the image subsequently captured by the image capture device reaches the target brightness.
  • S201 is the same as S101 shown in FIG. 1
  • S202 is the same as S102 shown in FIG. 1
  • S205 is the same as S104 shown in FIG. 1.
  • the brightness of images subsequently captured by the image capture device can be adjusted by adjusting the specific configuration of the exposure parameters of the image capture device.
  • the exposure parameters of the image capture device include but are not limited to shutter, gain, and aperture value.
  • the electronic device may compare the first brightness and the target brightness before determining the exposure control strategy. If it is determined that the first brightness is less than the target brightness, it is determined that The brightness of images subsequently captured by the image capture device is increased to achieve the target brightness. In order to increase the brightness of the images subsequently captured by the image capture device, the exposure time and/or the gain value of the gain of the shutter of the image capture device can be increased and/or Or the aperture value of the aperture.
  • At least one of the exposure time of the shutter of the image acquisition device, the gain value of the gain, and the aperture value of the iris can be increased.
  • the embodiment of the application determines that the first brightness is less than the target brightness In this case, the brightness of the image subsequently captured by the image capture device can be adjusted by adjusting the exposure time of the shutter of the image capture device. Only by adjusting the exposure time of the shutter of the image capture device, the brightness of the image captured by the image capture device can reach the target brightness, and the increase of the gain value of the gain can be avoided to increase the noise of the image.
  • the second exposure time is calculated based on the first function, the first brightness, the target brightness, and the first exposure time, and further, the exposure time of the shutter of the image capture device is configured as the second exposure time, and the image capture is maintained
  • the gain value of the gain of the device and the iris value of the iris remain unchanged. Only by adjusting the exposure time of the image capture device, the brightness of the subsequent image captured by the image capture device can reach the target brightness, and there is no need to increase the gain of the gain. Value, to a certain extent guarantee the quality of the image collected by the image acquisition device.
  • the exposure control method provided in the embodiment of the present application may include the following steps:
  • S301 Acquire an image collected by the image acquisition device, and the first exposure time, the first aperture value, and the first gain value when the image acquisition device collects the image;
  • S302 Calculate the brightness of the image and record it as the first brightness
  • the first function is: a function formula with image brightness and exposure time as parameters;
  • S305 Based on the first gain value, the second exposure time, and the first aperture value, configure the image capture device so that the brightness of the image subsequently captured by the image capture device reaches the target brightness;
  • the second function is: a function formula with image brightness and gain as parameter variables;
  • the S301 is the same as S201 shown in FIG. 2
  • the S302 is the same as S202 shown in FIG. 2
  • the S303 is the same as S203 shown in FIG. 2
  • the S304 is the same as S204 shown in FIG.
  • This S305 is the same as S205 shown in FIG. 2.
  • the exposure time and/or the gain value of the gain of the shutter of the image acquisition device and/or the aperture value of the iris it is necessary to reduce the exposure time of the shutter of the image acquisition device, the gain value of the gain, and the aperture value of the iris. That is to say, in order to reduce the brightness of images subsequently collected by the image acquisition device, at least one of the exposure time of the shutter of the image acquisition device, the gain value of the gain, and the aperture value of the iris can be reduced.
  • the second gain value can be calculated based on the function formula that takes the image brightness and gain as parameter variables, that is, the second function, the first brightness, the target brightness, and the first gain value.
  • the image capture device may be configured based on the second gain value, the first exposure time, and the first aperture value, so that the brightness of the image subsequently captured by the image capture device reaches the target brightness.
  • each image acquisition device will have a range of gain values that it can support, that is, a preset gain value interval.
  • the second gain value after the second gain value is calculated, it can be first detected whether the second gain value falls within the preset gain value interval, that is, the Whether the second gain value is not greater than the upper limit of the preset gain value interval and not less than the lower limit of the preset gain value interval.
  • the image acquisition device is configured so that the brightness of the image subsequently collected by the image acquisition device reaches Target brightness.
  • the gain value does not need to be adjusted multiple times through a small step size, that is, the gain value does not need to be adjusted multiple times, so that the brightness of the image subsequently collected by the image acquisition device can reach the target brightness.
  • the above-mentioned second function is: a predetermined function formula with image brightness and gain as parameter variables.
  • the staff in order to obtain the above second function, can fix the aperture value of the aperture of the image acquisition device and the exposure time of the shutter in advance, change the gain value of the image acquisition device, and obtain the image acquisition device under different gain values. Then record the gain value and the brightness of the image corresponding to the gain value.
  • multiple sets of fixed aperture value and gain value under exposure time and the brightness of the image corresponding to the gain value can be collected; subsequently, the staff can use each set of fixed aperture value and gain value recorded under exposure time And the brightness of the image corresponding to the gain value, determine the function formula with the image brightness and gain as the parameter variables to obtain the second function.
  • the formula used in the step of calculating the second gain value based on the second function, the first brightness, the target brightness, and the first gain value, the formula used may be:
  • the TarY represents the target brightness
  • the CurY0 represents the first brightness
  • the CurAgc0 represents the first gain value
  • the TarAgc1 represents the second gain value
  • the gain value that can make the brightness of the image collected by the image collection device reach the target brightness can be determined.
  • the exposure control method provided by the embodiment of the present application may include the following steps:
  • S401 Acquire an image collected by an image acquisition device, and a first exposure time, a first aperture value, and a first gain value when the image acquisition device collects the image;
  • S402 Calculate the brightness of the image and record it as the first brightness
  • the first function is: a function formula with image brightness and exposure time as parameters;
  • S405 Based on the first gain value, the second exposure time, and the first aperture value, configure the image capture device so that the brightness of the image subsequently captured by the image capture device reaches the target brightness;
  • the second function is: a function formula with image brightness and gain as parameter variables;
  • S409 Calculate the third exposure time based on the first function, the second brightness, the first exposure time and the target brightness;
  • the S401 is the same as S301 shown in FIG. 3
  • the S402 is the same as S302 shown in FIG. 3
  • the S403 is the same as S303 shown in FIG. 3
  • the S404 is the same as S304 shown in FIG. S305 shown in 3 is the same
  • S406 is the same as S306 shown in FIG. 3
  • S407 is the same as S307 shown in FIG. 3.
  • the second gain value if it is determined that the current brightness is greater than the target brightness, if it is detected that the second gain value does not fall within the preset gain value interval, it is detected that the second gain value is less than the lower limit of the preset gain value interval , It can be determined that only by adjusting the gain value of the gain of the image acquisition device, the brightness of the image subsequently collected by the image acquisition device cannot reach the target brightness.
  • the brightness of the collected image reaches the target brightness. That is, the brightness of the image collected by the image capture device based on the adjusted gain value, the adjusted exposure time, and the first aperture value can reach the target brightness.
  • the above process of continuing to adjust the exposure time of the shutter may be: first calculate the second brightness based on the second function, the lower limit of the preset gain value interval, the first gain value and the current brightness, that is, Determine the image captured by the image capture device when the gain value of the gain of the image capture device is adjusted to the lower limit of the preset gain value interval without modifying the aperture value of the aperture of the image capture device and the exposure time of the shutter Achievable brightness.
  • the third exposure time may be calculated based on the first function, the second brightness, the target brightness, and the first exposure time.
  • each image capture device has a range of exposure time of the shutter and a range of gain values that it can support.
  • the exposure process in order to better control the exposure process, after the above-mentioned third exposure time is determined, it is possible to continue to detect whether the third exposure time falls within the preset exposure time interval.
  • the third exposure time falls within the preset exposure time interval, based on the lower limit of the preset gain value interval, the third exposure time, and the first aperture value, configure the image acquisition device so that the image acquisition device subsequently collects The brightness of the image reaches the target brightness.
  • it is not necessary to adjust the exposure time and gain value multiple times through a small step size that is, it is not necessary to adjust the exposure time and gain value multiple times to make the brightness of the image subsequently collected by the image capture device reach the target brightness.
  • the brightness of images subsequently collected by the image collection device can reach the target brightness.
  • the image acquisition device corresponds to a target exposure time interval and a target gain interval that can actually be supported
  • the preset exposure time interval is: a subset of the target exposure time interval
  • the preset gain value interval is: A subset of the target gain interval.
  • the target exposure time interval that the image capture device can actually support is divided into three in advance, namely [a1, a2), [a2, a3) and [a3, a4], where a1 ⁇ a2 ⁇ a3 ⁇ a4.
  • the target gain interval that the image acquisition device can actually support is divided into three parts in advance, namely [b1, b2), [b2, b3) and [b3, b4], where b1 ⁇ b2 ⁇ b3 ⁇ b4.
  • the image acquisition device is configured directly based on the lower limit of the preset gain value interval, the third exposure time, and the first aperture value so that the brightness of the image subsequently collected by the image acquisition device reaches the target brightness.
  • the electronic device can continue to determine the fourth brightness based on the second function, b1, the first gain value, and the first brightness , And then determine the fourth exposure time based on the first function, the fourth brightness, the first exposure time, and the target brightness. If it is detected that the fourth exposure time falls within [a1, a2), then based on b1, the fourth exposure time, and The first aperture value configures the image capture device so that the brightness of the image subsequently captured by the image capture device reaches the target brightness.
  • the process of calculating the second brightness based on the second function, the lower limit of the preset gain value interval, the first gain value, and the first brightness can be expressed as:
  • CurY2 represents the second brightness
  • MinAgc represents the lower limit of the preset gain value interval
  • CurY0 represents the first brightness
  • CurAgc0 represents the first gain value
  • the TarY represents the target brightness
  • the CurY2 represents the second brightness
  • the CurShut0 represents the first exposure time
  • the TarShut2 represents the third exposure time.
  • the obtained third exposure time can be expressed as:
  • the foregoing S104 may include the following steps:
  • S501 Detect whether the second exposure time falls within a preset exposure time interval
  • the exposure time of the shutters supported by them are different.
  • it in order to better control the exposure process, after the second exposure time is determined, it can continue to determine whether the second exposure time falls within the preset exposure time interval.
  • the exposure time interval to indicate that the image capture device supports the second exposure time, only by reconfiguring the exposure time of the image capture device's shutter, and keep the gain value of the image capture device's gain and the aperture value of the iris unchanged , That is, only adjusting the exposure time of the shutter of the image capture device can achieve the purpose of making the brightness of the image subsequently captured by the image capture device directly reach the target brightness, and it can be determined that the second exposure time is: The brightness of the obtained image directly reaches the exposure time of the target brightness.
  • the electronic device can configure the image capture device based on the second exposure time, the first gain value, and the first aperture value, so that the brightness of the image subsequently captured by the image capture device reaches the target brightness.
  • the second exposure time that enables the image capture device to collect images with the brightness reaching the target brightness
  • there is no need to adjust the exposure time multiple times through a small step that is, there is no need to adjust the exposure time multiple times to make the image
  • the brightness of the image subsequently collected by the collection device reaches the target brightness.
  • the foregoing S104 may further include the following steps:
  • S504 Calculate a third gain value based on the second function, the third brightness, the first gain value, and the target brightness, where the second function is: a function formula with image brightness and gain as parameter variables;
  • the gain value of the gain of the image acquisition device can be continuously adjusted, so that the image acquisition device can acquire an image whose brightness can reach the target brightness based on the adjusted gain value, the adjusted exposure time, and the first aperture value.
  • the above process of continuing to adjust the gain value of the gain may be: first determining the third brightness based on the first function, the upper limit of the preset exposure time interval, the first exposure time, and the first brightness. Furthermore, in order to better adjust the exposure parameters and realize the control of the exposure process, the third gain value can be calculated based on the second function, the third brightness, the first gain value, and the target brightness.
  • the image acquisition device is configured so that the image acquisition device can acquire an image whose brightness reaches the target brightness.
  • each image capture device has a range of exposure time of the shutter that it can support.
  • the image acquisition device is configured based on the upper limit value of the preset exposure time interval, the third gain value, and the first aperture value. In this way, it is not necessary to adjust the exposure time and gain value multiple times through a small step size, that is, it is not necessary to adjust the exposure time and gain value multiple times to make the brightness of the image subsequently collected by the image capture device reach the target brightness.
  • the exposure time may be adjusted first, and then the gain value may be adjusted.
  • the image acquisition device corresponds to a target exposure time interval and a target gain interval that can actually be supported
  • the preset exposure time interval is: a subset of the target exposure time interval
  • the preset gain value interval is: A subset of the target gain interval.
  • the target exposure time interval that the image capture device can actually support is divided into three in advance, namely [a1, a2), [a2, a3) and [a3, a4], where a1 ⁇ a2 ⁇ a3 ⁇ a4.
  • the target gain interval that the image capture device can actually support is divided into three in advance, namely [b1, b2), [b2, b3) and [b3, b4], where b1 ⁇ b2 ⁇ b3 ⁇ b4.
  • the electronic device can continue to determine the fifth brightness based on the first function, a4, the first gain value, and the first brightness ; Further based on the second function, the fifth brightness, the first gain value and the target brightness, determine the fourth gain value.
  • the formula used in the process of calculating the third brightness based on the first function, the upper limit of the preset exposure time interval, the first exposure time, and the first brightness, the formula used can be expressed as:
  • the CurY3 represents the third brightness
  • the CurY0 represents the first brightness
  • the CurShut0 represents the first exposure time
  • MaxShut represents the upper limit of the preset exposure time interval.
  • the formula used can be expressed as:
  • TarAgc2 represents the third gain value
  • the CurAgc0 represents the first gain value
  • the TarY represents the target brightness
  • the CurY3 represents the third brightness
  • the obtained third gain value can be expressed as:
  • the method may further include :
  • the process of modifying the aperture value of the image capture device may include:
  • the modified magnification is determined as the current magnification
  • the user before acquiring the image, can also adjust the aperture value of the aperture of the image capture device according to actual needs, or the electronic device can adjust the aperture of the image capture device according to the specific conditions of the environment in which the image capture device is located The aperture value.
  • the electronic device can obtain the user-triggered modification of the aperture value carrying the target aperture value.
  • the aperture value modification instruction carries a first aperture value
  • the first aperture value is the aperture value to be modified corresponding to the aperture value of the aperture of the image acquisition device.
  • the electronic device may modify the aperture value of the aperture of the image acquisition device to the first aperture value.
  • the other is to modify the aperture value by modifying the magnification of the image capture device.
  • the corresponding relationship between the magnification and the aperture value may be pre-stored locally in the electronic device or in a storage device connected to it.
  • the electronic device detects that the magnification of the image acquisition device has been modified, the modified magnification is determined as the current magnification.
  • search for the foregoing correspondence relationship find the aperture value corresponding to the current magnification from the correspondence relationship, as the target aperture value, modify the current aperture value of the image acquisition device to the target aperture value, and the target aperture value is the first Aperture value.
  • the aperture value that makes the captured image relatively good can be determined, and the aperture value can make the image capture device have the relatively best depth of field at the current magnification.
  • the definition is high and the noise of the collected image is small.
  • the preset correspondence relationship can be displayed in the form of a table or a curve, wherein the horizontal axis corresponding to the curve can represent the magnification, and the vertical axis corresponding to the curve can represent the aperture value.
  • the embodiment of the present application also provides an electronic device, as shown in FIG. 6, including a processor 610, a communication interface 620, a memory 630, and a communication bus 640, wherein the processor 610, the communication interface 620 , The memories 630 communicate with each other through the communication bus 640,
  • the memory 630 is used to store computer programs
  • the processor 610 is configured to execute the computer program stored in the memory 630 to implement any of the above-mentioned exposure control method steps provided in the embodiment of the present application.
  • the second exposure time can be calculated at one time, and then based on the second The exposure time, the first gain value, and the first aperture value are configured to configure the image capture device so that the brightness of the image subsequently captured by the image capture device reaches the target brightness.
  • the first function can be achieved by taking the image brightness and the exposure time as the parameter variable.
  • Configure the image capture device once that is, configure the parameter value of the exposure parameter of the image capture device, that is, make the brightness of the image captured by the reconfigured image capture device directly reach the target brightness, and reduce the number of configuration of the image capture device, namely Reduce the configuration times of the parameter value of the exposure parameter of the image acquisition device, and shorten the exposure adjustment time.
  • the embodiment of the present application directly uses the first pre-function, that is, the predetermined function formula with image brightness and exposure time as parameters, to determine the exposure time that enables the brightness of the image collected by the image capture device to reach the target brightness.
  • the gain value and the aperture value can be adjusted once to make the brightness of the image subsequently collected by the image collection device reach the target brightness. To a certain extent, the brightness fluctuation of the image during the adjustment of the exposure parameters can be reduced.
  • the communication bus mentioned in the above electronic device may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus.
  • PCI Peripheral Component Interconnect
  • EISA Extended Industry Standard Architecture
  • the communication bus can be divided into address bus, data bus, control bus and so on. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
  • the communication interface is used for communication between the aforementioned electronic device and other devices.
  • the memory may include random access memory (Random Access Memory, RAM), and may also include non-volatile memory (Non-Volatile Memory, NVM), such as at least one disk storage.
  • NVM non-Volatile Memory
  • the memory may also be at least one storage device located far away from the foregoing processor.
  • the above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (Network Processor, NP), etc.; it can also be a digital signal processor (Digital Signal Processing, DSP), a dedicated integrated Circuit (Application Specific Integrated Circuit, ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
  • CPU central processing unit
  • NP Network Processor
  • DSP Digital Signal Processing
  • ASIC Application Specific Integrated Circuit
  • FPGA Field-Programmable Gate Array

Landscapes

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

Abstract

本申请实施例提供了一种曝光控制方法及电子设备,该方法包括:获取图像采集设备采集的图像,以及图像采集设备采集图像时的第一曝光时间、第一光圈值和第一增益值;计算图像的亮度,记为第一亮度;在第一亮度小于预设的目标亮度时,基于第一函数、第一亮度、目标亮度以及第一曝光时间,计算得到第二曝光时间,其中,第一函数为:以图像亮度和曝光时间为参变量的函数公式;基于第一增益值、第二曝光时间和第一光圈值,配置图像采集设备,使得图像采集设备后续采集到的图像的亮度达到目标亮度,以实现降低图像采集设备的曝光参数的调整次数,缩短曝光调整时间。

Description

一种曝光控制方法及电子设备
本申请要求于2019年3月28日交中国专利局、申请号为201910244756.3发明名称为“一种曝光控制方法、装置及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及曝光控制技术领域,特别是涉及一种曝光控制方法及电子设备。
背景技术
相关的自动曝光过程中,在光圈固定的情况下,由于不能准确确定出图像采集设备所处环境的当前环境亮度与图像采集设备的其他曝光参数之间的关系,在调整其他曝光参数的参数值时都是基于经验计算当前的步长,其中,其他曝光参数可以包括快门和增益。
其中,在基于经验计算当前的步长的过程中,由于不能预计步长引起的图像的亮度的变化程度,为了避免步长过大,导致图像的亮度产生震荡,所确定的当前的步长都比较小,以通过多次调整图像采集设备的其他曝光参数的参数值,逐步接近稳定亮度,即使得图像采集设备所采集图像达到目标亮度。
可见,在上述自动曝光过程中,由于在调整其他曝光参数的参数值时所计算的步长较小,需要多次调整其他曝光参数的参数值,才能使得所采集图像达到目标亮度,导致曝光调整时间较长,用户体验不佳。
发明内容
本申请实施例在于提供一种曝光控制方法及电子设备,以实现降低图像采集设备的曝光参数的参数值的配置次数,缩短曝光调整时间。具体技术方案如下:
一方面,本申请实施例提供了一种曝光控制方法,所述方法包括:
获取图像采集设备采集的图像,以及所述图像采集设备采集所述图像时的第一曝光时间、第一光圈值和第一增益值;
计算所述图像的亮度,记为第一亮度;
基于第一函数、所述第一亮度、预设的目标亮度以及所述第一曝光时间,计算得到第二曝光时间,其中,所述第一函数为:以图像亮度和曝光时间为参变量的函数公式;
基于所述第一增益值、所述第二曝光时间和所述第一光圈值,配置所述图像采集设备,使得所述图像采集设备后续采集到的图像的亮度达到所述目标亮度。
可选地,在所述基于第一函数、所述第一亮度、预设的目标亮度以及所述第一曝光时间,计算得到第二曝光时间的步骤之前,所述方法还包括:
比较所述第一亮度和预设的目标亮度;
若所述第一亮度小于所述目标亮度,执行所述基于第一函数、所述第一亮度、所述目标亮度以及所述第一曝光时间,计算得到第二曝光时间的步骤。
可选地,所述方法还包括:
若所述第一亮度大于所述目标亮度,基于第二函数、所述第一亮度、所述目标亮度以及所述第一增益值,计算得到第二增益值,其中,所述第二函数为:以图像亮度和增益值为参变量的函数公式;
若检测到所述第二增益值落入预设增益值区间内,则基于所述第二增益值、所述第一曝光时间和所述第一光圈值,配置所述图像采集设备,使得所述图像采集设备后续采集到的图像的亮度达到所述目标亮度。
可选地,所述方法还包括:
若检测到所述第二增益值未落入所述预设增益值区间内,则基于所述第二函数、所述预设增益值区间的下限值、所述第一增益值以及所述第一亮度,计算得到第二亮度;
基于所述第一函数、所述第二亮度、所述第一曝光时间和所述目标亮度,计算得到第三曝光时间;
若检测到所述第三曝光时间落入预设曝光时间区间内,基于所述预设增 益值区间的下限值、所述第三曝光时间和所述第一光圈值,配置所述图像采集设备,使得所述图像采集设备后续采集到的图像的亮度达到所述目标亮度。
可选地,在所述基于所述第一增益值、所述第二曝光时间和所述第一光圈值,配置所述图像采集设备的步骤之前,所述方法还包括:
检测所述第二曝光时间是否落入预设曝光时间区间内;
若检测到所述第二曝光时间落入所述预设曝光时间区间内,执行所述基于所述第一增益值、所述第二曝光时间和所述第一光圈值,配置所述图像采集设备的步骤;
若检测到所述第二曝光时间未落入所述预设曝光时间区间内,基于所述第一函数、所述预设曝光时间区间的上限值、所述第一曝光时间以及所述第一亮度,计算得到第三亮度;
基于第二函数、所述第三亮度、所述第一增益值以及所述目标亮度,计算得到第三增益值,其中,所述第二函数为:以图像亮度和增益值为参变量的函数公式;
若检测到所述第三增益值落入所述预设增益值区间内,则基于所述预设曝光时间区间的上限值、所述第三增益值以及所述第一光圈值,配置所述图像采集设备。
可选地,所述基于第一函数、所述第一亮度、预设的目标亮度以及所述第一曝光时间,计算得到第二曝光时间的步骤,包括:
采用公式:
Figure PCTCN2020081809-appb-000001
Figure PCTCN2020081809-appb-000002
计算得到所述第二曝光时间;
其中,所述TarY表示所述目标亮度,所述CurY0表示所述第一亮度,所述CurShut0表示所述第一曝光时间,所述TarShut1表示所述第二曝光时间。
可选地,所基于第二函数、所述第一亮度、所述目标亮度以及所述第一增益值,计算得到第二增益值的步骤,包括:
采用公式为:
Figure PCTCN2020081809-appb-000003
Figure PCTCN2020081809-appb-000004
Figure PCTCN2020081809-appb-000005
计算第二增益值;
其中,所述TarY表示所述目标亮度,所述CurY0表示所述第一亮度,所述CurAgc0表示所述第一增益值,所述TarAgc1表示所述第二增益值。
可选地,在所述获取一张图像采集设备采集的图像,以及所述图像采集设备采集所述图像时的第一曝光时间、第一光圈值和第一增益值的步骤之前,所述方法还包括:
获得用户触发的光圈值修改指令,其中,所述光圈值修改指令携带所需修改到的第一光圈值;将所述图像采集设备的光圈值修改为所述第一光圈值;
或,
当检测到所述图像采集设备的倍率被修改时,确定修改后的倍率,作为当前倍率;基于预设的对应关系以及所述当前倍率,确定所需修改到的第一光圈值,其中,所述预设的对应关系包括:倍率与光圈值之间的对应关系;将所述图像采集设备的光圈值修改为所述第一光圈值。
另一方面,本申请实施例提供了一种电子设备,包括处理器、通信接口、存储器和通信总线,其中,处理器,通信接口,存储器通过通信总线完成相互间的通信;
存储器,用于存放计算机程序;
处理器,用于执行存储器上所存放的计算机程序时,实现本申请实施例所提供的上述任一所述的曝光控制方法步骤。
本申请实施例提供的技术方案,获取图像采集设备采集的图像,以及图像采集设备采集图像时的第一曝光时间、第一光圈值和第一增益值;计算图像的亮度,记为第一亮度;基于第一函数、第一亮度、预设的目标亮度以及第一曝光时间,计算得到第二曝光时间,其中,第一函数为:以图像亮度和曝光时间为参变量的函数公式;基于第一增益值、第二曝光时间和第一光圈值,配置图像采集设备,使得图像采集设备后续采集到的图像的亮度达到目标亮度。
本申请实施例中,基于以图像亮度和曝光时间为参变量的第一函数、第 一亮度、预设的目标亮度以及第一曝光时间,可以一次性计算得到第二曝光时间,进而基于第二曝光时间、第一增益值以及第一光圈值,配置图像采集设备,使得该图像采集设备后续采集到的图像的亮度达到目标亮度,可以通过以图像亮度和曝光时间为参变量的第一函数,实现一次配置图像采集设备,即配置图像采集设备曝光参数的参数值,即使得配置后的图像采集设备所采集的图像的亮度达到目标亮度,实现降低图像采集设备的配置的次数的目的,即降低图像采集设备的曝光参数的参数值的配置次数,缩短曝光调整时间。当然,实施本申请的任一产品或方法必不一定需要同时达到以上所述的所有优点。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本申请实施例所提供的一种曝光控制方法的流程示意图;
图2为本申请实施例所提供的,在确定第一亮度小于目标亮度的情况下的一种曝光控制方法的流程示意图;
图3为本申请实施例所提供的,在图2所示流程的基础上,在第一亮度大于目标亮度的情况下配置图像采集设备,使得图像采集设备采集的图像达到目标亮度的一种流程示意图;
图4为本申请实施例所提供的,在图3所示流程的基础上,在第二增益值未落入预设增益值区间内的情况下配置图像采集设备,使得图像采集设备采集的图像达到目标亮度的一种流程示意图;
图5为本申请实施例所提供的图1中所示的步骤S104的一种具体实现的流程示意图;
图6为本申请实施例所提供的一种电子设备的结构示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行 清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
本申请实施例提供了一种曝光控制方法及电子设备,以实现降低图像采集设备的曝光参数的参数值的配置次数,缩短曝光调整时间的目的。
如图1所示,本申请实施例提供了一种曝光控制方法,可以包括如下步骤:
S101:获取图像采集设备采集的图像,以及图像采集设备采集图像时的第一曝光时间、第一光圈值和第一增益值;
S102:计算图像的亮度,记为第一亮度;
本申请实施例所提供的曝光控制方法,可以应用于任一类型的电子设备,该电子设备可以为电脑、智能手机、一体机以及图像采集设备等设备,其中,图像采集设备可以包括摄像机以及相机等设备。在一种实现方式中,实现该曝光控制方法的功能软件可以以专门的客户端软件的形式存在,也可以以目前的客户端软件的插件的形式存在,这都是可以的。其中,该目前的客户端软件可以为任一可以调用摄像头以采集图像的客户端软件。
图像采集设备采集图像时,会对应一组曝光参数的参数值,该曝光参数的参数值可以包括快门的曝光时间、增益的增益值以及光圈的光圈值等。图像采集设备采集得到当前图像后,可以对应该当前图像,记录采集得到该当前图像时的曝光参数的参数值。
一种情况,当该电子设备为图像采集设备时,该图像采集设备可以获得自身所采集的图像,并获得采集该图像时的第一曝光时间、第一光圈值和第一增益值,并计算所采集图像的亮度,作为第一亮度,进而执行后续的曝光控制流程,以实现对自身的曝光控制。
另一种情况,当该电子设备为非图像采集设备时,例如为电脑、智能手机和一体机等设备,该电子设备可以与一个或多个图像采集设备进行连接,可以获得所连接的一个或多个图像采集设备所采集的图像,以及每一图像采集设备采集相应的图像时的第一曝光时间、第一光圈值和第一增益值,并计算每一图像采集设备所采集图像的亮度,作为第一亮度。其中,每一图像采 集设备所采集图像,对应有一个第一亮度,进而针对每一图像采集设备,执行后续的曝光控制流程,以实现对每一图像采集设备的曝光控制。
在一种实现方式中,所获取的图像采集设备采集的图像可以为图像采集设备所采集的最新的一张或多张图像。其中,当所获取的图像采集设备采集的图像为图像采集设备所采集的最新的一张图像时,所获取的第一曝光时间、第一光圈值和第一增益值,即为图像采集设备采集该一张图像时的曝光时间、光圈值和增益值。后续可以直接基于该图像中的像素点,计算得到该图像的亮度,记为第一亮度。
当所获取的图像采集设备采集的图像为图像采集设备所采集的最新的多张图像时,所获取的第一曝光时间、第一光圈值和第一增益值,即为图像采集设备采集该多张图像时的曝光时间、光圈值和增益值。其中,图像采集设备采集该多张图像时,可以保持曝光时间、光圈值和增益值不变。后续可以直接基于该多张图像中的像素点,计算得到该多张图像的平均亮度,记为第一亮度。
S103:在第一亮度小于预设的目标亮度时,基于第一函数、第一亮度、预设的目标亮度以及第一曝光时间,计算得到第二曝光时间。
其中,第一函数为:以图像亮度和曝光时间为参变量的函数公式,该图像亮度即为图像的亮度;
S104:基于第一增益值、第二曝光时间和第一光圈值,配置图像采集设备,使得图像采集设备后续采集到的图像的亮度达到目标亮度。
图像采集设备的曝光参数,即图像采集设备采集图像时的曝光时间、光圈值和增益值,在一定程度上影响着图像采集设备采集得到的图像的亮度。在一种情况中,可以通过重新配置图像采集设备的快门的曝光时间,来调整该图像采集设备后续采集到的图像的亮度,使得图像采集设备基于重新配置后的曝光时间、光圈值以及增益值,采集得到的图像的亮度可以达到目标亮度。
本申请实施例中,为了更好的实现对图像采集设备的曝光参数的调整,实现对曝光过程的控制,可以预先确定出以图像亮度和曝光时间为参变量的函数公式,作为第一函数,进而,在第一亮度小于预设的目标亮度时,基于 第一函数、第一亮度、目标亮度以及第一曝光时间,可以计算得到第二曝光时间。这样,基于该第二曝光时间、第一增益值以及第一光圈值,配置图像采集设备的曝光参数,可以使得图像采集设备后续采集得到的图像的亮度达到目标亮度。
其中,上述基于该第二曝光时间、第一增益值以及第一光圈值,配置图像采集设备的曝光参数的过程,可以是:将图像采集设备的快门的曝光时间配置为第二曝光时间,保持图像采集设备的增益的增益值为第一增益值不变,并保持图像采集设备的光圈的光圈值为第一光圈值不变。
其中,达到目标亮度可以为:所采集得到的图像的亮度与目标亮度之间的差值的绝对值不大于预设亮度差值。也就是说,基于第二曝光时间、第一增益值以及第一光圈值所采集得到的图像的亮度与目标亮度之间的误差在一定范围内。
一种情况,为了得到上述第一函数,工作人员可以预先将图像采集设备的光圈值和增益值固定,改变图像采集设备的曝光时间,获取该图像采集设备在不同曝光时间下的采集的图像,进而记录曝光时间以及该曝光时间对应的图像的亮度。
其中,可以采集多组固定的光圈值和增益值下的曝光时间以及该曝光时间对应的图像的亮度。后续可以利用每一组固定的光圈值和增益值下所记录的曝光时间以及该曝光时间对应的图像的亮度,确定出以图像亮度和曝光时间为参变量的函数公式,以得到第一函数。
在一种实现方式中,基于第一函数、第一亮度、预设的目标亮度以及第一曝光时间,计算得到第二曝光时间的步骤中,所采用公式可以表示为:
Figure PCTCN2020081809-appb-000006
Figure PCTCN2020081809-appb-000007
其中,该TarY表示目标亮度,该CurY0表示第一亮度,该CurShut0表示第一曝光时间,该TarShut1表示第二曝光时间。
本申请实施例中,基于以图像亮度和曝光时间为参变量的第一函数、第一亮度、预设的目标亮度以及第一曝光时间,可以一次性计算得到第二曝光时间,进而基于第二曝光时间、第一增益值以及第一光圈值,配置图像采集 设备的曝光参数,使得该图像采集设备后续采集到的图像的亮度达到目标亮度,可以通过以图像亮度和曝光时间为参变量的第一函数,实现一次配置图像采集设备,即配置图像采集设备曝光参数的参数值,即使得重新配置后的图像采集设备所采集的图像的亮度,直接达到目标亮度,实现降低图像采集设备的配置的次数,即降低图像采集设备的曝光参数的参数值的配置次数,缩短曝光调整时间的目的。
并且,本申请实施例,直接通过第一函数,即预先确定的以图像亮度和曝光时间为参变量的函数公式,确定出能够使得图像采集设备所采集的图像的亮度达到目标亮度的曝光时间、增益值以及光圈值,实现一次调整,即可使得所采集的图像的亮度达到目标亮度。在一定程度上可以减少曝光参数调整过程中图像的亮度震荡的情况。
在一种实现方式中,如图2所示,本申请实施例所提供的曝光控制方法,可以包括如下步骤:
S201:获取图像采集设备采集的图像,以及图像采集设备采集图像时的第一曝光时间、第一光圈值和第一增益值;
S202:计算图像的亮度,记为第一亮度;
S203:比较第一亮度和目标亮度的大小;
S204:若第一亮度小于目标亮度,基于第一函数、第一亮度、目标亮度以及第一曝光时间,计算得到第二曝光时间;
其中,第一函数为:以图像亮度和曝光时间为参变量的函数公式;
S205:基于第一增益值、第二曝光时间和第一光圈值,配置图像采集设备,使得图像采集设备后续采集到的图像的亮度达到目标亮度。
其中,该S201与图1中所示的S101相同,该S202与图1中所示的S102相同,该S205与图1中所示的S104相同。
一种情况中,可以通过调整图像采集设备的曝光参数的具体配置,来调整图像采集设备后续所采集的图像的亮度,其中,图像采集设备的曝光参数包括但不限于快门、增益以及光圈值。
鉴于图像采集设备的增益的增益值越大,该图像采集设备所采集的图像中的噪点越多,即图像噪声越多,进而图像的质量越低。本申请实施例,为 了保证图像采集设备所采集的图像的质量,电子设备在确定曝光控制策略之前,可以比较第一亮度和目标亮度的大小,若确定第一亮度小于目标亮度,即确定需要使得图像采集设备后续采集的图像的亮度提高,以达到目标亮度,而为了使得图像采集设备后续采集的图像的亮度提高,可以调大图像采集设备的快门的曝光时间和/或增益的增益值和/或光圈的光圈值。
也就是说,为了使图像采集设备后续采集的图像的亮度提高,可以调大图像采集设备的快门的曝光时间、增益的增益值及光圈的光圈值中的至少一个。
考虑到如果调大增益的增益值,会引入较多的图像的噪点,即为图像引入较多的图像噪声,并且考虑到降低调整次数,本申请实施例,在确定第一亮度小于目标亮度的情况下,可以通过调整图像采集设备的快门的曝光时间,来调整图像采集设备后续采集的图像的亮度。仅通过调整图像采集设备的快门的曝光时间,即可实现使得图像采集设备所采集的图像的亮度达到目标亮度的目的,则可以避免出现调大增益的增益值,使得图像的噪点增多的情况。
后续的,基于第一函数、第一亮度、目标亮度以及第一曝光时间,计算得到的第二曝光时间,进而,将图像采集设备的快门的曝光时间配置为第二曝光时间,并且保持图像采集设备的增益的增益值以及光圈的光圈值不变,实现仅通过调整图像采集设备的曝光时间,即可使得图像采集设备后续采集的图像的亮度达到目标亮度的目的,无需再调大增益的增益值,在一定程度上保证图像采集设备所采集图像的质量。
在一种实现方式中,如图3所示,本申请实施例所提供的曝光控制方法,可以包括如下步骤:
S301:获取图像采集设备采集的图像,以及图像采集设备采集图像时的第一曝光时间、第一光圈值和第一增益值;
S302:计算图像的亮度,记为第一亮度;
S303:比较第一亮度和目标亮度的大小;
S304:若第一亮度小于目标亮度,基于第一函数、第一亮度、目标亮度以及第一曝光时间,计算得到第二曝光时间;
其中,第一函数为:以图像亮度和曝光时间为参变量的函数公式;
S305:基于第一增益值、第二曝光时间和第一光圈值,配置图像采集设备,使得图像采集设备后续采集到的图像的亮度达到目标亮度;
S306:若第一亮度大于目标亮度,基于第二函数、第一亮度、目标亮度以及第一增益值,计算得到第二增益值;
其中,第二函数为:以图像亮度和增益值为参变量的函数公式;
S307:若检测到第二增益值落入预设增益值区间内,则基于第二增益值、第一曝光时间和第一光圈值,配置图像采集设备,使得图像采集设备后续采集到的图像的亮度达到目标亮度。
其中,该S301与图2中所示的S201相同,该S302与图2中所示的S202相同,该S303与图2中所示的S203相同,该S304与图2中所示的S204相同,该S305与图2中所示的S205相同。
本实现方式中,若确定第一亮度大于目标亮度,则可以确定需要使得图像采集设备后续采集的图像的亮度降低,以达到目标亮度。而为了使得图像采集设备后续采集的图像的亮度降低,则需要调小图像采集设备的快门的曝光时间和/或增益的增益值和/或光圈的光圈值。也就是说,为了使图像采集设备后续采集的图像的亮度降低,可以调小图像采集设备的快门的曝光时间、增益的增益值及光圈的光圈值中的至少一个。
考虑到图像采集设备的增益的增益值越大,该图像采集设备所采集的图像中的噪点越多,本申请实施例,在确定出第一亮度大于目标亮度的情况下,确定首先调小图像采集设备的增益的增益值。并且考虑到需要降低调整次数,即实现可以通过一次调整,则可以调整到可以采集得到亮度达到目标亮度的增益值,也就是说,通过一次调整曝光参数,便可以使图像采集设备后续采集的图像的亮度达到目标亮度。
所以可以基于以图像亮度和增益值为参变量的函数公式即第二函数、第一亮度、目标亮度以及第一增益值,计算得到第二增益值。
一种情况,可以基于该第二增益值、第一曝光时间以及第一光圈值,配置图像采集设备,使得图像采集设备后续采集的图像的亮度达到目标亮度。另一种情况,由于图像采集设备的硬件和/或软件配置的限制,每一图像采集设备会存在一个其所能支持的增益值的范围,即预设增益值区间。为了更好 的实现对图像采集设备的曝光过程的控制,本申请实施例,在计算得到第二增益值之后,可以先检测该第二增益值是否落入预设增益值区间内,即检测该第二增益值是否不大于预设增益值区间的上限值,且不小于预设增益值区间的下限值。
若检测到第二增益值落入预设增益值区间内,则基于第二增益值、第一曝光时间和第一光圈值,配置图像采集设备,使得图像采集设备后续采集到的图像的亮度达到目标亮度。以实现无需通过较小的步长多次调整增益值,即无需通过多次调整增益值,才能使得图像采集设备后续采集的图像的亮度达到目标亮度的目的。
一种情况,上述第二函数为:预先确定出的、以图像亮度和增益值为参变量的函数公式。本申请实施例中,为了得到上述第二函数,工作人员可以预先将图像采集设备的光圈的光圈值和快门的曝光时间固定,改变图像采集设备的增益值,获取图像采集设备在不同增益值下的图像,进而记录增益值以及该增益值对应的图像的亮度。
其中,可以采集多组固定的光圈值和曝光时间下的增益值以及该增益值对应的图像的亮度;后续的,工作人员可以利用每一组固定的光圈值和曝光时间下所记录的增益值以及该增益值对应的图像的亮度,确定出以图像亮度和增益值为参变量的函数公式,以得到第二函数。
在一种实现方式中,所述基于第二函数、第一亮度、目标亮度以及第一增益值,计算得到第二增益值的步骤中,所采用公式可以为:
Figure PCTCN2020081809-appb-000008
Figure PCTCN2020081809-appb-000009
其中,该TarY表示目标亮度,该CurY0表示第一亮度,该CurAgc0表示第一增益值,该TarAgc1表示第二增益值。
通过上述公式,可以确定出可以使得图像采集设备所采集的图像的亮度达到目标亮度的增益值。
在一种实现方式中,如图4所示,本申请实施例所提供的曝光控制方法,可以包括如下步骤:
S401:获取图像采集设备采集的图像,以及图像采集设备采集图像时的 第一曝光时间、第一光圈值和第一增益值;
S402:计算图像的亮度,记为第一亮度;
S403:比较第一亮度和目标亮度的大小;
S404:若第一亮度小于目标亮度,基于第一函数、第一亮度、目标亮度以及第一曝光时间,计算得到第二曝光时间;
其中,第一函数为:以图像亮度和曝光时间为参变量的函数公式;
S405:基于第一增益值、第二曝光时间和第一光圈值,配置图像采集设备,使得图像采集设备后续采集到的图像的亮度达到目标亮度;
S406:若第一亮度大于目标亮度,基于第二函数、第一亮度、目标亮度以及第一增益值,计算得到第二增益值;
其中,第二函数为:以图像亮度和增益值为参变量的函数公式;
S407:若检测到第二增益值落入预设增益值区间内,则基于第二增益值、第一曝光时间和第一光圈值,配置图像采集设备,使得图像采集设备后续采集到的图像的亮度达到目标亮度;
S408:若检测到第二增益值未落入预设增益值区间内,则基于第二函数、预设增益值区间的下限值、第一增益值以及第一亮度,计算得到第二亮度;
S409:基于第一函数、第二亮度、第一曝光时间和目标亮度,计算得到第三曝光时间;
S410:若检测到第三曝光时间落入预设曝光时间区间内,基于预设增益值区间的下限值、第三曝光时间和第一光圈值,配置图像采集设备,使得图像采集设备后续采集到的图像的亮度达到目标亮度。
其中,该S401与图3所示的S301相同,该S402与图3所示的S302相同,该S403与图3所示的S303相同,该S404与图3所示的S304相同,该S405与图3所示的S305相同,该S406与图3所示的S306相同,该S407与图3所示的S307相同。
本实现方式中,在确定当前亮度大于目标亮度的情况下,若检测到第二增益值未落入预设增益值区间内,即检测到第二增益值小于预设增益值区间的下限值,则可以确定仅通过调整图像采集设备的增益的增益值,无法使得图像采集设备后续采集的图像的亮度达到目标亮度。
针对上述情况,可以继续调整图像采集设备的快门的曝光时间,以使得图像采集设备基于调整后的增益值、调整后的曝光时间以及第一光圈值,配置图像采集设备,以使图像采集设备后续采集得到的图像的亮度达到目标亮度。也就是说,图像采集设备基于调整后的增益值、调整后的曝光时间以及第一光圈值所采集得到的图像的亮度可以达到目标亮度。
在一种情况中,上述继续调整快门的曝光时间的过程,可以是:首先基于第二函数、预设增益值区间的下限值、第一增益值以及当前亮度,计算得到第二亮度,即确定出在不修改图像采集设备的光圈的光圈值以及快门的曝光时间时,将图像采集设备的增益的增益值调整到预设增益值区间的下限值时,图像采集设备所采集到的图像能够达到的亮度。进而,为了更好的实现对曝光参数的调整,实现对曝光过程的控制,可以基于第一函数、第二亮度、目标亮度以及第一曝光时间,计算得到第三曝光时间。
理论上,基于预设增益值区间的下限值、第三曝光时间以及第一光圈值,可以使得图像采集设备采集得到亮度能够达到目标亮度的图像。而在一种情况中,由于图像采集设备的硬件和/或软件的具体配置的不同,每一图像采集设备存在其所能支持的快门的曝光时间的范围以及增益的增益值的范围。本申请实施例中,为了更好的实现对曝光过程的控制,在确定出上述第三曝光时间之后,可以继续检测该第三曝光时间是否落入预设曝光时间区间内。
若检测到第三曝光时间落入预设曝光时间区间内,基于预设增益值区间的下限值、第三曝光时间以及第一光圈值,配置图像采集设备,使得图像采集设备后续采集到的图像的亮度达到目标亮度。以实现无需通过较小的步长多次调整曝光时间和增益值,即无需通过多次调整曝光时间和增益值,才能使得图像采集设备后续采集的图像的亮度达到目标亮度的目的。仅通过一次调整,即可使得图像采集设备后续采集的图像的亮度达到目标亮度。
在一种实现方式中,图像采集设备对应一实际所能支持的目标曝光时间区间以及目标增益区间,预设曝光时间区间为:该目标曝光时间区间的子集,预设增益值区间为:该目标增益区间的子集。例如:图像采集设备对应的实际所能支持的目标曝光时间区间被预先分为三份,分别为[a1,a2),[a2,a3)以及[a3,a4],其中,a1<a2<a3<a4。图像采集设备对应的实际所能支持的目 标增益区间被预先分为三份,分别为[b1,b2),[b2,b3)以及[b3,b4],其中,b1<b2<b3<b4。
当[a2,a3)为该预设曝光时间区间,该[b2,b3)为预设增益值区间,若检测到第二增益值未落入预设增益值区间[b2,b3)内,即检测到第二增益值小于b2,则可以继续检测第三曝光时间是否落入预设曝光时间区间[a2,a3)内,若检测到第三曝光时间落入预设曝光时间区间[a2,a3)内,则直接基于预设增益值区间的下限值、第三曝光时间和第一光圈值,配置图像采集设备,使得图像采集设备后续采集到的图像的亮度达到目标亮度。
若检测到第三曝光时间未落入预设曝光时间区间[a2,a3)内,可以继续检测第二增益值是否落入[b1,b2),若检测到第二增益值落入[b1,b2),则基于第二增益值、第一曝光时间以及第一光圈值,配置图像采集设备,使得图像采集设备后续采集得到的图像的亮度达到目标亮度。
若检测到第二增益值未落入[b1,b2)内,此时第二增益值小于b1,电子设备可以继续基于第二函数、b1、第一增益值以及第一亮度,确定第四亮度,进而基于第一函数、第四亮度、第一曝光时间以及目标亮度,确定第四曝光时间,若检测到第四曝光时间落入[a1,a2)内,则基于b1、第四曝光时间以及第一光圈值,配置图像采集设备,使得图像采集设备后续采集的图像的亮度达到目标亮度。
在确定第四曝光时间未落入[a1,a2)内的情况下,由于图像采集设备不能再支持小于a1的曝光时间,此时可以直接确定图像采集设备后续所采集的图像的亮度无法达到目标亮度。
在另一种实现方式中,在确定第三曝光时间未落入预设曝光时间区间内的情况下,可以直接确定图像采集设备后续采集的图像的亮度无法达到目标亮度。
在一种情况中,基于第二函数、预设增益值区间的下限值、第一增益值以及第一亮度,计算得到第二亮度的过程,所采用公式可以表示为:
Figure PCTCN2020081809-appb-000010
其中,CurY2表示第二亮度,MinAgc表示预设增益值区间的下限值;CurY0表示第一亮度,CurAgc0表示第一增益值。
相应的,该基于第一函数、第二亮度、第一曝光时间和目标亮度,计算得到第三曝光时间的过程,所采用公式可以表示为:
Figure PCTCN2020081809-appb-000011
其中,该TarY表示目标亮度,该CurY2表示第二亮度,该CurShut0表示第一曝光时间,该TarShut2表示第三曝光时间。
结合上述得到第二亮度的公式,所得到第三曝光时间,可以表示为:
Figure PCTCN2020081809-appb-000012
在一种实现方式中,如图5所示,上述S104可以包括如下步骤:
S501:检测第二曝光时间是否落入预设曝光时间区间内;
S502:若检测到第二曝光时间落入预设曝光时间区间内,基于第一增益值、第二曝光时间和第一光圈值,配置图像采集设备。
在一种情况中,由于不同图像采集设备的性能不同,其所支持的快门的曝光时间存在差异。本申请实施例,为了更好的实现对曝光过程的控制,确定出第二曝光时间之后,可以继续确定第二曝光时间是否落入预设曝光时间区间内,若确定第二曝光时间落入预设曝光时间区间内,则可以说明该图像采集设备支持该第二曝光时间,仅通过重新配置图像采集设备的快门的曝光时间,并保持图像采集设备的增益的增益值以及光圈的光圈值不变,即仅调整图像采集设备的快门的曝光时间,可实现使得图像采集设备后续采集的图像的亮度可以直接达到目标亮度的目的,即可以确定该第二曝光时间为:可以使得图像采集设备后续采集到的图像的亮度直接达到目标亮度的曝光时间。
基于上述情况,电子设备可以基于第二曝光时间、第一增益值以及第一光圈值,配置图像采集设备,使得图像采集设备后续采集到的图像的亮度达到目标亮度。以实现一次性计算得到可以使得图像采集设备采集得到亮度达到目标亮度的图像的第二曝光时间,无需通过较小的步长多次调整曝光时间,即无需通过多次调整曝光时间,才能使得图像采集设备后续采集的图像的亮度达到目标亮度。
在另一种实现方式中,上述S104还可以包括如下步骤:
S503:若检测到第二曝光时间未落入预设曝光时间区间内,基于第一函数、预设曝光时间区间的上限值、第一曝光时间以及第一亮度,计算得到第 三亮度;
S504:基于第二函数、第三亮度、第一增益值以及目标亮度,计算得到第三增益值,其中,第二函数为:以图像亮度和增益值为参变量的函数公式;
S505:若检测到第三增益值落入预设增益值区间内,则基于预设曝光时间区间的上限值、第三增益值以及第一光圈值,配置图像采集设备。
本实现方式中,若检测到第二曝光时间未落入预设曝光时间区间内,则可以确定仅通过调整图像采集设备的快门的曝光时间,无法使得图像采集设备后续采集的图像的亮度达到目标亮度。此时,可以继续调整图像采集设备的增益的增益值,以使得图像采集设备基于调整后的增益值、调整后的曝光时间以及第一光圈值,采集得到亮度可以达到目标亮度的图像。
在一种情况中,上述继续调整增益的增益值的过程,可以是:首先基于第一函数、预设曝光时间区间的上限值、第一曝光时间以及第一亮度,确定第三亮度。进而,为了更好的实现对曝光参数的调整,实现对曝光过程的控制,可以基于第二函数、第三亮度、第一增益值以及目标亮度,计算得到第三增益值。
理论上,基于该第三增益值、该预设曝光时间区间的上限值以及第一光圈值,配置图像采集设备,可以使得图像采集设备采集得到亮度达到目标亮度的图像。而在一种情况中,由于图像采集设备的硬件和/或软件的具体配置的不同,每一图像采集设备存在其所能支持的快门的曝光时间的范围。
本申请实施例中,为了更好的实现对曝光过程的控制,在确定出上述第三增益值之后,可以继续检测该第三增益值是否落入预设增益值区间内,若检测第三增益值落入预设增益值区间内,基于预设曝光时间区间的上限值、第三增益值以及第一光圈值,配置所述图像采集设备。以实现无需通过较小的步长多次调整曝光时间和增益值,即无需通过多次调整曝光时间和增益值,才能使得图像采集设备后续采集的图像的亮度达到目标亮度的目的。
其中,为了在一定程度上保证图像采集设备所采集图像的质量,在电子设备确定所采集的图像的第一亮度小于目标亮度时,可以先调整曝光时间,再调整增益值。
在一种实现方式中,图像采集设备对应一实际所能支持的目标曝光时间 区间以及目标增益区间,该预设曝光时间区间为:该目标曝光时间区间的子集,预设增益值区间为:该目标增益区间的子集。例如:图像采集设备对应的实际所能支持的目标曝光时间区间被预先分为三份,分别为[a1,a2),[a2,a3)以及[a3,a4],其中,a1<a2<a3<a4。图像采集设备对应的实际所能支持的目标增益区间被预先分为三份,分别为[b1,b2),[b2,b3)以及[b3,b4],其中,b1<b2<b3<b4。
当[a2,a3)为该预设曝光时间区间,该[b2,b3)为预设增益值区间,若检测到第三增益值未落入预设增益值区间[b2,b3)内,可以继续检测第二曝光时间是否落入[a3,a4],若检测到第二曝光时间落入[a3,a4]内,则基于第一增益值、第二曝光时间以及第一光圈值,配置图像采集设备,使得图像采集设备后续采集得到的图像的亮度达到目标亮度。
若检测到第二曝光时间未落入[a3,a4]内,此时第二曝光时间大于a4,电子设备可以继续基于第一函数、a4、第一增益值以及第一亮度,确定第五亮度;进而基于第二函数、第五亮度、第一增益值以及目标亮度,确定第四增益值。
若检测到第四增益值落入[b3,b4]内,基于第四增益值、a4以及第一光圈值,配置图像采集设备,使得图像采集设备后续采集的图像的亮度达到目标亮度。
若检测到第四增益值未落入[b3,b4]内,由于图像采集设备不能再支持大于b4的增益值,此时可以直接确定图像采集设备后续所采集的图像的亮度无法达到目标亮度。
在另一种实现方式中,在确定第三增益值未落入预设增益范围内的情况下,可以直接确定图像采集设备后续所采集的图像的亮度无法达到目标亮度。
一种情况,该基于第一函数、预设曝光时间区间的上限值、第一曝光时间以及第一亮度,计算得到第三亮度的过程,所采用的公式可以表示为:
Figure PCTCN2020081809-appb-000013
其中,该CurY3表示第三亮度,该CurY0表示第一亮度,该CurShut0表示第一曝光时间,MaxShut表示预设曝光时间区间的上限值。
相应的,该基于第二函数、第三亮度、第一增益值以及目标亮度,计算 得到第三增益值的过程,所采用的公式可以表示为:
Figure PCTCN2020081809-appb-000014
其中,TarAgc2表示第三增益值,该CurAgc0表示第一增益值,该TarY表示目标亮度,该CurY3表示第三亮度;
结合上述得到第三亮度的公式,所得到第三增益值可以表示为:
Figure PCTCN2020081809-appb-000015
在一种实现方式中,在所述获取图像采集设备采集的图像,以及图像采集设备采集图像时的第一曝光时间、第一光圈值和第一增益值的步骤之前,所述方法还可以包括:
修改图像采集设备的光圈值的过程,其中,所述过程可以包括:
第一种方式:
获得用户触发的光圈值修改指令,其中,光圈值修改指令携带所需修改到的第一光圈值;
将图像采集设备的光圈值修改为第一光圈值;
第二种方式:
当检测到图像采集设备的倍率被修改时,确定修改后的倍率,作为当前倍率;
基于预设的对应关系以及当前倍率,确定所需修改到的第一光圈值,其中,预设的对应关系包括:倍率与光圈值之间的对应关系;
将图像采集设备的光圈值修改为第一光圈值。
在本实现方式中,在获取到图像之前,用户还可以根据实际需求调整图像采集设备的光圈的光圈值,或者,电子设备可以根据图像采集设备所处环境的具体情况,调整图像采集设备的光圈的光圈值。
其中,可以存在两种修改图像采集设备的光圈的光圈值的方式,一种为:用户直接修改光圈值,在该种修改方式下,电子设备可以获得用户触发的携带目标光圈值的光圈值修改指令,其中,光圈值修改指令携带第一光圈值, 该第一光圈值即为图像采集设备的光圈的光圈值对应的所需修改到的光圈值。进而,电子设备可以将图像采集设备的光圈的光圈值修改为第一光圈值。
另一种为:通过修改图像采集设备的倍率,修改光圈值。电子设备本地或所连接的存储设备中可以预先存储有倍率与光圈值的对应关系。当电子设备检测到图像采集设备的倍率被修改时,确定修改后的倍率,作为当前倍率。进而,查找上述对应关系,从对应关系中查找到与该当前倍率对应的光圈值,作为目标光圈值,将图像采集设备的当前光圈值修改为该目标光圈值,该目标光圈值即为第一光圈值。
在基于上述对应关系以及当前倍率,确定目标光圈值时,可以确定出使得所采集图像的效果相对较好的光圈值,该光圈值可以使得图像采集设备在该当前倍率下有相对最好的景深,同时清晰度高,所采集的图像的噪声较小。
图像采集设备的光圈的光圈值的影响因素较多,可以结合电子设备针对该图像采集设备所采集图像设置的降噪参数、图像采集设备自身的镜头特性、传感器Sensor特性以及图像采集设备所处环境进行设置。
在一种情况中,该预设的对应关系可以通过表格的方式展现,也可以以曲线的方式展现,其中,该曲线所对应的横轴可以表征倍率,该曲线所对应的纵轴可以表征光圈值。
相应于上述方法实施例,本申请实施例还提供了一种电子设备,如图6所示,包括处理器610、通信接口620、存储器630和通信总线640,其中,处理器610,通信接口620,存储器630通过通信总线640完成相互间的通信,
存储器630,用于存放计算机程序;
处理器610,用于执行存储器630上所存放的计算机程序时,实现本申请实施例所提供的上述任一所述的曝光控制方法步骤。
本申请实施例中,基于以图像亮度和曝光时间为参变量的第一函数、第一亮度、预设的目标亮度以及第一曝光时间,可以一次性计算得到第二曝光时间,进而基于第二曝光时间、第一增益值以及第一光圈值,配置图像采集设备,使得该图像采集设备后续采集到的图像的亮度达到目标亮度,可以通过以图像亮度和曝光时间为参变量的第一函数,实现一次配置图像采集设备, 即配置图像采集设备曝光参数的参数值,即使得重新配置后的图像采集设备所采集的图像的亮度,直接达到目标亮度,实现降低图像采集设备的配置的次数,即降低图像采集设备的曝光参数的参数值的配置次数,缩短曝光调整时间。
并且,本申请实施例,直接通过第一预函数,即预先确定的以图像亮度和曝光时间为参变量的函数公式,确定出能够使得图像采集设备所采集的图像的亮度达到目标亮度的曝光时间、增益值以及光圈值,实现一次调整,即可使得图像采集设备后续所采集的图像的亮度达到目标亮度。在一定程度上可以减少曝光参数调整过程中图像的亮度震荡的情况。
上述电子设备提到的通信总线可以是外设部件互连标准(Peripheral Component Interconnect,PCI)总线或扩展工业标准结构(Extended Industry Standard Architecture,EISA)总线等。该通信总线可以分为地址总线、数据总线、控制总线等。为便于表示,图中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
通信接口用于上述电子设备与其他设备之间的通信。
存储器可以包括随机存取存储器(Random Access Memory,RAM),也可以包括非易失性存储器(Non-Volatile Memory,NVM),例如至少一个磁盘存储器。可选的,存储器还可以是至少一个位于远离前述处理器的存储装置。
上述的处理器可以是通用处理器,包括中央处理器(Central Processing Unit,CPU)、网络处理器(Network Processor,NP)等;还可以是数字信号处理器(Digital Signal Processing,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系 列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
本说明书中的各个实施例均采用相关的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于系统实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
以上所述仅为本申请的较佳实施例而已,并非用于限定本申请的保护范围。凡在本申请的精神和原则之内所作的任何修改、等同替换、改进等,均包含在本申请的保护范围内。

Claims (14)

  1. 一种曝光控制方法,包括:
    获取图像采集设备采集的图像,以及所述图像采集设备采集所述图像时的第一曝光时间、第一光圈值和第一增益值;
    计算所述图像的亮度,记为第一亮度;
    在所述第一亮度小于预设的目标亮度时,基于第一函数、所述第一亮度、所述目标亮度以及所述第一曝光时间,计算得到第二曝光时间,其中,所述第一函数为:以图像亮度和曝光时间为参变量的函数公式;
    基于所述第一增益值、所述第二曝光时间和所述第一光圈值,配置所述图像采集设备,使得所述图像采集设备后续采集到的图像的亮度达到所述目标亮度。
  2. 根据权利要求1所述的方法,其中所述第二曝光时间是:
    Figure PCTCN2020081809-appb-100001
    其中,所述TarY表示所述目标亮度,所述CurY0表示所述第一亮度,所述CurShut0表示所述第一曝光时间,所述TarShut1表示所述第二曝光时间。
  3. 根据权利要求1所述的方法,还包括:
    在检测到所述第二曝光时间落入预设曝光时间区间内时,基于所述第一增益值、所述第二曝光时间和所述第一光圈值,配置所述图像采集设备;以及,
    在检测到所述第二曝光时间未落入所述预设曝光时间区间内时,基于所述第一函数、所述预设曝光时间区间的上限值、所述第一曝光时间以及所述第一亮度,计算得到第三亮度;
    基于第二函数、所述第三亮度、所述第一增益值以及所述目标亮度,计算得到第三增益值,其中,所述第二函数为:以图像亮度和增益值为参变量的函数公式;
    在检测到所述第三增益值落入所述预设增益值区间内时,则基于所述预 设曝光时间区间的上限值、所述第三增益值以及所述第一光圈值,配置所述图像采集设备。
  4. 根据权利要求3所述的方法,其中所述第三亮度是:
    Figure PCTCN2020081809-appb-100002
    其中,所述CurY3表示所述第三亮度,所述CurY0表示所述第一亮度,所述CurShut0表示所述第一曝光时间,所述MaxShut表示所述预设曝光时间区间的上限值。
  5. 根据权利要求4所述的方法,其中所述第三增益值是:
    Figure PCTCN2020081809-appb-100003
    其中,所述TarAgc2表示所述第三增益值,所述CurAgc0表示所述第一增益值,所述TarY表示所述目标亮度,所述CurY3表示所述第三亮度。
  6. 根据权利要求1所述的方法,还包括:
    在所述第一亮度大于所述目标亮度时,基于所述第二函数、所述第一亮度、所述目标亮度以及所述第一增益值,计算得到第二增益值。
  7. 根据权利要求6所述的方法,包括:
    在检测到所述第二增益值落入所述预设增益值区间内时,则基于所述第二增益值、所述第一曝光时间和所述第一光圈值,配置所述图像采集设备,使得所述图像采集设备后续采集到的图像的亮度达到所述目标亮度。
  8. 根据权利要求7所述的方法,还包括:
    在检测到所述第二增益值未落入所述预设增益值区间内时,则基于所述第二函数、所述预设增益值区间的下限值、所述第一增益值以及所述第一亮度,计算得到第二亮度;
    基于所述第一函数、所述第二亮度、所述第一曝光时间和所述目标亮度,计算得到第三曝光时间。
  9. 根据权利要求6所述的方法,其中所述第二增益值是:
    Figure PCTCN2020081809-appb-100004
    其中,所述TarY表示所述目标亮度,所述CurY0表示所述第一亮度,所述CurAgc0表示所述第一增益值,所述TarAgc1表示所述第二增益值。
  10. 根据权利要求8所述的方法,其中所述第二亮度是:
    Figure PCTCN2020081809-appb-100005
    其中,所述CurY2表示所述第二亮度,所述MinAgc表示所述预设增益值区间的下限值;所述CurY0表示所述第一亮度,所述CurAgc0表示所述第一增益值。
  11. 根据权利要求8所述的方法,其中所述第三曝光时间是:
    Figure PCTCN2020081809-appb-100006
    其中,所述TarY表示所述目标亮度,所述CurY2表示所述第二亮度,所述CurShut0表示所述第一曝光时间,所述TarShut2表示所述第三曝光时间。
  12. 根据权利要求8所述的方法,还包括:
    在检测到所述第三曝光时间落入预设曝光时间区间内,基于所述预设增益值区间的下限值、所述第三曝光时间和所述第一光圈值,配置所述图像采集设备,使得所述图像采集设备后续采集到的图像的亮度达到所述目标亮度。
  13. 根据权利要求1所述的方法,还包括:
    获得用户触发的光圈值修改指令,其中,所述光圈值修改指令携带第一光圈值;将所述图像采集设备的光圈值修改为所述第一光圈值;
    或,
    当检测到所述图像采集设备的倍率被修改时,确定修改后的倍率,作为当前倍率;基于预设的对应关系以及所述当前倍率,确定第一光圈值,其中,所述预设的对应关系包括:倍率与光圈值之间的对应关系;将所述图像采集设备的光圈值修改为所述第一光圈值。
  14. 一种电子设备,包括处理器、通信接口、存储器和通信总线,其中, 处理器,通信接口,所述存储器通过所述通信总线完成相互间的通信;
    所述存储器,用于存放计算机程序;
    所述处理器,用于执行所述存储器上所存放的计算机程序时,实现权利要求1-13任一项所述的曝光控制方法步骤。
PCT/CN2020/081809 2019-03-28 2020-03-27 一种曝光控制方法及电子设备 WO2020192774A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910244756.3 2019-03-28
CN201910244756.3A CN111757015B (zh) 2019-03-28 2019-03-28 一种曝光控制方法、装置及电子设备

Publications (1)

Publication Number Publication Date
WO2020192774A1 true WO2020192774A1 (zh) 2020-10-01

Family

ID=72611411

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/081809 WO2020192774A1 (zh) 2019-03-28 2020-03-27 一种曝光控制方法及电子设备

Country Status (2)

Country Link
CN (1) CN111757015B (zh)
WO (1) WO2020192774A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114422715A (zh) * 2022-01-17 2022-04-29 苏州中科全象智能科技有限公司 一种线激光相机的自主调节方法及设备
CN116744120A (zh) * 2022-09-15 2023-09-12 荣耀终端有限公司 图像处理方法和电子设备

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112887630A (zh) * 2021-04-06 2021-06-01 南昌欧菲光电技术有限公司 自动曝光方法及电子设备、计算机可读存储介质
CN115967861B (zh) * 2023-03-09 2023-06-16 杭州涂鸦信息技术有限公司 一种图像处理方法及装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100097492A1 (en) * 2008-10-22 2010-04-22 Samsung Electro-Mechanics Co., Ltd. Apparatus and method for controlling auto exposure
CN105242481A (zh) * 2015-10-12 2016-01-13 浙江大华技术股份有限公司 一种光圈的控制方法及装置
CN106170058A (zh) * 2016-08-30 2016-11-30 维沃移动通信有限公司 一种曝光方法及移动终端
CN106686319A (zh) * 2016-12-27 2017-05-17 浙江大华技术股份有限公司 一种图像曝光的控制方法及其装置
CN108900782A (zh) * 2018-08-22 2018-11-27 Oppo广东移动通信有限公司 曝光控制方法、装置以及电子设备

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4089911B2 (ja) * 2005-02-23 2008-05-28 三菱電機株式会社 画像入力装置
CN100458541C (zh) * 2005-07-01 2009-02-04 北京中星微电子有限公司 一种用于自动曝光调节的方法及控制系统
KR100992367B1 (ko) * 2008-12-01 2010-11-04 삼성전기주식회사 자동 노출 제어 방법
CN105450936B (zh) * 2014-05-30 2019-02-15 杭州海康威视数字技术股份有限公司 摄像机自动曝光时智能调节方法及其装置
CN108681182B (zh) * 2018-04-24 2020-08-04 浙江大华技术股份有限公司 一种光圈控制方法及终端设备
CN108668090B (zh) * 2018-07-03 2020-07-24 赛诺微医疗科技(浙江)有限公司 光学设备及其自动曝光方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100097492A1 (en) * 2008-10-22 2010-04-22 Samsung Electro-Mechanics Co., Ltd. Apparatus and method for controlling auto exposure
CN105242481A (zh) * 2015-10-12 2016-01-13 浙江大华技术股份有限公司 一种光圈的控制方法及装置
CN106170058A (zh) * 2016-08-30 2016-11-30 维沃移动通信有限公司 一种曝光方法及移动终端
CN106686319A (zh) * 2016-12-27 2017-05-17 浙江大华技术股份有限公司 一种图像曝光的控制方法及其装置
CN108900782A (zh) * 2018-08-22 2018-11-27 Oppo广东移动通信有限公司 曝光控制方法、装置以及电子设备

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114422715A (zh) * 2022-01-17 2022-04-29 苏州中科全象智能科技有限公司 一种线激光相机的自主调节方法及设备
CN116744120A (zh) * 2022-09-15 2023-09-12 荣耀终端有限公司 图像处理方法和电子设备
CN116744120B (zh) * 2022-09-15 2024-04-12 荣耀终端有限公司 图像处理方法和电子设备

Also Published As

Publication number Publication date
CN111757015B (zh) 2021-12-03
CN111757015A (zh) 2020-10-09

Similar Documents

Publication Publication Date Title
WO2020192774A1 (zh) 一种曝光控制方法及电子设备
US11089207B2 (en) Imaging processing method and apparatus for camera module in night scene, electronic device and storage medium
WO2019109801A1 (zh) 拍摄参数的调整方法、装置、存储介质及移动终端
US10785403B2 (en) Modifying image parameters using wearable device input
CN105100637A (zh) 一种图像处理方法及电子设备
CN111641778A (zh) 一种拍摄方法、装置与设备
WO2019037088A1 (zh) 一种曝光的控制方法、装置以及无人机
CN108833784B (zh) 一种自适应构图方法、移动终端及计算机可读存储介质
JP7429363B2 (ja) 画像検出方法、装置、システム、デバイス及び記憶媒体
US11297230B2 (en) Shooting method, device and computer-readable storage medium
CN112017137B (zh) 图像处理方法、装置、电子设备及计算机可读存储介质
US10013763B1 (en) Increasing field of view using multiple devices
US10321049B2 (en) Photographing control methods, photographing control apparatuses, and photographing devices
EP3958169A1 (en) Facial image processing method and apparatus, computer device, and medium
TWI684165B (zh) 影像處理方法與電子裝置
WO2019120018A1 (zh) 照片的处理方法、装置、存储介质及电子设备
CN112087569B (zh) 一种摄像机及摄像机启动方法、装置
CN110689565B (zh) 一种深度图确定的方法、装置及电子设备
CN110689496B (zh) 降噪模型的确定方法、装置、电子设备和计算机存储介质
CN110650288B (zh) 对焦控制方法和装置、电子设备、计算机可读存储介质
US10880478B2 (en) Camera, system and method of selecting camera settings
CN111405185A (zh) 一种摄像机变倍控制方法、装置、电子设备及存储介质
US20170026584A1 (en) Image processing apparatus and method of operating the same
CN104994288A (zh) 一种拍照方法及用户终端
WO2018214900A1 (zh) 存储装置、移动终端及其图像处理方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20779597

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20779597

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 22-05-2023)

122 Ep: pct application non-entry in european phase

Ref document number: 20779597

Country of ref document: EP

Kind code of ref document: A1