WO2023273962A1 - Automatic exposure method, automatic exposure apparatus, camera and computer-readable storage medium - Google Patents

Automatic exposure method, automatic exposure apparatus, camera and computer-readable storage medium Download PDF

Info

Publication number
WO2023273962A1
WO2023273962A1 PCT/CN2022/100183 CN2022100183W WO2023273962A1 WO 2023273962 A1 WO2023273962 A1 WO 2023273962A1 CN 2022100183 W CN2022100183 W CN 2022100183W WO 2023273962 A1 WO2023273962 A1 WO 2023273962A1
Authority
WO
WIPO (PCT)
Prior art keywords
exposure
current
target
brightness
eva
Prior art date
Application number
PCT/CN2022/100183
Other languages
French (fr)
Chinese (zh)
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 WO2023273962A1 publication Critical patent/WO2023273962A1/en

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/50Constructional details
    • H04N23/54Mounting of pick-up tubes, electronic image sensors, deviation or focusing coils
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/50Constructional details
    • H04N23/55Optical parts specially adapted for electronic image sensors; Mounting thereof
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N25/00Circuitry of solid-state image sensors [SSIS]; Control thereof
    • H04N25/60Noise processing, e.g. detecting, correcting, reducing or removing noise

Definitions

  • the present application relates to the technical field of image processing, in particular to an automatic exposure method, an exposure device, a camera, and a computer-readable storage medium.
  • the purpose of automatic exposure is to realize the recognition of brightness levels in different lighting conditions and different scenes, and adjust the exposure parameters in real time, so that the captured video or image appears to be of appropriate brightness to the human eye.
  • adjust the lens iris aperture, sensor exposure time, sensor analog gain and digital gain This adjustment process is called Auto Exposure.
  • the shutter time is often set longer to increase the brightness of the picture and reduce noise.
  • an excessively long shutter time will cause Severe motion blur, smearing, etc.
  • the Chinese Patent Publication No. CN110290316A discloses a method for adjusting the upper limit of the shutter of the camera, by receiving gyroscope data or judging the movement of the feature points of the stationary objects in multiple frames of adjacent images.
  • Motion status adjust the camera's shutter upper limit in real time according to the camera's motion status.
  • the above-mentioned solution can only distinguish the two states of stillness and motion, but cannot distinguish the specific type of motion.
  • the shutter and ISO of the camera are adjusted in the same way, resulting in some motion scenes.
  • the shooting picture is not ideal.
  • the purpose of the present invention is to provide an automatic exposure method, an exposure device, a camera and a computer-readable storage medium, aiming to solve at least some of the defects of the existing automatic exposure method.
  • a preferred embodiment of the present invention provides an automatic exposure method, the method comprising: S1: Obtain the current frame image data captured by the shooting device according to the current exposure parameters and calculate the brightness Ya of the current frame; S2: According to The brightness Ya of the current frame, the current exposure EVa and the target brightness Yb calculate the target exposure EVb; S3: select the corresponding exposure parameter table according to the motion state of the shooting device; S4: determine the target according to the target exposure EVb and the selected exposure parameter table Exposure parameter; S5: Update the exposure parameter of the shooting device to the target exposure parameter and return to step S1; wherein, the current exposure EVa is obtained by calculating the current exposure parameter of the shooting device, and the target brightness Yb is calculated from the current exposure EVa Exposure index Na Then combined with the brightness lookup table to obtain.
  • the step S1 includes the following sub-steps: S101: Acquire the current frame image data captured by the shooting device according to the current exposure parameters; S102: Divide the current frame image data into multiple blocks and perform Set the weight value; S103: Calculate the brightness of the current frame according to the average brightness value of each block and the corresponding weight value.
  • the step S2 includes the following sub-steps: S201: judge whether the brightness Ya of the current frame and the target brightness Yb are within the error range, if yes, return to step S1, otherwise, enter step S202; S202: Calculate the target exposure EVb according to the current exposure EVa, the target brightness Yb, and the brightness Ya of the current frame.
  • the step S3 includes the following sub-steps: S301: Obtain the difference Df between the angles read twice by the gyroscope; S302: If the values of the consecutive N Df are equal to If it is between the set thresholds Dt i to Dt i+1 , the photographing device is determined to be in the i-th motion state; S303: Select the i-th exposure parameter table corresponding to the i-th motion state.
  • the step S4 includes the following sub-steps: S401: Calculate the exposure index Nb according to the target exposure EVb; S402: Determine the target exposure parameter according to the exposure index and the corresponding data in the exposure parameter table; wherein , the exposure parameter table takes the exposure index as a coordinate, and includes an exposure index value and a corresponding exposure parameter value, and the exposure parameter includes an aperture value, a shutter value, and a gain value.
  • the step S402 specifically includes: according to the exposure index Nb, find the two indexes closest to the exposure index Nb and the corresponding two sets of exposure parameters in the exposure parameter table, and calculate the target exposure parameters by interpolation.
  • an automatic exposure device is also provided in an embodiment of the present invention.
  • the device includes: an acquisition module, which acquires a frame of image data captured by the shooting device according to the current exposure parameters and calculates the brightness Ya of the current frame; A module for calculating the target exposure EVb according to the current exposure EVa, the brightness Ya of the current frame and the target brightness Yb; a selection module for selecting the corresponding exposure parameter table according to the motion state of the shooting device; a determination module for selecting the corresponding exposure parameter table according to the target The exposure value EVb and the selected exposure parameter table determine the target exposure parameters; the update module is used to update the exposure parameters of the shooting device to the exposure parameters of the next frame; wherein, the current exposure value EVa is obtained by calculating the current exposure parameters of the shooting device, The target brightness Yb is obtained by combining the brightness lookup table after calculating the exposure index Na from the current exposure EVa.
  • an embodiment of the present invention also provides a camera, the camera includes a processor and a memory, and a computer program is stored in the memory, and the computer program is used to realize any of the above-mentioned functions when the processor executes it. Auto Exposure method described in section .
  • an embodiment of the present invention also provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, any one of the above-mentioned Auto Exposure method described above.
  • the technical solution of the present invention updates the exposure parameters of the photographing device in real time by combining the target exposure amount and the motion state of the photographing device, which improves the motion blur of the picture caused by the photographing device in a moving state and the blurred image in a static state. Shooting results in severe picture noise.
  • FIG. 1 is a flowchart of an automatic exposure method in Embodiment 1 of the present invention.
  • FIG. 2 is a flow chart of sub-steps of step S1 in Embodiment 1 of the present invention.
  • FIG. 3 is a flow chart of sub-steps of step S2 in Embodiment 1 of the present invention.
  • FIG. 4 is a flow chart of sub-steps of step S3 in Embodiment 1 of the present invention.
  • FIG. 5 is a flow chart of sub-steps of step S4 in Embodiment 1 of the present invention.
  • FIG. 6 is a brightness lookup table Y_LUT in Embodiment 1 of the present invention.
  • FIG. 7 is a table of static state exposure parameters in Embodiment 1 of the present invention.
  • FIG. 8 is a table of exposure parameters in a walking state in Embodiment 1 of the present invention.
  • FIG. 9 is a table of exposure parameters in a running state in Embodiment 1 of the present invention.
  • Fig. 10 is a block diagram of an automatic exposure device in Embodiment 2 of the present invention.
  • Fig. 11 is a block diagram of a camera in Embodiment 3 of the present invention.
  • FIG. 1 it is a flow chart of the automatic exposure method in this embodiment, including the following steps.
  • the photographing device may be an electronic device with a photographing function such as a sports camera, a mobile phone, and a video camera. After the image data of the current frame is acquired, the luminance values of each pixel in the current frame can be counted, and then the average value of the luminance values of each pixel can be used as the luminance Ya of the current frame.
  • a photographing function such as a sports camera, a mobile phone, and a video camera.
  • step S1 includes the following sub-steps.
  • S101 Acquire current frame image data captured by a photographing device according to current exposure parameters.
  • the current frame image data is the video frame image data shot according to the current exposure parameters (shutter SHTa, gain AGCa and aperture APTa) of the shooting device.
  • the current exposure parameter of the shooting device is a preset value, which is related to the shooting scene of the shooting device. Therefore, the preset exposure parameters make the exposure of the sports camera relatively small.
  • the image of the current frame can be divided into n image blocks of the same size, and different weights ⁇ i can be set according to the position of each image block in the image. Since the focus of the user is generally at In the center of the screen or close to the ground side, you can set a higher weight value for the image blocks located in the center and below the image.
  • the image of the current frame can also be divided into multiple blocks according to the shooting content of the image, for example, the object in the image of the current frame is recognized by AI (artificial intelligence algorithm), and then the Blocks set higher weight values.
  • AI artificial intelligence algorithm
  • S103 Calculate the brightness of the current frame according to the average brightness value of each block and the corresponding weight value.
  • each block since the size of each block is the same, so the number of pixels contained is the same, so the brightness values of each pixel in each block can be counted first, and then the average brightness value Li of each block can be obtained, and then Multiplied by the corresponding weight value ⁇ i of each block, the brightness Ya of the current frame can be obtained, and the calculation formula is as follows: in,
  • step S2 includes sub-steps S201 and S202.
  • step S201 Determine whether the luminance Ya of the current frame and the target luminance Yb are within the error range, if yes, return to step S1, otherwise, enter step S202.
  • the brightness lookup table Y_LUT is a lookup table with the exposure index as the coordinate, including the exposure index value and the corresponding target brightness value, wherein the target brightness is the brightness of the captured image expected by the photographer, that is, the brightness observed by the human eye,
  • the target brightness in the brightness lookup table Y_LUT is an empirical value, which is related to the shooting scene of the shooting device. For example, the target brightness value will be larger in outdoor scenes, and the target brightness value will be smaller in night scenes.
  • a brightness lookup table Y_LUT in this example As shown in Figure 6.
  • the target brightness Yb After the target brightness Yb is obtained, it is compared with the brightness Ya of the current frame to judge whether the two values are within the error range (for example, by calculating the ratio or difference range). If the brightness Ya of the current frame and the target brightness Yb are within the error range, it is not necessary to adjust the exposure parameters of the shooting device, and then return to step S1; if the brightness Ya of the current frame and the target brightness Yb are outside the error range, then enter step S1. S202.
  • S202 Calculate the target exposure EVb according to the current exposure EVa, the target brightness Yb, and the brightness Ya of the current frame.
  • the motion state of the shooting device can be judged by reading the gyroscope data on the shooting device. In some other schemes, the shooting device can also be judged by comparing the displacement between feature points between adjacent video frames. state of motion.
  • the motion state of the photographing device is set as a stationary state, a walking state, and a running state. The following uses reading gyroscope data on the photographing device to determine the motion state of the photographing device as an example for illustration.
  • the angle data of the gyroscope is read at intervals (such as 20ms), and then the angle data is subtracted from the angle data read last time, and then the absolute value of the subtracted value is taken as the difference Df.
  • the exposure parameter table EXP_LUT corresponding to the motion state is selected.
  • the exposure parameter table EXP_LUT takes the exposure index as the coordinate, including the exposure index value and the corresponding exposure parameter value, and the exposure parameter includes the aperture value, shutter value and gain value.
  • the exposure parameter tables of the three motion states in this embodiment are shown in FIGS. 7 to 9 .
  • S402 Determine a target exposure parameter according to the exposure index and the corresponding data in the exposure parameter table.
  • the exposure index Nb After calculating the exposure index Nb, find the same value as Na in the exposure parameter table EXP_LUT, and then find the corresponding brightness value; if the exposure index Nb is located between the two index coordinates Nb1 and Nb2 of the exposure parameter table EXP_LUT, then find The shutter values SHT1 and SHT2, the gain values AGC1 and AGC2, and the aperture values APT1 and APT2 corresponding to the two index coordinates Nb1 and Nb2 are then calculated by interpolation.
  • the calculation formula of the target shutter value EXP_SHT is:
  • EXP_SHT SHT1+(SHT2-SHT1)*(Nb-Nb1)/(Nb2-Nb1).
  • the calculation formula of the target gain value EXP_AGC is:
  • EXP_AGC AGC1+(AGC2-AGC1)*(Nb-Nb1)/(Nb2-Nb1).
  • the calculation formula of the target aperture value EXP_APT is:
  • EXP_APT APT1+(APT2-APT1)*(Nb-Nb1)/(Nb2-Nb1).
  • step S5 Update the exposure parameter of the photographing device to the target exposure parameter and return to step S1.
  • step S4 Set the target exposure parameters determined in step S4 on the shooting device, then return to step S1, and repeat steps S1 to S5 until the shooting device finishes shooting the entire video.
  • this embodiment discloses an automatic exposure device, which includes: an acquisition module, which acquires a frame of image data captured by the shooting device according to the current exposure parameters and calculates the brightness Ya of the current frame; a calculation module, which uses Calculate the target exposure EVb according to the current exposure EVa, the brightness Ya of the current frame and the target brightness Yb; the selection module is used to select the corresponding exposure parameter table according to the motion state of the shooting device; the determination module is used to select the corresponding exposure parameter table according to the target exposure EVb And the selected exposure parameter table determines the target exposure parameter; the update module is used to update the exposure parameter of the shooting device to the exposure parameter of the next frame; wherein, the current exposure EVa is calculated by the current exposure parameter of the shooting device, and the target brightness Yb The exposure index Na is calculated from the current exposure EVa and obtained in combination with the brightness lookup table.
  • this embodiment discloses a camera, the camera includes a processor and a memory, and a computer program is stored on the memory, and the computer program is used to realize the automatic operation in Embodiment 1 when the processor is executed. exposure method.
  • the camera in this embodiment also includes necessary components of the camera such as a lens and an ISP.
  • This embodiment discloses a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the automatic exposure method in the above embodiment 1 is implemented.
  • the storage medium can be a computer-readable storage medium, for example, a ferroelectric memory (FRAM, Ferromagnetic Random Access Memory), read-only memory (ROM, Read Only Memory), programmable read-only memory (PROM, Programmable Read Only Memory), erasable programmable read-only memory (EPROM, Erasable Programmable Read Only Memory), charged Memory such as erasable programmable read-only memory (EEPROM, Electrically Erasable Programmable Read Only Memory), flash memory, magnetic surface memory, optical disk, or optical disk read-only memory (CD-ROM, Compact Disk-Read Only Memory); it can also include Various devices of one or any combination of the above memories.
  • FRAM ferroelectric memory
  • ROM Read Only Memory
  • PROM programmable read-only memory
  • EPROM Erasable Programmable Read Only Memory
  • charged Memory such as erasable programmable read-only memory (EEPROM, Electrically Erasable Programmable Read Only Memory), flash memory, magnetic surface memory, optical disk, or optical disk read-only memory

Landscapes

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

Abstract

Disclosed in the present invention is an automatic exposure method. The automatic exposure method comprises: S1: acquiring the current image frame data that is captured by a photographic apparatus according to the current exposure parameter, and calculating a luminance Ya of the current frame; S2: calculating a target exposure amount EVb according to the luminance Ya of the current frame, the current exposure amount EVa and a target luminance Yb; S3: selecting a corresponding exposure parameter table according to the motion state of the photographic apparatus; S4: determining a target exposure parameter according to the target exposure amount EVb and the selected exposure parameter table; and S5: updating the exposure parameter of the photographic apparatus to be the target exposure parameter, and returning to step S1, wherein the current exposure amount EVa is obtained by means of calculation according to the current exposure parameter of the photographic apparatus, and the target luminance Yb is obtained by calculating an exposure index Na on the basis of the current exposure amount EVa and by then combining the exposure index NA with a luminance lookup table. By means of the present invention, the problems of motion blurs appearing in an image that is photographed by a photographic apparatus in a motion state and severe noise appearing in an image that is photographed in a stationary state are alleviated.

Description

自动曝光方法、曝光装置、相机及计算机可读存储介质Automatic exposure method, exposure device, camera, and computer-readable storage medium 技术领域technical field
本申请涉及图像处理技术领域,具体涉及一种自动曝光方法、曝光装置、相机及计算机可读存储介质。The present application relates to the technical field of image processing, in particular to an automatic exposure method, an exposure device, a camera, and a computer-readable storage medium.
背景技术Background technique
自动曝光的目的是在不同的照明条件和不同场景中实现亮度级别的识别,并实时调节曝光参数,从而使得捕获的视频或图像在人眼看来亮度合适。为了达到这个目标,要调整镜头光圈孔径,传感器曝光时间,传感器模拟增益和数字增益。该调节的过程称为自动曝光(AutoExposure)。The purpose of automatic exposure is to realize the recognition of brightness levels in different lighting conditions and different scenes, and adjust the exposure parameters in real time, so that the captured video or image appears to be of appropriate brightness to the human eye. To achieve this goal, adjust the lens iris aperture, sensor exposure time, sensor analog gain and digital gain. This adjustment process is called Auto Exposure.
现有的技术方案中,在室内或者低光的环境下,往往会把快门时间设置得比较长,用于提升画面亮度、减少噪点,但在录制运动的视频时,过长的快门时间会导致严重的运动模糊,拖尾等现象。In the existing technical solutions, in indoor or low-light environments, the shutter time is often set longer to increase the brightness of the picture and reduce noise. However, when recording a moving video, an excessively long shutter time will cause Severe motion blur, smearing, etc.
针对上述问题,中国专利公开号为CN110290316A的专利文献中揭示了一种调整相机的快门上限的方法,通过接收陀螺仪数据或根据多帧相邻图像中的静止物体的特征点移动情况判断相机的运动状态;根据相机的运动状态实时调整相机的快门上限。通过在运动时可以优先使用较短的快门和较高的ISO,保证不会因为较长的曝光时间出现画面模糊;静止时优先使用较长的快门和较低的ISO,从而减少高ISO引起的噪点提升画质。In view of the above problems, the Chinese Patent Publication No. CN110290316A discloses a method for adjusting the upper limit of the shutter of the camera, by receiving gyroscope data or judging the movement of the feature points of the stationary objects in multiple frames of adjacent images. Motion status; adjust the camera's shutter upper limit in real time according to the camera's motion status. By using a shorter shutter and a higher ISO in motion, it is guaranteed that the image will not be blurred due to a longer exposure time; in a static state, a longer shutter and a lower ISO are used in priority, thereby reducing the blur caused by a high ISO Noise improves picture quality.
技术问题technical problem
但上述方案只能区分静止和运动两种状态,而不能区分运动的具体类别,在运动激烈程度不同的情况下,均采用同一方式对相机的快门和ISO进行调节,从而导致某些运动场景下的拍摄画面不理想。However, the above-mentioned solution can only distinguish the two states of stillness and motion, but cannot distinguish the specific type of motion. In the case of different degrees of motion, the shutter and ISO of the camera are adjusted in the same way, resulting in some motion scenes. The shooting picture is not ideal.
因此,有必要对现有的自动曝光方法进行改进。Therefore, it is necessary to improve the existing automatic exposure method.
技术解决方案technical solution
本发明的目的在于提供一种自动曝光方法、曝光装置、相机及计算机可读存储介质,旨在解决现有的自动曝光方法的至少部分缺陷。The purpose of the present invention is to provide an automatic exposure method, an exposure device, a camera and a computer-readable storage medium, aiming to solve at least some of the defects of the existing automatic exposure method.
第一方面,本发明的一个优选实施例中提供了一种自动曝光方法,该方法包括:S1:获取拍摄装置按当前曝光参数拍摄的当前帧图像数据并计算当前帧的亮度Ya;S2:根据当前帧的亮度Ya、当前曝光量EVa以及目标亮度Yb计算目标曝光量EVb;S3:根据拍摄装置的运动状态选择对应的曝光参数表;S4:根据目标曝光量EVb及选择的曝光参数表确定目标曝光参数;S5:将拍摄装置的曝光参数更新为目标曝光参数并返回步骤S1;其中,当前曝光量EVa由拍摄装置当前的曝光参数计算获得,目标亮度Yb由当前曝光量EVa计算出曝光索引Na后结合亮度查找表获得。In the first aspect, a preferred embodiment of the present invention provides an automatic exposure method, the method comprising: S1: Obtain the current frame image data captured by the shooting device according to the current exposure parameters and calculate the brightness Ya of the current frame; S2: According to The brightness Ya of the current frame, the current exposure EVa and the target brightness Yb calculate the target exposure EVb; S3: select the corresponding exposure parameter table according to the motion state of the shooting device; S4: determine the target according to the target exposure EVb and the selected exposure parameter table Exposure parameter; S5: Update the exposure parameter of the shooting device to the target exposure parameter and return to step S1; wherein, the current exposure EVa is obtained by calculating the current exposure parameter of the shooting device, and the target brightness Yb is calculated from the current exposure EVa Exposure index Na Then combined with the brightness lookup table to obtain.
在本实施例的一个具体方案中,步骤S1中的当前曝光量EVa可以通过下面的公式计算得到:EVa=SHTa*AGCa/APTa^ 2,其中,SHTa、AGCa、APTa依次为拍摄装置当前的快门、增益和光圈。 In a specific scheme of this embodiment, the current exposure EVa in step S1 can be calculated by the following formula: EVa=SHTa*AGCa/APTa^ 2 , wherein, SHTa, AGCa, APTa are the current shutters of the shooting device in turn , gain and iris.
在本实施例的优化方案中,所述步骤S1包括以下子步骤:S101:获取拍摄装置按当前曝光参数拍摄的当前帧图像数据;S102:将当前帧图像数据分成多个块并对每个块设置权重值;S103:根据每个块的的平均亮度值和对应的权重值计算当前帧的亮度。In the optimization scheme of this embodiment, the step S1 includes the following sub-steps: S101: Acquire the current frame image data captured by the shooting device according to the current exposure parameters; S102: Divide the current frame image data into multiple blocks and perform Set the weight value; S103: Calculate the brightness of the current frame according to the average brightness value of each block and the corresponding weight value.
在本实施例的一个具体方案中,所述步骤S2包括以下子步骤:S201:判断当前帧的亮度Ya与目标亮度Yb是否在误差范围内,如果是则返回步骤S1,如果否则进入步骤S202;S202:根据当前曝光量EVa、目标亮度Yb和当前帧的亮度Ya计算目标曝光量EVb。In a specific solution of this embodiment, the step S2 includes the following sub-steps: S201: judge whether the brightness Ya of the current frame and the target brightness Yb are within the error range, if yes, return to step S1, otherwise, enter step S202; S202: Calculate the target exposure EVb according to the current exposure EVa, the target brightness Yb, and the brightness Ya of the current frame.
在本实施例的一个具体方案中,所述步骤S3包括以下子步骤:S301:获取陀螺仪相邻两次读取的角度之间的差值Df;S302:若连续的N个Df的值均位于设定阈值Dt i至Dt i+1之间,则将拍摄装置判定为第i运动状态;S303:选择与第i运动状态对应的第i曝光参数 表。 In a specific solution of this embodiment, the step S3 includes the following sub-steps: S301: Obtain the difference Df between the angles read twice by the gyroscope; S302: If the values of the consecutive N Df are equal to If it is between the set thresholds Dt i to Dt i+1 , the photographing device is determined to be in the i-th motion state; S303: Select the i-th exposure parameter table corresponding to the i-th motion state.
在本实施例的一个具体方案中,所述步骤S4包括以下子步骤:S401:根据目标曝光量EVb计算曝光索引Nb;S402:根据曝光索引及曝光参数表中对应的数据确定目标曝光参数;其中,所述曝光参数表以曝光索引为坐标,包括曝光索引值和对应的曝光参数值,曝光参数包括光圈值、快门值和增益值。In a specific solution of this embodiment, the step S4 includes the following sub-steps: S401: Calculate the exposure index Nb according to the target exposure EVb; S402: Determine the target exposure parameter according to the exposure index and the corresponding data in the exposure parameter table; wherein , the exposure parameter table takes the exposure index as a coordinate, and includes an exposure index value and a corresponding exposure parameter value, and the exposure parameter includes an aperture value, a shutter value, and a gain value.
进一步地,所述步骤S402具体为:根据曝光索引Nb在曝光参数表中找到与曝光索引Nb最接近的两个索引及对应的两组曝光参数,采用插值法计算目标曝光参数。Further, the step S402 specifically includes: according to the exposure index Nb, find the two indexes closest to the exposure index Nb and the corresponding two sets of exposure parameters in the exposure parameter table, and calculate the target exposure parameters by interpolation.
第二方面,本发明的一实施例中还提供了一种自动曝光装置,该装置包括包括:获取模块,获取拍摄装置按当前曝光参数拍摄的一帧图像数据并计算当前帧的亮度Ya;计算模块,用于根据当前曝光量EVa、当前帧的亮度Ya以及目标亮度Yb计算目标曝光量EVb;选择模块,用于根据拍摄装置的运动状态选择对应的曝光参数表;确定模块,用于根据目标曝光量EVb及选择的曝光参数表确定目标曝光参数;更新模块,用于将拍摄装置的曝光参数更新为下一帧的曝光参数;其中,当前曝光量EVa由拍摄装置当前的曝光参数计算获得,目标亮度Yb由当前曝光量EVa计算出曝光索引Na后结合亮度查找表获得。In the second aspect, an automatic exposure device is also provided in an embodiment of the present invention. The device includes: an acquisition module, which acquires a frame of image data captured by the shooting device according to the current exposure parameters and calculates the brightness Ya of the current frame; A module for calculating the target exposure EVb according to the current exposure EVa, the brightness Ya of the current frame and the target brightness Yb; a selection module for selecting the corresponding exposure parameter table according to the motion state of the shooting device; a determination module for selecting the corresponding exposure parameter table according to the target The exposure value EVb and the selected exposure parameter table determine the target exposure parameters; the update module is used to update the exposure parameters of the shooting device to the exposure parameters of the next frame; wherein, the current exposure value EVa is obtained by calculating the current exposure parameters of the shooting device, The target brightness Yb is obtained by combining the brightness lookup table after calculating the exposure index Na from the current exposure EVa.
第三方面,本发明的一实施例中还提供了一种相机,该相机包括处理器和存储器,所述存储器上储存有计算机程序,所述计算机程序用于处理器执行时以实现上述任一项所述的自动曝光方法。In the third aspect, an embodiment of the present invention also provides a camera, the camera includes a processor and a memory, and a computer program is stored in the memory, and the computer program is used to realize any of the above-mentioned functions when the processor executes it. Auto Exposure method described in section .
第四方面,本发明的一实施例中还提供了一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现上述任一项所述的自动曝光方法。In a fourth aspect, an embodiment of the present invention also provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, any one of the above-mentioned Auto Exposure method described above.
有益效果Beneficial effect
与现有技术相比,本发明技术方案通过结合目标曝光量和拍摄装置的运动状态来实时更新拍摄装置的曝光参数,改善了拍摄装置在运动状态下拍摄导致画面有运动模糊以及在静止 状态下拍摄导致画面噪点严重的问题。Compared with the prior art, the technical solution of the present invention updates the exposure parameters of the photographing device in real time by combining the target exposure amount and the motion state of the photographing device, which improves the motion blur of the picture caused by the photographing device in a moving state and the blurred image in a static state. Shooting results in severe picture noise.
附图说明Description of drawings
图1为本发明实施例1中的自动曝光方法的流程图。FIG. 1 is a flowchart of an automatic exposure method in Embodiment 1 of the present invention.
图2为本发明实施例1中的步骤S1的子步骤流程图。FIG. 2 is a flow chart of sub-steps of step S1 in Embodiment 1 of the present invention.
图3为本发明实施例1中的步骤S2的子步骤流程图。FIG. 3 is a flow chart of sub-steps of step S2 in Embodiment 1 of the present invention.
图4为本发明实施例1中的步骤S3的子步骤流程图。FIG. 4 is a flow chart of sub-steps of step S3 in Embodiment 1 of the present invention.
图5为本发明实施例1中的步骤S4的子步骤流程图。FIG. 5 is a flow chart of sub-steps of step S4 in Embodiment 1 of the present invention.
图6为本发明实施例1中的亮度查找表Y_LUT。FIG. 6 is a brightness lookup table Y_LUT in Embodiment 1 of the present invention.
图7为本发明实施例1中的静止状态曝光参数表。FIG. 7 is a table of static state exposure parameters in Embodiment 1 of the present invention.
图8为本发明实施例1中的步行状态曝光参数表。FIG. 8 is a table of exposure parameters in a walking state in Embodiment 1 of the present invention.
图9为本发明实施例1中的跑步状态曝光参数表。FIG. 9 is a table of exposure parameters in a running state in Embodiment 1 of the present invention.
图10为本发明实施例2中的自动曝光装置的框图。Fig. 10 is a block diagram of an automatic exposure device in Embodiment 2 of the present invention.
图11为本发明实施例3中的相机的框图。Fig. 11 is a block diagram of a camera in Embodiment 3 of the present invention.
本发明的实施方式Embodiments of the present invention
为了使本发明的目的、技术方案及有益效果更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。In order to make the object, technical solution and beneficial effects of the present invention more clear, the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.
需要说明的是,本发明公开的说明书、权利要求书及附图中的″S1″、″S2″等标号是用于代表某个步骤的内容,而不是用于描述特定的顺序或先后次序。应该理解这样使用的标号在适当情况下可以互换,除非后一步骤依赖于前一步骤的实现。It should be noted that symbols such as "S1" and "S2" in the specification, claims and drawings of the present invention are used to represent the content of a certain step, rather than to describe a specific sequence or sequence. It should be understood that reference numbers so used are interchangeable under appropriate circumstances, unless the latter step is dependent on the implementation of the previous step.
为了说明本发明所述的技术方案,下面通过具体实施例来进行说明。In order to illustrate the technical solutions of the present invention, specific examples are used below to illustrate.
实施例1Example 1
如图1所示,为本实施例中的自动曝光方法的流程图,包括以下步骤。As shown in FIG. 1 , it is a flow chart of the automatic exposure method in this embodiment, including the following steps.
S1:获取拍摄装置按当前曝光参数拍摄的当前帧图像数据并计算当前帧的亮度Ya。S1: Obtain the image data of the current frame captured by the photographing device according to the current exposure parameters and calculate the brightness Ya of the current frame.
在本实施例中,拍摄装置可以为运动相机、手机、摄像机等具备拍摄功能的电子设备。在获取到当前帧的图像数据后,可以统计当前帧的各个像素的亮度值,然后将各个像素的亮度值的平均值作为当前帧的亮度Ya。In this embodiment, the photographing device may be an electronic device with a photographing function such as a sports camera, a mobile phone, and a video camera. After the image data of the current frame is acquired, the luminance values of each pixel in the current frame can be counted, and then the average value of the luminance values of each pixel can be used as the luminance Ya of the current frame.
在本实施例中的一个具体方案中,步骤S1包括以下子步骤。In a specific solution of this embodiment, step S1 includes the following sub-steps.
S101:获取拍摄装置按当前曝光参数拍摄的当前帧图像数据。S101: Acquire current frame image data captured by a photographing device according to current exposure parameters.
当前帧图像数据为按拍摄装置当前的曝光参数(快门SHTa、增益AGCa和光圈APTa)拍摄的视频帧图像数据。需要说明的是,在拍摄装置开机时,拍摄装置的当前曝光参数为一个预设值,该预设值与拍摄装置的拍摄场景相关,例如,运动相机的拍摄场景大多都是户外,环境明亮,因此预设的曝光参数使得运动相机的曝光量相对较小。The current frame image data is the video frame image data shot according to the current exposure parameters (shutter SHTa, gain AGCa and aperture APTa) of the shooting device. It should be noted that when the shooting device is turned on, the current exposure parameter of the shooting device is a preset value, which is related to the shooting scene of the shooting device. Therefore, the preset exposure parameters make the exposure of the sports camera relatively small.
S102:将当前帧的图像分成多个块并对每个块设置权重值。S102: Divide the image of the current frame into multiple blocks and set a weight value for each block.
在本实施例的具体中,可通过将当前帧的图像分割成大小相同的n个图像块,并根据各图像块在图像中的位置设置不同的权重ωi,由于用户在拍摄时的焦点一般位于画面中心或者靠近地面一侧,可以将位于中心和图像下方的图像块设置较高的权重值。在本步骤的其他可选方案中,还可以根据图像的拍摄内容将当前帧的图像分成多个块,例如,通过AI(人工智能算法)识别当前帧的图像中的物体,然后对该物体所在块设置较高的权重值。Specifically, in this embodiment, the image of the current frame can be divided into n image blocks of the same size, and different weights ωi can be set according to the position of each image block in the image. Since the focus of the user is generally at In the center of the screen or close to the ground side, you can set a higher weight value for the image blocks located in the center and below the image. In other optional schemes of this step, the image of the current frame can also be divided into multiple blocks according to the shooting content of the image, for example, the object in the image of the current frame is recognized by AI (artificial intelligence algorithm), and then the Blocks set higher weight values.
S103:根据每个块的的平均亮度值和对应的权重值计算当前帧的亮度。S103: Calculate the brightness of the current frame according to the average brightness value of each block and the corresponding weight value.
本实施例的具体方案中,由于每个块的大小相同,因此所含像素数目相同,因此可以先统计每个块的各个像素的亮度值,再求得每个块的平均亮度值Li,再乘以每个块的对应的权重值ωi,即可得到当前帧的亮度Ya,其计算公式如下:
Figure PCTCN2022100183-appb-000001
其中,
Figure PCTCN2022100183-appb-000002
In the specific scheme of this embodiment, since the size of each block is the same, so the number of pixels contained is the same, so the brightness values of each pixel in each block can be counted first, and then the average brightness value Li of each block can be obtained, and then Multiplied by the corresponding weight value ωi of each block, the brightness Ya of the current frame can be obtained, and the calculation formula is as follows:
Figure PCTCN2022100183-appb-000001
in,
Figure PCTCN2022100183-appb-000002
S2:根据当前帧的亮度Ya、当前曝光量EVa以及目标亮度Yb计算目标曝光量EVb。S2: Calculate the target exposure EVb according to the brightness Ya of the current frame, the current exposure EVa and the target brightness Yb.
本实施例中,步骤S2包括子步骤S201和S202。In this embodiment, step S2 includes sub-steps S201 and S202.
S201:判断当前帧的亮度Ya与目标亮度Yb是否在误差范围内,如果是则返回步骤S1, 如果否则进入步骤S202。S201: Determine whether the luminance Ya of the current frame and the target luminance Yb are within the error range, if yes, return to step S1, otherwise, enter step S202.
当前曝光量EVa的计算公式为:EVa=SHTa*AGCa/APTa^ 2,其中,SHTa、AGCa、APTa依次为拍摄装置当前的快门、增益和光圈。 The formula for calculating the current exposure EVa is: EVa=SHTa*AGCa/APTa^ 2 , where SHTa, AGCa, and APTa are the current shutter, gain, and aperture of the photographing device in sequence.
目标亮度Yb由当前曝光量EVa计算出曝光索引Na后结合亮度查找表获得,具体为:根据当前曝光量EVa计算出曝光索引Na,并对Na限制到曝光索引的最大值(本实施例中为15)之内,曝光索引Na的计算公式为:Na=16+log2EVa,计算出曝光索引Na后,再在亮度查找表Y_LUT中找到与Na相同的值,然后找到对应的亮度值,若Na位于两个索引坐标Na1、Na2之间,则找到两个索引坐标Na1、Na2对应的目标亮度值Yb1、Yb2,然后通过插值法计算目标亮度值Yb,具体为:Yb=Yb1+(Yb2-Yb1)*(Na-Na1)/(Na2-Na1)。其中,亮度查找表Y_LUT是以曝光索引为坐标的一个查找表,包括曝光索引值和对应的目标亮度值,其中目标亮度是拍摄者期望的拍摄图像的亮度,即符合人眼观察到的亮度,亮度查找表Y_LUT中的目标亮度是一个经验值,与拍摄装置的拍摄场景相关,比如在户外场景目标亮度值会大一些,夜景则目标亮度值会小一些,本实例中的一个亮度查找表Y_LUT如图6所示。The target brightness Yb is obtained by combining the brightness lookup table after calculating the exposure index Na from the current exposure EVa, specifically: calculating the exposure index Na according to the current exposure EVa, and limiting Na to the maximum value of the exposure index (in this embodiment, Within 15), the formula for calculating the exposure index Na is: Na=16+log2EVa. After calculating the exposure index Na, find the same value as Na in the brightness lookup table Y_LUT, and then find the corresponding brightness value. If Na is located at Between the two index coordinates Na1 and Na2, find the target brightness values Yb1 and Yb2 corresponding to the two index coordinates Na1 and Na2, and then calculate the target brightness value Yb by interpolation method, specifically: Yb=Yb1+(Yb2-Yb1)* (Na-Na1)/(Na2-Na1). Among them, the brightness lookup table Y_LUT is a lookup table with the exposure index as the coordinate, including the exposure index value and the corresponding target brightness value, wherein the target brightness is the brightness of the captured image expected by the photographer, that is, the brightness observed by the human eye, The target brightness in the brightness lookup table Y_LUT is an empirical value, which is related to the shooting scene of the shooting device. For example, the target brightness value will be larger in outdoor scenes, and the target brightness value will be smaller in night scenes. A brightness lookup table Y_LUT in this example As shown in Figure 6.
在得到目标亮度Yb后,将其与当前帧的亮度Ya进行比较,判断两个值是否在误差范围内(例如,通过计算比例或差值范围)。如果当前帧的亮度Ya和目标亮度Yb在误差范围内,则可以不用对拍摄装置的曝光参数进行调整,然后返回步骤S1;如果当前帧的亮度Ya和目标亮度Yb在误差范围外,则进入步骤S202.After the target brightness Yb is obtained, it is compared with the brightness Ya of the current frame to judge whether the two values are within the error range (for example, by calculating the ratio or difference range). If the brightness Ya of the current frame and the target brightness Yb are within the error range, it is not necessary to adjust the exposure parameters of the shooting device, and then return to step S1; if the brightness Ya of the current frame and the target brightness Yb are outside the error range, then enter step S1. S202.
S202:根据当前曝光量EVa、目标亮度Yb和当前帧的亮度Ya计算目标曝光量EVb。S202: Calculate the target exposure EVb according to the current exposure EVa, the target brightness Yb, and the brightness Ya of the current frame.
本实施例中,目标曝光量EVb的计算公式为:EVb=EVa*Yb/Ya。In this embodiment, the formula for calculating the target exposure EVb is: EVb=EVa*Yb/Ya.
S3:根据拍摄装置的运动状态选择对应的曝光参数表。S3: Select the corresponding exposure parameter table according to the motion state of the photographing device.
本步骤可以通过读取拍摄装置上的陀螺仪数据来判断拍摄装置的运动状态的,在其他的一些方案中,也可以通过比较相邻视频帧之间的特征点之间的位移来判断拍摄装置的运动状 态。本实施例中,将拍摄装置的运动状态设置为静止状态、步行状态以及跑步状态,下面以读取拍摄装置上的陀螺仪数据来判断拍摄装置的运动状态为例进行说明。In this step, the motion state of the shooting device can be judged by reading the gyroscope data on the shooting device. In some other schemes, the shooting device can also be judged by comparing the displacement between feature points between adjacent video frames. state of motion. In this embodiment, the motion state of the photographing device is set as a stationary state, a walking state, and a running state. The following uses reading gyroscope data on the photographing device to determine the motion state of the photographing device as an example for illustration.
S301:获取陀螺仪相邻两次读取的角度之间的差值Df。S301: Obtain a difference Df between angles read twice adjacently by the gyroscope.
具体地,每间隔一段时间(如20ms)读取一次陀螺仪的角度数据,然后将该角度数据与上一次读取的角度数据相减,然后取相减的数值的绝对值作为差值Df。Specifically, the angle data of the gyroscope is read at intervals (such as 20ms), and then the angle data is subtracted from the angle data read last time, and then the absolute value of the subtracted value is taken as the difference Df.
S302:若连续的N个Df的值均位于设定阈值Dt i至Dt i+1之间,则将拍摄装置判定为第i运动状态。 S302: If the values of N consecutive Df are all between the set thresholds Dt i to Dt i+1 , determine that the photographing device is in the i-th motion state.
本实施例中的运动状态包括静止状态、步行状态以及跑步状态共3个状态,对应包括Dt 1至Dt 4共4个设定阈值,假设Dt 1<Dt 2<Dt 3<Dt 4,可以得知,Dt 1=0,Dt 4趋向无穷大。因此,当连续的N个Df的值均小于或等于Dt 2时,判断拍摄装置处于静止状态;当连续的N个Df的值均大于Dt 2而小于等于Dt 3时,判断拍摄装置处于步行状态;当连续的N个Df的值均大于Dt 3时,判断拍摄装置处于跑步状态。 The exercise state in this embodiment includes 3 states of static state, walking state and running state, corresponding to 4 thresholds including Dt 1 to Dt 4 , assuming Dt 1 <Dt 2 <Dt 3 <Dt 4 , it can be obtained It is known that Dt 1 =0, and Dt 4 tends to infinity. Therefore, when the values of consecutive N Dfs are all less than or equal to Dt 2 , it is judged that the photographing device is in a stationary state; when the values of consecutive N Dfs are all greater than Dt 2 and less than or equal to Dt 3 , it is judged that the photographing device is in a walking state ; When consecutive N values of Df are greater than Dt 3 , it is judged that the shooting device is in a running state.
具体地,在每次获得差值Df后,判断差值Df是否小于等于设定的变化阈值Dt 2,是则增加计数值C 1,否则计数值C 1清零;再判断差值Df是否大于Dt 2而小于等于Dt 3,是则增加计数值C 2,否则计数值C 2清零;然后再判断差值Df是否大于设定的变化阈值Dt 3,是则增加计数值C 3,否则计数值C 3清零。判断计数值C 1是否大于设定的计数阈值Ct 1,是则将拍摄装置的状态判断为静止状态;判断计数值C 2是否大于设定的计数阈值Ct 2,是则将拍摄装置的状态判断为步行状态;判断计数值C 3是否大于设定的计数阈值Ct 3,是则将拍摄装置的状态判断为跑步状态。 Specifically, after obtaining the difference Df each time, it is judged whether the difference Df is less than or equal to the set change threshold Dt 2 , and if yes, the count value C 1 is increased, otherwise the count value C 1 is cleared; then it is judged whether the difference Df is greater than Dt 2 is less than or equal to Dt 3 , if yes, increase the count value C 2 , otherwise the count value C 2 will be cleared; then judge whether the difference Df is greater than the set change threshold Dt 3 , if yes, increase the count value C 3 , otherwise count Value C3 is cleared. Judging whether the counting value C 1 is greater than the set counting threshold Ct 1 , if yes, the state of the photographing device is judged as a static state; judging whether the counting value C 2 is greater than the set counting threshold Ct 2 , if yes, judging the state of the photographing device It is a walking state; it is judged whether the count value C 3 is greater than the set count threshold Ct 3 , and if so, the state of the photographing device is judged to be a running state.
在本步骤的其他方案中,也可以统计单位时间内的各个计数值,然后将计数值最大的对应的运动状态作为拍摄装置的当前运动状态。In other solutions of this step, it is also possible to count each count value per unit time, and then use the motion state corresponding to the maximum count value as the current motion state of the photographing device.
S303:选择与第i运动状态对应的第i曝光参数表。S303: Select the i-th exposure parameter table corresponding to the i-th motion state.
根据步骤S302中确定的运动状态,选取与该运动状态对应的曝光参数表EXP_LUT。曝 光参数表EXP_LUT以曝光索引为坐标,包括曝光索引值和对应的曝光参数值,曝光参数包括光圈值、快门值和增益值。本实施例中的3个运动状态的曝光参数表如图7至图9所示。According to the motion state determined in step S302, the exposure parameter table EXP_LUT corresponding to the motion state is selected. The exposure parameter table EXP_LUT takes the exposure index as the coordinate, including the exposure index value and the corresponding exposure parameter value, and the exposure parameter includes the aperture value, shutter value and gain value. The exposure parameter tables of the three motion states in this embodiment are shown in FIGS. 7 to 9 .
S4:根据目标曝光量EVb及选择的曝光参数表确定目标曝光参数。S4: Determine the target exposure parameter according to the target exposure EVb and the selected exposure parameter table.
S401:根据目标曝光量EVb计算曝光索引Nb。S401: Calculate an exposure index Nb according to a target exposure EVb.
本实施例中,首先根据目标曝光量EVb计算出曝光索引Nb,并对曝光索引Nb限制到曝光索引的最大值(目前是设置为15)之内,其中,曝光索引Nb的计算公式为:Nb=16+log2EVb。In this embodiment, the exposure index Nb is first calculated according to the target exposure amount EVb, and the exposure index Nb is limited to the maximum value of the exposure index (currently set to 15), wherein the calculation formula of the exposure index Nb is: Nb =16+log2 EVb.
S402:根据曝光索引及曝光参数表中对应的数据确定目标曝光参数。S402: Determine a target exposure parameter according to the exposure index and the corresponding data in the exposure parameter table.
计算出曝光索引Nb后,再在曝光参数表EXP_LUT中找到与Na相同的值,然后找到对应的亮度值;若曝光索引Nb位于曝光参数表EXP_LUT的两个索引坐标Nb1、Nb2之间,则找到两个索引坐标Nb1、Nb2对应的快门值SHT1、SHT2,增益值AGC1、AGC2,光圈值APT1、APT2,然后通过插值法计算各曝光参数值。After calculating the exposure index Nb, find the same value as Na in the exposure parameter table EXP_LUT, and then find the corresponding brightness value; if the exposure index Nb is located between the two index coordinates Nb1 and Nb2 of the exposure parameter table EXP_LUT, then find The shutter values SHT1 and SHT2, the gain values AGC1 and AGC2, and the aperture values APT1 and APT2 corresponding to the two index coordinates Nb1 and Nb2 are then calculated by interpolation.
具体地,目标快门值EXP_SHT的计算公式为:Specifically, the calculation formula of the target shutter value EXP_SHT is:
EXP_SHT=SHT1+(SHT2-SHT1)*(Nb-Nb1)/(Nb2-Nb1)。EXP_SHT=SHT1+(SHT2-SHT1)*(Nb-Nb1)/(Nb2-Nb1).
具体地,目标增益值EXP_AGC的计算公式为:Specifically, the calculation formula of the target gain value EXP_AGC is:
EXP_AGC=AGC1+(AGC2-AGC1)*(Nb-Nb1)/(Nb2-Nb1)。EXP_AGC=AGC1+(AGC2-AGC1)*(Nb-Nb1)/(Nb2-Nb1).
具体地,目标光圈值EXP_APT的计算公式为:Specifically, the calculation formula of the target aperture value EXP_APT is:
EXP_APT=APT1+(APT2-APT1)*(Nb-Nb1)/(Nb2-Nb1)。EXP_APT=APT1+(APT2-APT1)*(Nb-Nb1)/(Nb2-Nb1).
S5:将拍摄装置的曝光参数更新为目标曝光参数并返回步骤S1。S5: Update the exposure parameter of the photographing device to the target exposure parameter and return to step S1.
将步骤S4中确定目标曝光参数设置到拍摄装置上,然后返回步骤S1,再重复步骤S1至S5直到拍摄装置完成整个视频的拍摄。Set the target exposure parameters determined in step S4 on the shooting device, then return to step S1, and repeat steps S1 to S5 until the shooting device finishes shooting the entire video.
实施例2Example 2
如图10所示,本实施例揭示了一种自动曝光装置,该装置包括包括:获取模块,获取 拍摄装置按当前曝光参数拍摄的一帧图像数据并计算当前帧的亮度Ya;计算模块,用于根据当前曝光量EVa、当前帧的亮度Ya以及目标亮度Yb计算目标曝光量EVb;选择模块,用于根据拍摄装置的运动状态选择对应的曝光参数表;确定模块,用于根据目标曝光量EVb及选择的曝光参数表确定目标曝光参数;更新模块,用于将拍摄装置的曝光参数更新为下一帧的曝光参数;其中,当前曝光量EVa由拍摄装置当前的曝光参数计算获得,目标亮度Yb由当前曝光量EVa计算出曝光索引Na后结合亮度查找表获得。As shown in FIG. 10 , this embodiment discloses an automatic exposure device, which includes: an acquisition module, which acquires a frame of image data captured by the shooting device according to the current exposure parameters and calculates the brightness Ya of the current frame; a calculation module, which uses Calculate the target exposure EVb according to the current exposure EVa, the brightness Ya of the current frame and the target brightness Yb; the selection module is used to select the corresponding exposure parameter table according to the motion state of the shooting device; the determination module is used to select the corresponding exposure parameter table according to the target exposure EVb And the selected exposure parameter table determines the target exposure parameter; the update module is used to update the exposure parameter of the shooting device to the exposure parameter of the next frame; wherein, the current exposure EVa is calculated by the current exposure parameter of the shooting device, and the target brightness Yb The exposure index Na is calculated from the current exposure EVa and obtained in combination with the brightness lookup table.
本实施例中的各个参数的获取过程及计算公式可参考实施例1中的相关描述。For the acquisition process and calculation formula of each parameter in this embodiment, reference may be made to the relevant description in Embodiment 1.
实施例3Example 3
如图11所示,本实施例揭示了一种相机,该相机包括处理器和存储器,所述存储器上储存有计算机程序,所述计算机程序用于处理器执行时以实现实施例1中的自动曝光方法。As shown in Figure 11, this embodiment discloses a camera, the camera includes a processor and a memory, and a computer program is stored on the memory, and the computer program is used to realize the automatic operation in Embodiment 1 when the processor is executed. exposure method.
本领域一般技术人员可知,本实施例中的相机还包括镜头、ISP等相机必要组成部件。Those skilled in the art know that the camera in this embodiment also includes necessary components of the camera such as a lens and an ISP.
实施例4Example 4
本实施例揭示了一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现上实施例1中的自动曝光方法。This embodiment discloses a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the automatic exposure method in the above embodiment 1 is implemented.
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,存储介质可以是计算机可读存储介质,例如,铁电存储器(FRAM,Ferromagnetic Random Access Memory)、只读存储器(ROM,Read Only Memory)、可编程只读存储器(PROM,Programmable Read Only Memory)、可擦除可编程只读存储器(EPROM,Erasable Programmable Read Only Memory)、带电可擦可编程只读存储器(EEPROM,Electrically Erasable Programmable Read Only Memory)、闪存、磁表面存储器、光盘、或光盘只读存储器(CD-ROM,Compact Disk-Read Only Memory)等存储器;也可以是包括上述存储器之一或任意组合的各种设备。Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above-mentioned embodiments can be completed by instructing related hardware through a program, and the storage medium can be a computer-readable storage medium, for example, a ferroelectric memory (FRAM, Ferromagnetic Random Access Memory), read-only memory (ROM, Read Only Memory), programmable read-only memory (PROM, Programmable Read Only Memory), erasable programmable read-only memory (EPROM, Erasable Programmable Read Only Memory), charged Memory such as erasable programmable read-only memory (EEPROM, Electrically Erasable Programmable Read Only Memory), flash memory, magnetic surface memory, optical disk, or optical disk read-only memory (CD-ROM, Compact Disk-Read Only Memory); it can also include Various devices of one or any combination of the above memories.
以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原 则之内所作的任何修改、等同替换和改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present invention should be included in the protection of the present invention. within range.

Claims (10)

  1. 一种自动曝光方法,其特征在于,包括:An automatic exposure method, characterized in that, comprising:
    S1:获取拍摄装置按当前曝光参数拍摄的当前帧图像数据并计算当前帧的亮度Ya;S1: Obtain the current frame image data captured by the shooting device according to the current exposure parameters and calculate the brightness Ya of the current frame;
    S2:根据当前帧的亮度Ya、当前曝光量EVa以及目标亮度Yb计算目标曝光量EVb;S2: Calculate the target exposure EVb according to the brightness Ya of the current frame, the current exposure EVa and the target brightness Yb;
    S3:根据拍摄装置的运动状态选择对应的曝光参数表;S3: Select a corresponding exposure parameter table according to the motion state of the photographing device;
    S4:根据目标曝光量EVb及选择的曝光参数表确定目标曝光参数;S4: Determine the target exposure parameter according to the target exposure EVb and the selected exposure parameter table;
    S5:将拍摄装置的曝光参数更新为目标曝光参数并返回步骤S1;S5: updating the exposure parameter of the photographing device to the target exposure parameter and returning to step S1;
    其中,当前曝光量EVa由拍摄装置当前的曝光参数计算获得,目标亮度Yb由当前曝光量EVa计算出曝光索引Na后结合亮度查找表获得。Wherein, the current exposure EVa is obtained by calculating the current exposure parameters of the photographing device, and the target brightness Yb is obtained by combining the exposure index Na calculated from the current exposure EVa by combining the brightness lookup table.
  2. 如权利要求1所述的自动曝光方法,其特征在于,所述步骤S1中的当前曝光量EVa的计算公式为:EVa=SHTa*AGCa/APTa^ 2,其中,SHTa、AGCa、APTa依次为拍摄装置当前的快门、增益和光圈。 The automatic exposure method according to claim 1, characterized in that, the calculation formula of the current exposure EVa in the step S1 is: EVa=SHTa*AGCa/APTa^ 2 , wherein, SHTa, AGCa, and APTa are successively photographed Set the current shutter, gain and aperture.
  3. 如权利要求1所述的自动曝光方法,其特征在于,所述步骤S1包括以下子步骤:The automatic exposure method according to claim 1, wherein said step S1 comprises the following sub-steps:
    S101:获取拍摄装置按当前曝光参数拍摄的当前帧图像数据;S101: Obtain the current frame image data captured by the photographing device according to the current exposure parameters;
    S102:将当前帧图像数据分成多个块并对每个块设置权重值;S102: Divide the current frame image data into multiple blocks and set a weight value for each block;
    S103:根据每个块的的平均亮度值和对应的权重值计算当前帧的亮度。S103: Calculate the brightness of the current frame according to the average brightness value of each block and the corresponding weight value.
  4. 如权利要求1所述的自动曝光方法,其特征在于,所述步骤S2包括:The automatic exposure method according to claim 1, wherein said step S2 comprises:
    S201:判断当前帧的亮度Ya与目标亮度Yb是否在误差范围内,如果是则返回步骤S1,如果否则进入步骤S202;S201: Determine whether the luminance Ya of the current frame and the target luminance Yb are within the error range, if yes, return to step S1, otherwise, enter step S202;
    S202:根据当前曝光量EVa、目标亮度Yb和当前帧的亮度Ya计算目标曝光量EVb。S202: Calculate the target exposure EVb according to the current exposure EVa, the target brightness Yb, and the brightness Ya of the current frame.
  5. 如权利要求1所述的自动曝光方法,其特征在于,所述步骤S3包括以下子步骤:The automatic exposure method according to claim 1, wherein said step S3 comprises the following sub-steps:
    S301:获取陀螺仪相邻两次读取的角度之间的差值Df;S301: Obtain the difference Df between the angles read twice by the gyroscope;
    S302:若连续的N个Df的值均位于设定阈值Dt i至Dt i+1之间,则将拍摄装置判定为 第i运动状态; S302: If the values of N consecutive Df are all between the set thresholds Dt i to Dt i+1 , determine that the shooting device is in the i-th motion state;
    S303:选择与第i运动状态对应的第i曝光参数表。S303: Select the i-th exposure parameter table corresponding to the i-th motion state.
  6. 如权利要求1所述的自动曝光方法,其特征在于,所述步骤S4包括以下子步骤:The automatic exposure method according to claim 1, wherein said step S4 comprises the following sub-steps:
    S401:根据目标曝光量EVb计算曝光索引Nb;S401: Calculate the exposure index Nb according to the target exposure EVb;
    S402:根据曝光索引及曝光参数表中对应的数据确定目标曝光参数;S402: Determine the target exposure parameter according to the corresponding data in the exposure index and the exposure parameter table;
    其中,所述曝光参数表以曝光索引为坐标,包括曝光索引值和对应的曝光参数值,曝光参数包括光圈值、快门值和增益值。Wherein, the exposure parameter table takes the exposure index as a coordinate, and includes exposure index values and corresponding exposure parameter values, and the exposure parameters include aperture values, shutter values, and gain values.
  7. 如权利要求6所述的自动曝光方法,其特征在于,所述步骤S402具体为:根据曝光索引Nb在曝光参数表中找到与曝光索引Nb最接近的两个索引及对应的两组曝光参数,采用插值法计算目标曝光参数。The automatic exposure method according to claim 6, wherein the step S402 specifically comprises: finding two indexes closest to the exposure index Nb and corresponding two sets of exposure parameters in the exposure parameter table according to the exposure index Nb, Interpolation method is used to calculate target exposure parameters.
  8. 一种自动曝光装置,其特征在于,包括:An automatic exposure device, characterized in that it comprises:
    获取模块,获取拍摄装置按当前曝光参数拍摄的当前帧图像数据并计算当前帧的亮度Ya;The acquiring module acquires the current frame image data captured by the shooting device according to the current exposure parameters and calculates the brightness Ya of the current frame;
    计算模块,根据当前帧的亮度Ya、当前曝光量EVa以及目标亮度Yb计算目标曝光量EVb;The calculation module calculates the target exposure EVb according to the brightness Ya of the current frame, the current exposure EVa and the target brightness Yb;
    选择模块,用于根据拍摄装置的运动状态选择对应的曝光参数表;a selection module, configured to select a corresponding exposure parameter table according to the motion state of the photographing device;
    确定模块,用于根据目标曝光量EVb及选择的曝光参数表确定目标曝光参数;A determining module, configured to determine the target exposure parameter according to the target exposure EVb and the selected exposure parameter table;
    更新模块,用于将拍摄装置的曝光参数更新为下一帧的曝光参数;An update module, configured to update the exposure parameters of the shooting device to the exposure parameters of the next frame;
    其中,当前曝光量EVa由拍摄装置当前的曝光参数计算获得,目标亮度Yb由当前曝光量EVa计算出曝光索引Na后结合亮度查找表获得。Wherein, the current exposure EVa is obtained by calculating the current exposure parameters of the photographing device, and the target brightness Yb is obtained by combining the exposure index Na calculated from the current exposure EVa by combining the brightness lookup table.
  9. 一种相机,其特征在于,包括处理器和存储器,所述存储器上储存有计算机程序,所述计算机程序用于处理器执行时以实现权利要求1至7中任一项所述的自动曝光方法。A camera, characterized in that it comprises a processor and a memory, and a computer program is stored on the memory, and the computer program is used to realize the automatic exposure method described in any one of claims 1 to 7 when the computer program is executed by the processor .
  10. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有计算机 程序,所述计算机程序被处理器执行时实现权利要求1至7中任一项所述的自动曝光方法。A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the automatic exposure method according to any one of claims 1 to 7 is realized .
PCT/CN2022/100183 2021-06-29 2022-06-21 Automatic exposure method, automatic exposure apparatus, camera and computer-readable storage medium WO2023273962A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110729403.X 2021-06-29
CN202110729403.XA CN113596342A (en) 2021-06-29 2021-06-29 Automatic exposure method, exposure apparatus, camera and computer readable storage medium

Publications (1)

Publication Number Publication Date
WO2023273962A1 true WO2023273962A1 (en) 2023-01-05

Family

ID=78245088

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/100183 WO2023273962A1 (en) 2021-06-29 2022-06-21 Automatic exposure method, automatic exposure apparatus, camera and computer-readable storage medium

Country Status (2)

Country Link
CN (1) CN113596342A (en)
WO (1) WO2023273962A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113596342A (en) * 2021-06-29 2021-11-02 影石创新科技股份有限公司 Automatic exposure method, exposure apparatus, camera and computer readable storage medium
CN115474006B (en) * 2022-02-22 2023-10-24 重庆紫光华山智安科技有限公司 Image capturing method, system, electronic device and readable storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060170816A1 (en) * 2005-01-28 2006-08-03 Silverstein D A Method and system for automatically adjusting exposure parameters of an imaging device
JP2011130031A (en) * 2009-12-15 2011-06-30 Canon Inc Imaging apparatus, and control method for the same
CN104320593A (en) * 2014-11-19 2015-01-28 湖南国科微电子有限公司 Automatic exposure control method for digital photographic device
CN108833802A (en) * 2018-09-18 2018-11-16 Oppo广东移动通信有限公司 Exposal control method, device and electronic equipment
CN109587407A (en) * 2018-12-14 2019-04-05 广州华多网络科技有限公司 Exposure amount adjustment method, device and the computer equipment of image taking
CN110099222A (en) * 2019-05-17 2019-08-06 睿魔智能科技(深圳)有限公司 A kind of exposure adjustment method of capture apparatus, device, storage medium and equipment
CN111357273A (en) * 2019-02-21 2020-06-30 深圳市大疆创新科技有限公司 Shooting parameter adjusting method, shooting equipment and movable platform
CN113596342A (en) * 2021-06-29 2021-11-02 影石创新科技股份有限公司 Automatic exposure method, exposure apparatus, camera and computer readable storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060170816A1 (en) * 2005-01-28 2006-08-03 Silverstein D A Method and system for automatically adjusting exposure parameters of an imaging device
JP2011130031A (en) * 2009-12-15 2011-06-30 Canon Inc Imaging apparatus, and control method for the same
CN104320593A (en) * 2014-11-19 2015-01-28 湖南国科微电子有限公司 Automatic exposure control method for digital photographic device
CN108833802A (en) * 2018-09-18 2018-11-16 Oppo广东移动通信有限公司 Exposal control method, device and electronic equipment
CN109587407A (en) * 2018-12-14 2019-04-05 广州华多网络科技有限公司 Exposure amount adjustment method, device and the computer equipment of image taking
CN111357273A (en) * 2019-02-21 2020-06-30 深圳市大疆创新科技有限公司 Shooting parameter adjusting method, shooting equipment and movable platform
CN110099222A (en) * 2019-05-17 2019-08-06 睿魔智能科技(深圳)有限公司 A kind of exposure adjustment method of capture apparatus, device, storage medium and equipment
CN113596342A (en) * 2021-06-29 2021-11-02 影石创新科技股份有限公司 Automatic exposure method, exposure apparatus, camera and computer readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
DU LIN;SUN HUAYAN;WANG SHUAI;GAO YUXUAN;QI YINGYING: "High Dynamic Range Image Fusion Algorithm for Moving Targets", ACTA OPTICA SINICA, vol. 37, no. 4, 4 January 2017 (2017-01-04), pages 109 - 117, XP093019256, ISSN: 0253-2239, DOI: 10.3788/AOS201737.04100001 *

Also Published As

Publication number Publication date
CN113596342A (en) 2021-11-02

Similar Documents

Publication Publication Date Title
WO2023273962A1 (en) Automatic exposure method, automatic exposure apparatus, camera and computer-readable storage medium
US8830338B2 (en) Imaging device
US9288392B2 (en) Image capturing device capable of blending images and image processing method for blending images thereof
US9826140B2 (en) Image capturing apparatus and control method thereof
US8368783B2 (en) Method for adjusting shooting parameters of digital camera
US8675094B2 (en) Imaging apparatus that preferentially suppresses occurrence of flicker in a through-the-lens image and method and computer program for controlling the imaging apparatus
US20070195171A1 (en) Face importance level determining apparatus and method, and image pickup apparatus
US9948848B2 (en) Imaging device with depth of field adjustment
US7995137B2 (en) Exposure compensation method for digital image
JP2007201979A (en) Exposure control apparatus and imaging apparatus
CN107533756B (en) Image processing device, imaging device, image processing method, and storage medium storing image processing program for image processing device
US20170200283A1 (en) Image processing apparatus, method of controlling image processing apparatus, and imaging apparatus
US7375758B2 (en) Electronic camera
WO2019019904A1 (en) White balance processing method and apparatus, and terminal
US20210158537A1 (en) Object tracking apparatus and control method thereof
WO2020107289A1 (en) Photographing method and apparatus, and unmanned aerial vehicle
JP2010072619A (en) Exposure operation device and camera
JP2013005325A (en) Electronic camera
JP4749478B2 (en) Digital image composition method
CN108337448B (en) High dynamic range image acquisition method and device, terminal equipment and storage medium
JP5849515B2 (en) Exposure calculation device and camera
US11405554B2 (en) Control method and device for electronic device, electronic device, and storage medium
CN108668090A (en) Optical device and its automatic explosion method
JP2002369074A (en) Exposure controller for optical equipment and its program and its method
TW201634999A (en) Auto focus method and apparatus using the same method

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE