WO2022067496A1 - Fast auto-exposure method for camera, and storage medium - Google Patents

Fast auto-exposure method for camera, and storage medium Download PDF

Info

Publication number
WO2022067496A1
WO2022067496A1 PCT/CN2020/118798 CN2020118798W WO2022067496A1 WO 2022067496 A1 WO2022067496 A1 WO 2022067496A1 CN 2020118798 W CN2020118798 W CN 2020118798W WO 2022067496 A1 WO2022067496 A1 WO 2022067496A1
Authority
WO
WIPO (PCT)
Prior art keywords
exposure
brightness
camera
image
successful
Prior art date
Application number
PCT/CN2020/118798
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 深圳市大疆创新科技有限公司
Priority to PCT/CN2020/118798 priority Critical patent/WO2022067496A1/en
Publication of WO2022067496A1 publication Critical patent/WO2022067496A1/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/60Control of cameras or camera modules

Definitions

  • the present invention generally relates to the field of cameras, and more particularly, to a method for rapid automatic exposure of a camera and a storage medium.
  • the brightness of the exposure needs to be adjusted.
  • Auto exposure uses the appropriate exposure parameters according to the brightness of the scene to avoid overexposed or dark images. Exposure test convergence is usually performed by automatic exposure to get the best shot brightness.
  • the camera is in a standby energy-saving state when it is not shooting (the camera sensor does not take pictures, and the Image Signal Processing (ISP) does not work). , to quickly capture wonderful moments, but the current camera takes too long from startup to complete auto exposure to achieve the above goals.
  • ISP Image Signal Processing
  • a first aspect of the present invention provides a method for fast automatic exposure of a camera, the method comprising:
  • Actual exposure parameters are calculated according to the first exposure parameters for taking pictures.
  • a second aspect of the present invention provides a storage medium on which a computer program is stored, and the computer program executes the aforementioned method when running.
  • the invention provides a method for fast automatic exposure of a camera.
  • the environment brightness when the camera is started is predicted, and the brightness sequence used for exposure test is set according to the environment brightness.
  • the exposure parameters corresponding to the set brightness sequence are sequentially exposed, and finally the actual exposure parameters are obtained.
  • the method can shorten the time consumed by automatic exposure and photographing after the camera is started, and solve the problem that the current product takes too much time from starting to completing automatic exposure. long question.
  • the time-consuming and energy-consuming of the entire process from the start of the camera to the completion of taking pictures can be controlled within 1S, which reaches the industry-leading level.
  • FIG. 1 shows a schematic flowchart of a method for fast automatic exposure of a camera provided by the present invention
  • FIG. 2 shows a schematic block diagram of a method for fast automatic exposure of a camera provided in an embodiment of the present invention.
  • a first aspect of the present invention provides a method for fast automatic exposure of a camera, as shown in FIG. 1 , the method includes:
  • Step S1 Predict the ambient brightness when the camera is activated next time according to the historical brightness data exposed by the camera before;
  • Step S2 setting a brightness sequence for exposure testing according to the predicted ambient brightness, and setting exposure parameters corresponding to the brightness sequence in the camera according to the brightness sequence;
  • Step S3 After the camera is started, exposure is performed in sequence according to the set exposure parameters and corresponding images are obtained;
  • Step S4 judging whether the exposure test is successful according to the image obtained by the exposure, and obtaining the first exposure parameter corresponding to the successful exposure test;
  • Step S5 Calculate actual exposure parameters according to the first exposure parameters, so as to be used for taking pictures.
  • FIG. 2 shows a schematic block diagram of a method for fast automatic exposure of a camera provided in an embodiment of the present invention.
  • the fast automatic exposure method described in this application can be applied to all types of digital cameras, and is not limited to a certain one.
  • the camera can be a motion camera. The time from camera startup to taking a picture is sensitive.
  • the camera may also be a professional camera, wherein faster automatic exposure in a professional camera means less power consumption and increased standby time. In the time-lapse photography with super long interval time, it can effectively increase the standby time.
  • the automatic exposure method of the present application can also be applied to all application scenarios that require quick exposure after startup.
  • the automatic exposure method described in the present application will be described in detail below by taking a camera as an example.
  • the convergence of the exposure test is usually directly performed to obtain the optimal exposure brightness, which takes too long.
  • the automatic exposure method of the present application before the camera is started , First, according to the historical brightness data of the previous exposure of the camera, the ambient brightness when the camera is started next time is predicted and stored in the camera, so as to avoid the problem that the exposure parameter setting is too different from the current ambient brightness, resulting in a long automatic exposure time.
  • the automatic exposure process if the exposure parameter is preset to a high value, there will be a lot of overexposure in the camera picture, and the automatic exposure (AE) cannot judge how bright the scene is, and the metering fails. If the exposure parameter is set low, there will be many dark parts of the screen, and the automatic exposure (AE) statistics will be affected by dark current and noise, and the metering will also fail.
  • the method described in this application makes use of the law of changes in ambient brightness, and by fitting historical brightness data, to predict the ambient brightness when the camera is activated next time, and then if the exposure parameters of the first frame are set properly, automatic exposure can be completed in one frame.
  • the exposure test of AE can reduce the time of exposure test, and then obtain the actual exposure parameters obtained more quickly, and shorten the time consumed by automatic exposure and photography after the camera is started.
  • the historical brightness data refers to fitting the historical brightness previously exposed by the camera to obtain historical brightness data after each time the camera takes a photo and before entering standby.
  • the fitting refers to fitting the historical brightness previously exposed by the camera to a parameter corresponding to the historical brightness, wherein the parameter corresponding to the historical brightness includes time and/or position.
  • a time-exposure brightness point set or curve is established with the time as the abscissa and the corresponding exposure brightness as the ordinate, so as to obtain the historical luminance data.
  • the location when fitting the exposure brightness and the location during exposure, take the location as the abscissa and the corresponding exposure brightness as the ordinate to establish a location-exposure brightness point set or curve, with Obtain the historical luminance data.
  • the location can be obtained according to GPS or other means, which is not limited herein.
  • the sampling time interval can be set. If the sampling time is greater than a certain threshold (for example, 5S), the collected data is fitted to predict the ambient brightness when the next startup is turned on.
  • a certain threshold for example, 5S
  • the method of fitting the sampling data can be cubic spline fitting.
  • the sampling result is to draw an approximate curve according to some data obtained by observation, that is, some discrete points on the plane. These discrete points are called for the control point.
  • fitting it is required that the curve does not necessarily pass through all control points, but approximates these points in some way to obtain the fitted curve.
  • a fitting curve is constructed after sampling.
  • a piecewise fitting method can also be used in this application, that is, in each segment, a low-order polynomial is used as the fitting curve of the segment, Moreover, these piecewise polynomial curves also have a certain degree of smoothness at the demarcation point for spline fitting. Through the spline, the above-mentioned time-exposure brightness or time-exposure location and other smooth curves can be drawn according to the given control points. .
  • the exposure brightness and corresponding parameters, as well as the historical brightness data obtained after fitting have been stored in the camera during the last use of the camera, and then predicted The ambient brightness the next time the camera starts up.
  • the environmental brightness in the next shooting is predicted according to the historical brightness data.
  • the method includes predicting the ambient brightness at the next shooting according to the parameters at the next shooting in combination with the historical brightness data.
  • the shooting time can be obtained in the next shooting, and then according to the time-exposure brightness point set or curve, the brightness corresponding to the time can be obtained on the point set or curve , as the ambient brightness for the next shooting.
  • the shooting location may be acquired during the next shooting, and then, according to the location-exposure brightness point set or curve, the brightness corresponding to the location is obtained on the point set or curve , as the ambient brightness for the next shooting.
  • the last exposure brightness of the camera can be directly used as the next shot. Exposure at ambient brightness.
  • the brightness sequence used for the exposure test is set according to the ambient brightness predicted in the step S1, wherein the brightness sequence refers to a series of ambient brightness to be used in the subsequent steps.
  • exposure parameters corresponding to the brightness sequence are set in the camera according to the brightness sequence.
  • the method for setting a brightness sequence for exposure testing in the camera according to the predicted ambient brightness includes: centering on a brightness smaller than the predicted ambient brightness, increasing and decreasing with a fixed amplitude, to obtain the ambient brightness greater than the predicted, the predicted ambient brightness and the brightness sequence less than the predicted ambient brightness.
  • the ambient brightness predicted in the step S1 is 0EV, and a brightness smaller than the predicted 0EV is used as the intermediate number, for example, -4EV is used as the intermediate number , Increment and decrement with 8EV as a fixed range, increase 8EV, get 4EV ambient brightness, decrease 8EV, get -12EV ambient brightness, the obtained ambient brightness sequence is (-4EV, 4EV, -12EV).
  • the number of brightnesses set in the brightness sequence does not exceed 10.
  • the number of brightnesses set in the brightness sequence is three.
  • the number of brightnesses set in the brightness sequence is not limited to the above example, and can be selected according to actual needs.
  • the number of brightnesses set in the brightness sequence is related to the lag time of images generated by the camera after exposure. If the images generated by the first group of exposures are obtained after N frames of exposure, the brightness set in the brightness sequence is The number is N-1, that is, the exposure test can be stopped after obtaining the images generated by the first set of exposures. At this time, N-1 sets of data have been exposed.
  • the setting of the number of brightness in the brightness sequence is also exemplary. .
  • the exposure is continued regardless of whether the exposed image is generated or not, instead of each exposure, obtaining the exposure image, and performing the exposure detection in the current method, in the present application, after each exposure is completed, the camera is driven to Immediately enter the next exposure, not affected by the frame rate, without waiting for the image to be generated, and it takes less time to pass the set exposure test.
  • exposure parameters corresponding to the brightness are set in the camera according to each brightness in the brightness sequence, wherein the methods of setting the exposure parameters include shutter, aperture (value) size, Sensitivity (ISO), etc.
  • the shutter speed is the time from the shutter opening to closing.
  • the amount of light read by the photosensitive element is also large.
  • Shutter speed is generally 1/100s, 1/30s, 2s.
  • the aperture (value) has many lenses in the camera lens, and the light can penetrate to the end, and the multiple metal blades (after being folded) hidden in a certain position of the lens can control the amount of light entering on the lens.
  • the sensitivity also known as ISO, is the sensitivity of the photosensitive element to light: if the sensitivity is high, it is sensitive to light. If you give a little light, the photosensitive element can also feel it and the exposure is sufficient; if the sensitivity is low, you need to increase the sensitivity. .
  • the exposure parameters are set by adjusting one or more of shutter, aperture (value) size, and light sensitivity (ISO) in the camera, so that the brightness of the exposure during the exposure process is equal to the brightness in the set brightness sequence .
  • the exposure parameters have been set in the steps S1 and S2, and after the camera is started, the set exposure parameters are sequentially performed in a certain order. Exposure is enough, and the corresponding image is obtained after exposure.
  • the methods for exposing and generating images are the same as the conventional methods, and are not repeated here.
  • three brightness sequences are set in the brightness sequence, and the three brightness sequences are respectively exposed to obtain the first frame, the second frame and the third brightness sequence. Images obtained from three exposures.
  • step S4 an exposure test is performed according to the image obtained in the step S3, that is, it is verified whether any luminance in the luminance sequence meets the exposure requirement, as the first exposure parameter corresponding to the successful exposure test.
  • the representation of the current ambient brightness may be an expected value of the image brightness in the camera calculated according to the current ambient brightness.
  • the image exposure brightness can be obtained by performing statistics on the pixels in the image obtained after exposure; wherein, the image exposure brightness can be the average of all pixels in the image obtained after statistical exposure.
  • the brightness can also be the brightness of a specific area in the image obtained after exposure, for example, it can also be the brightness of the central area of the image obtained after exposure, wherein the measurement of the exposure brightness of the image can be set according to actual needs and purposes, Not limited to the above examples.
  • the exposure test is successful.
  • the set dark part threshold can be set according to actual needs. For example, the threshold number of pixels in the dark part in the image can be set. When the actual dark part in the image is less than or equal to the threshold number of pixels, The exposure test is deemed successful.
  • the average brightness of all pixels in the image can be obtained through the statistical value.
  • the exposure test is successful.
  • the exposure brightness of the image is greater than the expected value of the brightness, at this time, there are bright parts in the exposed image, and when the number of bright parts in the exposed image does not account for too much, the exposure Test success. Specifically, if the number of bright parts in the image is less than the set bright part threshold, the exposure test is successful.
  • the threshold value of the bright part can be set according to actual needs, for example, the threshold number of the pixels in the bright part in the image can be set. If the threshold number is exceeded, the exposure test is considered to be successful.
  • the average brightness of all pixels in the image can be obtained through the statistical value.
  • the exposure test is successful.
  • the images obtained by exposure are judged in order to judge whether the exposure test of the exposure parameters is successful, and stop after obtaining the result of the successful exposure test, and no subsequent exposure images that have not been judged are judged. If all the images obtained by the exposure parameters fail the exposure test, abnormal processing will be performed.
  • the delay of the exposure-generated image described in the present application is 4 frames
  • the set luminance sequence includes 3 luminances
  • 3 frames of images are obtained respectively
  • the first frame of graphics, the second frame of images, and the third frame of images are respectively the first frame of images, the second frame of images, and the third frame of images, and exposure tests are performed on the three frames of images. Then, the detection of the exposure test is stopped, and the exposure description corresponding to the exposure of the first frame is the first brightness, which can be used for subsequent calculation of the actual brightness.
  • the exposure test in the first frame of exposure image fails, continue to judge the exposure test of the second frame of exposure image, if the exposure test in the second frame of image is successful, stop the continuous exposure test detection, and the exposure corresponding to the second frame of exposure is explained.
  • the first brightness which can be used for subsequent calculation of actual brightness.
  • the exposure test in the second frame of exposure image fails, continue to judge the exposure test on the third frame of exposure image. If the exposure test in the third frame of image is successful, stop continuing the exposure test detection, and the exposure corresponding to the third frame of exposure is explained.
  • the exposure test fails in the images of the third frame (that is, all exposed images), it means that the predicted ambient brightness and the brightness sequence set according to the predicted ambient brightness do not match the current ambient brightness, and the difference is large.
  • exception handling for example, you can reset or add additional brightness sequences to continue exposure, or directly estimate a value according to the current situation to perform exposure.
  • the image exposure brightness needs to be moderate.
  • the expected value of the image brightness in the camera is set to [-8EV, 0EV], that is, at [-8EV] ,0EV] can be successfully metered.
  • the current ambient brightness is in the range of [-4,+4]EV
  • the exposure parameter in the first frame of exposure is -4EV
  • the current ambient brightness and the exposure brightness of the exposure parameter are superimposed to obtain the image brightness in the camera
  • the expected value of -4EV and -4EV is -8EV
  • -4EV and 4EV is superimposed as 0EV, then within the range of the expected value [-8EV, 0EV], the first frame metering is successful.
  • the exposure test may not be continued.
  • the real ambient brightness is in the range of [+4, +12]EV
  • the exposure parameter in the first frame of exposure is -12EV
  • the current ambient brightness and the exposure brightness of the exposure parameter are superimposed to get the camera.
  • the expected value of the picture brightness that is, the superposition of 4EV and -12EV is -8EV
  • the superposition of -12EV and 12EV is 0EV, if it is within the range of the expected value [-8EV, 0EV]
  • the second frame metering is successful.
  • the third frame metering is successful.
  • the range that can be successfully metered is -12EV to 12EV, reaching 24EV, which is higher than the brightness range that the camera can encounter in outdoor natural conditions, and the data of the successful exposure test can be obtained. If the ambient light brightness exceeds This range can be handled by exception.
  • step S5 after determining the first brightness corresponding to the successful exposure, calculation needs to be performed according to the first brightness to obtain an actual exposure parameter that is closer to the current ambient brightness, thereby making the exposure brightness different from the current ambient brightness Smaller and better for taking pictures.
  • the calculation is performed by an iterative method, so that the actual exposure parameter is closer to the expected value of the brightness, so that the The error between the actual exposure parameter and the expected value of the brightness is within a set error threshold.
  • the actual exposure parameter can be wirelessly approached to the expected value of the brightness through an iterative method.
  • the exposure amount in the first exposure parameter is A
  • the exposure amount setting of the actual exposure parameter is determined according to the product of the ratio of A to image exposure brightness and the expected value .
  • the exposure amount in the first exposure parameter is A
  • the exposure amount of the actual exposure parameter is set according to the ratio of A to the average brightness of all pixels in the image and the expected value The product is determined.
  • the picture displayed by the camera is fixed to prevent discomfort to the user's vision, for example, the picture displayed by the camera is locked as the first exposure time screen.
  • the brightness sequence is [-4EV, -12EV, +4EV]
  • the difference between brightness and darkness is very large.
  • the picture displayed by the camera is the picture of the real exposure brightness at that time, which will cause the visual flickering and cause stimulation, so by fixing the picture, the user can have a better experience.
  • step S5 in each step from step S1 to step S5, the data generated when each instruction is executed, including the historical brightness data, are stored in the storage medium, so that the user can find it when needed. .
  • the storage medium is a local storage medium in the camera.
  • the local storage medium may include various forms of computer-readable storage medium, such as volatile memory and/or non-volatile memory.
  • the volatile memory may include, for example, random access memory (RAM) and/or cache memory, or the like.
  • the non-volatile memory may include, for example, read-only memory
  • ROM read-only memory
  • hard disk hard disk
  • flash memory etc.
  • One or more computer program instructions may be stored on the camera-readable storage medium, and the program instructions may be executed to implement various steps in the foregoing embodiments of the present application.
  • Various application programs and various data such as various data used and/or generated by the application program, may also be stored in the camera-readable storage medium.
  • the present application also provides a storage medium, where program instructions are stored on the storage medium, and when the program instructions are run by a computer or a processor, the program instructions are used to execute the corresponding steps from step S1 to step S5 in the embodiment of the present application. operate.
  • the storage medium may include, for example, a memory card of a camera, a storage unit of a tablet computer, a hard disk of a personal computer, a read only memory (ROM), an erasable programmable read only memory (EPROM), a portable compact disk read only memory ( CD-ROM), USB memory, or any combination of the above storage media.
  • the computer-readable storage medium can be any combination of one or more computer-readable storage media.
  • the disclosed apparatus and method may be implemented in other manners.
  • the device embodiments described above are only illustrative.
  • the division of the units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components may be combined or May be integrated into another device, or some features may be omitted, or not implemented.
  • Various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof.
  • a microprocessor or a digital signal processor (DSP) may be used in practice to implement some or all of the functions of some modules according to the embodiments of the present invention.
  • DSP digital signal processor
  • the present invention may also be implemented as apparatus programs (eg, computer programs and computer program products) for performing part or all of the methods described herein.
  • Such a program implementing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals. Such signals may be downloaded from Internet sites, or provided on carrier signals, or in any other form.

Abstract

Provided are a fast auto-exposure method for a camera and a storage medium. The method comprises: according to historical brightness data of prior camera exposures, predicting the ambient brightness the next time a camera is started up; according to the predicted ambient brightness, setting a brightness sequence for performing exposure testing, and, according to the brightness sequence, setting within the camera an exposure parameter corresponding to the brightness sequence; after the camera is started up, sequentially performing exposure according to the set exposure parameter, and obtaining corresponding images; determining, according to the images obtained by exposure, whether exposure testing is successful, and obtaining a first exposure parameter corresponding to successful exposure testing; and calculating an actual exposure parameter according to the first exposure parameter so as to perform photographing. By means of the described method, the time spent on the whole process from camera startup to completing photographing can be controlled within 1S, reaching an industry-leading level.

Description

一种相机快速自动曝光的方法以及存储介质A method for fast automatic exposure of a camera and a storage medium 技术领域technical field
本发明总地涉及相机领域,更具体地涉及一种相机快速自动曝光的方法以及存储介质。The present invention generally relates to the field of cameras, and more particularly, to a method for rapid automatic exposure of a camera and a storage medium.
背景技术Background technique
相机在使用中,需要对曝光的亮度进行调节。自动曝光根据场景亮度使用恰当的曝光参数,避免成像过曝或过暗。通常通过自动曝光进行曝光测试收敛以得到最佳的拍着亮度。When the camera is in use, the brightness of the exposure needs to be adjusted. Auto exposure uses the appropriate exposure parameters according to the brightness of the scene to avoid overexposed or dark images. Exposure test convergence is usually performed by automatic exposure to get the best shot brightness.
由于从相机启动后到自动曝光(AE)进行曝光测试收敛需要消耗很长时间,例如在很多应用场景中需要15-40帧,可以预知如果相机启动后等AE收敛完毕,再执行拍照,耗时将很长。Since it takes a long time for the exposure test to converge from the start of the camera to the automatic exposure (AE), for example, it takes 15-40 frames in many application scenarios. will be very long.
对于一些高速运动的场景,相机未拍摄时处于待机节能的状态(相机传感器不出图,图像信号处理(Image Signal Processing,ISP)不工作),用户要求在按下拍照按钮后能够很快完成拍照,快速捕捉精彩瞬间,但目前相机从启动到完成自动曝光耗时太长,无法实现上述目标。For some high-speed motion scenes, the camera is in a standby energy-saving state when it is not shooting (the camera sensor does not take pictures, and the Image Signal Processing (ISP) does not work). , to quickly capture wonderful moments, but the current camera takes too long from startup to complete auto exposure to achieve the above goals.
因此,需要对目前的自动曝光方法进行改进,以克服上述问题。Therefore, the current automatic exposure method needs to be improved to overcome the above problems.
发明内容SUMMARY OF THE INVENTION
为了解决上述问题中的至少一个而提出了本发明。本发明第一方面提供了一种相机快速自动曝光的方法,所述方法包括:The present invention has been made to solve at least one of the above-mentioned problems. A first aspect of the present invention provides a method for fast automatic exposure of a camera, the method comprising:
根据相机之前曝光的历史亮度数据,预测下一次相机启动时的环境亮度;According to the historical brightness data of the previous exposure of the camera, predict the ambient brightness when the camera is activated next time;
根据预测的所述环境亮度设置用于进行曝光测试的亮度序列,并根据所述亮度序列在所述相机内设置与所述亮度序列对应的曝光参数;Setting a brightness sequence for exposure testing according to the predicted ambient brightness, and setting exposure parameters corresponding to the brightness sequence in the camera according to the brightness sequence;
相机启动后,按照设置的所述曝光参数依次进行曝光并得到对应的图像;After the camera is started, exposure is performed in sequence according to the set exposure parameters and corresponding images are obtained;
根据曝光得到的图像判断曝光测试是否成功,并得到曝光测试成功对应的第一曝光参数;Determine whether the exposure test is successful according to the image obtained by the exposure, and obtain the first exposure parameter corresponding to the successful exposure test;
根据所述第一曝光参数计算实际曝光参数,以用于进行拍照。Actual exposure parameters are calculated according to the first exposure parameters for taking pictures.
本发明的第二方面提供了一种存储介质,所述存储介质上存储有计算机程序,所述计算机程序在运行时执行如前文所述的方法。A second aspect of the present invention provides a storage medium on which a computer program is stored, and the computer program executes the aforementioned method when running.
本发明提供了一种相机快速自动曝光的方法,在所述方法中首先在相机启动之前,对相机启动时的环境亮度进行预测,并根据环境亮度设置用于进行曝光测试的亮度序列,在得到曝光图像之前依次对设置的亮度序列对应的曝光参数进行曝光,最后得到实际曝光参数,通过所述方法可以缩短相机启动后自动曝光拍照所消耗时间,解决当前产品从启动到完成自动曝光耗时太长的问题。通过所述方法可以使相机启动到完成拍照整个流程耗时能控制在1S内,达到业界领先水平。The invention provides a method for fast automatic exposure of a camera. In the method, before the camera is started, the environment brightness when the camera is started is predicted, and the brightness sequence used for exposure test is set according to the environment brightness. Before exposing the image, the exposure parameters corresponding to the set brightness sequence are sequentially exposed, and finally the actual exposure parameters are obtained. The method can shorten the time consumed by automatic exposure and photographing after the camera is started, and solve the problem that the current product takes too much time from starting to completing automatic exposure. long question. Through the method, the time-consuming and energy-consuming of the entire process from the start of the camera to the completion of taking pictures can be controlled within 1S, which reaches the industry-leading level.
附图说明Description of drawings
图1示出本发明提供的相机快速自动曝光的方法的流程示意图;1 shows a schematic flowchart of a method for fast automatic exposure of a camera provided by the present invention;
图2示出本发明一实施例中提供的相机快速自动曝光的方法的示意性框图。FIG. 2 shows a schematic block diagram of a method for fast automatic exposure of a camera provided in an embodiment of the present invention.
具体实施方式Detailed ways
为了使得本发明的目的、技术方案和优点更为明显,下面将参照附图详细描述根据本发明的示例实施例。显然,所描述的实施例仅仅是本发明的一部分实施例,而不是本发明的全部实施例,应理解,本发明不受这里描述的示例实施例的限制。基于本发明中描述的本发明实施例,本领域技术人员在没有付出创造性劳动的情况下所得到的所有其它实施例都应落入本发明的保护范围之内。In order to make the objects, technical solutions and advantages of the present invention more apparent, exemplary embodiments according to the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only some of the embodiments of the present invention, not all of the embodiments of the present invention, and it should be understood that the present invention is not limited by the example embodiments described herein. Based on the embodiments of the present invention described in the present invention, all other embodiments obtained by those skilled in the art without creative efforts shall fall within the protection scope of the present invention.
在下文的描述中,给出了大量具体的细节以便提供对本发明更为彻底的理解。然而,对于本领域技术人员而言显而易见的是,本发明可以无需一个或多个这些细节而得以实施。在其他的例子中,为了避免与本发明发生混淆,对于本领域公知的一些技术特征未进行描述。In the following description, numerous specific details are set forth in order to provide a more thorough understanding of the present invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced without one or more of these details. In other instances, some technical features known in the art have not been described in order to avoid obscuring the present invention.
应当理解的是,本发明能够以不同形式实施,而不应当解释为局限于 这里提出的实施例。相反地,提供这些实施例将使公开彻底和完全,并且将本发明的范围完全地传递给本领域技术人员。It should be understood that the present invention may be embodied in different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
在此使用的术语的目的仅在于描述具体实施例并且不作为本发明的限制。在此使用时,单数形式的“一”、“一个”和“所述/该”也意图包括复数形式,除非上下文清楚指出另外的方式。还应明白术语“组成”和/或“包括”,当在该说明书中使用时,确定所述特征、整数、步骤、操作、元件和/或部件的存在,但不排除一个或更多其它的特征、整数、步骤、操作、元件、部件和/或组的存在或添加。在此使用时,术语“和/或”包括相关所列项目的任何及所有组合。The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used herein, the singular forms "a," "an," and "the/the" are intended to include the plural forms as well, unless the context clearly dictates otherwise. It should also be understood that the terms "compose" and/or "include", when used in this specification, identify the presence of stated features, integers, steps, operations, elements and/or components, but do not exclude one or more other The presence or addition of features, integers, steps, operations, elements, parts and/or groups. As used herein, the term "and/or" includes any and all combinations of the associated listed items.
为了彻底理解本发明,将在下列的描述中提出详细的步骤以及详细的结构,以便阐释本发明提出的技术方案。本发明的较佳实施例详细描述如下,然而除了这些详细描述外,本发明还可以具有其他实施方式。For a thorough understanding of the present invention, detailed steps and detailed structures will be proposed in the following description to explain the technical solutions proposed by the present invention. Preferred embodiments of the present invention are described in detail below, however, the present invention may have other embodiments in addition to these detailed descriptions.
为了解决前述问题,本发明的第一方面提供了相机快速自动曝光的方法,如图1所示,所述方法包括:In order to solve the aforementioned problems, a first aspect of the present invention provides a method for fast automatic exposure of a camera, as shown in FIG. 1 , the method includes:
步骤S1:根据相机之前曝光的历史亮度数据,预测下一次相机启动时的环境亮度;Step S1: Predict the ambient brightness when the camera is activated next time according to the historical brightness data exposed by the camera before;
步骤S2:根据预测的所述环境亮度设置用于进行曝光测试的亮度序列,并根据所述亮度序列在所述相机内设置与所述亮度序列对应的曝光参数;Step S2: setting a brightness sequence for exposure testing according to the predicted ambient brightness, and setting exposure parameters corresponding to the brightness sequence in the camera according to the brightness sequence;
步骤S3:相机启动后,按照设置的所述曝光参数依次进行曝光并得到对应的图像;Step S3: After the camera is started, exposure is performed in sequence according to the set exposure parameters and corresponding images are obtained;
步骤S4:根据曝光得到的图像判断曝光测试是否成功,并得到曝光测试成功对应的第一曝光参数;Step S4: judging whether the exposure test is successful according to the image obtained by the exposure, and obtaining the first exposure parameter corresponding to the successful exposure test;
步骤S5:根据所述第一曝光参数计算实际曝光参数,以用于进行拍照。Step S5: Calculate actual exposure parameters according to the first exposure parameters, so as to be used for taking pictures.
下面结合附图2对所述制备方法进行详细的说明,其中,图2示出本发明一实施例中提供的相机快速自动曝光的方法的示意性框图。The preparation method will be described in detail below with reference to FIG. 2 , wherein FIG. 2 shows a schematic block diagram of a method for fast automatic exposure of a camera provided in an embodiment of the present invention.
需要说明的是,本申请所述快速自动曝光的方法可适用于所有类型的数码相机,并不局限于某一种,例如所述相机可以为运动相机,运动相机的用户需要快速启动拍照,对相机启动到执行拍照的时间敏感。所述相机 还可以为专业相机,其中专业相机中更快的自动曝光,意味着消耗更少电量,增加待机时间。在超长间隔时间的延时摄影中,能有效增加待机时间。It should be noted that the fast automatic exposure method described in this application can be applied to all types of digital cameras, and is not limited to a certain one. For example, the camera can be a motion camera. The time from camera startup to taking a picture is sensitive. The camera may also be a professional camera, wherein faster automatic exposure in a professional camera means less power consumption and increased standby time. In the time-lapse photography with super long interval time, it can effectively increase the standby time.
此外,除了应用于相机领域,本申请的所述自动曝光方法还可以应用于所有需要启动后快速曝光的应用场景。下面以相机为例对本申请所述自动曝光方法进行详细的说明。In addition, in addition to being applied to the camera field, the automatic exposure method of the present application can also be applied to all application scenarios that require quick exposure after startup. The automatic exposure method described in the present application will be described in detail below by taking a camera as an example.
在所述步骤S1中,在常规的自动曝光方法中通常直接进行曝光测试的收敛,进而获得最佳曝光亮度,其耗时过长,在本申请的所述自动曝光方法中,在相机启动之前,首先根据相机之前曝光的历史亮度数据,预测下一次相机启动时的环境亮度并存储于相机中,以避免曝光参数的设置与当前环境亮度相差过大,导致自动曝光时间过长的问题。In the step S1, in the conventional automatic exposure method, the convergence of the exposure test is usually directly performed to obtain the optimal exposure brightness, which takes too long. In the automatic exposure method of the present application, before the camera is started , First, according to the historical brightness data of the previous exposure of the camera, the ambient brightness when the camera is started next time is predicted and stored in the camera, so as to avoid the problem that the exposure parameter setting is too different from the current ambient brightness, resulting in a long automatic exposure time.
具体地,在自动曝光过程中,如果曝光参数预设高了,相机画面中很多过曝,自动曝光(AE)无法判断场景有多亮,测光失败。如果曝光参数设置低了,画面暗部很多,自动曝光(AE)统计值受到暗电流和噪声影响,同样会测光失败。Specifically, in the automatic exposure process, if the exposure parameter is preset to a high value, there will be a lot of overexposure in the camera picture, and the automatic exposure (AE) cannot judge how bright the scene is, and the metering fails. If the exposure parameter is set low, there will be many dark parts of the screen, and the automatic exposure (AE) statistics will be affected by dark current and noise, and the metering will also fail.
在本申请中所述方法利用环境亮度变化的规律,通过拟合历史亮度数据,预测下一次相机启动时的环境亮度,进而如果第一帧的曝光参数设置合理,通过一帧就可以完成自动曝光AE的曝光测试,从而减少曝光测试的时间,进而获得更快速的获得的实际曝光参数,缩短相机启动后自动曝光拍照所消耗时间。The method described in this application makes use of the law of changes in ambient brightness, and by fitting historical brightness data, to predict the ambient brightness when the camera is activated next time, and then if the exposure parameters of the first frame are set properly, automatic exposure can be completed in one frame. The exposure test of AE can reduce the time of exposure test, and then obtain the actual exposure parameters obtained more quickly, and shorten the time consumed by automatic exposure and photography after the camera is started.
其中,所述历史亮度数据是指在相机每次拍完照,进入待机前,会将相机之前曝光的历史亮度进行拟合,以得到历史亮度数据。其中,所述拟合是指将所述相机之前曝光的历史亮度和与所述历史亮度所对应的参数进行拟合,其中,所述历史亮度所对应的参数包括时间和/或位置。Wherein, the historical brightness data refers to fitting the historical brightness previously exposed by the camera to obtain historical brightness data after each time the camera takes a photo and before entering standby. The fitting refers to fitting the historical brightness previously exposed by the camera to a parameter corresponding to the historical brightness, wherein the parameter corresponding to the historical brightness includes time and/or position.
在本申请的一实施例中,将进行曝光亮度和曝光时的时间进行拟合时,以时间为横坐标,以相应的曝光亮度为纵坐标建立时间-曝光亮度的点集或曲线,以获得所述历史亮度数据。In an embodiment of the present application, when fitting exposure brightness and exposure time, a time-exposure brightness point set or curve is established with the time as the abscissa and the corresponding exposure brightness as the ordinate, so as to obtain the historical luminance data.
在本申请的另一实施例中,将进行曝光亮度和曝光时的地点进行拟合时,以地点为横坐标,以相应的曝光亮度为纵坐标建立地点-曝光亮度的点集或曲线,以获得所述历史亮度数据。其中,所述地点可以根据GPS等方式获得,在此不做限定。In another embodiment of the present application, when fitting the exposure brightness and the location during exposure, take the location as the abscissa and the corresponding exposure brightness as the ordinate to establish a location-exposure brightness point set or curve, with Obtain the historical luminance data. Wherein, the location can be obtained according to GPS or other means, which is not limited herein.
此外,还可以将曝光亮度、曝光时的时间、曝光时的地点进行拟合,以得到三维的曲面。In addition, it is also possible to fit the exposure brightness, exposure time, and exposure location to obtain a three-dimensional curved surface.
其中,在进行数据拟合采样时,可以对采样时间间隔进行设置,如采样时间大于某个阈值(比如5S),将采集的数据进行拟合,以预测下一次开机时的环境亮度。Among them, when performing data fitting and sampling, the sampling time interval can be set. If the sampling time is greater than a certain threshold (for example, 5S), the collected data is fitted to predict the ambient brightness when the next startup is turned on.
其中,对于采样数据进行拟合的方法可以为三次样条拟合,在本申请中采样结果为根据观测得到的一些数据,即平面上的一些离散点,绘制出一条近似曲线,这些离散点称为控制点。在进行拟合时要求曲线不一定通过所有控制点,而是以某种方式逼近这些点,以得到拟合曲线。Among them, the method of fitting the sampling data can be cubic spline fitting. In this application, the sampling result is to draw an approximate curve according to some data obtained by observation, that is, some discrete points on the plane. These discrete points are called for the control point. When fitting, it is required that the curve does not necessarily pass through all control points, but approximates these points in some way to obtain the fitted curve.
具体地,在采样之后进行构造拟合曲线,除了最小二乘法以外,在本申请中还可以使用分段拟合的方法,即在每一段内,用低次多项式作为该段的拟合曲线,而且这些分段多项式曲线在分界点还具有一定的光滑性,以进行样条拟合,通过样条即可根据给定的控制点绘出上述时间-曝光亮度或时间-曝光地点等光滑的曲线。Specifically, a fitting curve is constructed after sampling. In addition to the least squares method, a piecewise fitting method can also be used in this application, that is, in each segment, a low-order polynomial is used as the fitting curve of the segment, Moreover, these piecewise polynomial curves also have a certain degree of smoothness at the demarcation point for spline fitting. Through the spline, the above-mentioned time-exposure brightness or time-exposure location and other smooth curves can be drawn according to the given control points. .
在本申请的一实施例中,如图2所示,在相机上一次使用的过程中已经将曝光亮度以及对应的参数,以及拟合后得到的历史亮度数据存储于所述相机中,进而预测下一次相机启动时的环境亮度。In an embodiment of the present application, as shown in FIG. 2 , the exposure brightness and corresponding parameters, as well as the historical brightness data obtained after fitting, have been stored in the camera during the last use of the camera, and then predicted The ambient brightness the next time the camera starts up.
其中,在本申请中,在得到相机之前曝光的历史亮度数据之后,根据所述历史亮度数据预测下一次拍摄时的环境亮度。具体地,所述方法包括根据在下一次拍摄时的参数结合所述历史亮度数据,预测下一次拍摄时的环境亮度。Wherein, in the present application, after obtaining the historical brightness data previously exposed by the camera, the environmental brightness in the next shooting is predicted according to the historical brightness data. Specifically, the method includes predicting the ambient brightness at the next shooting according to the parameters at the next shooting in combination with the historical brightness data.
例如在本申请的一实施例中,在下一次拍摄时可以获取拍摄的时间,然后根据所述时间-曝光亮度的点集或曲线,在所述点集或曲线上获得与所述时间对应的亮度,作为所述下一次拍摄时的环境亮度。For example, in an embodiment of the present application, the shooting time can be obtained in the next shooting, and then according to the time-exposure brightness point set or curve, the brightness corresponding to the time can be obtained on the point set or curve , as the ambient brightness for the next shooting.
在本申请的另一实施例中,在下一次拍摄时可以获取拍摄的地点,然后根据所述地点-曝光亮度的点集或曲线,在所述点集或曲线上获得与所述地点对应的亮度,作为所述下一次拍摄时的环境亮度。In another embodiment of the present application, the shooting location may be acquired during the next shooting, and then, according to the location-exposure brightness point set or curve, the brightness corresponding to the location is obtained on the point set or curve , as the ambient brightness for the next shooting.
此外,由于相机使用在一段时间内具有连续性,因此本次使用和上一次使用的环境大概率是相同的,因此为了加快曝光速度,可以根据所述相机最后一次的曝光亮度直接作为下一次拍摄时的环境亮度进行曝光。In addition, since the use of the camera is continuous within a period of time, the probability of the current use and the previous use is the same. Therefore, in order to speed up the exposure speed, the last exposure brightness of the camera can be directly used as the next shot. Exposure at ambient brightness.
所述步骤S2中,在相机启动之前,根据所述步骤S1中预测的所述环境亮度设置用于进行曝光测试的亮度序列,其中,所述亮度序列是指一些列的环境亮度,以在后续的步骤中根据亮度序列在所述相机内设置与所述亮度序列对应的曝光参数。In the step S2, before the camera is started, the brightness sequence used for the exposure test is set according to the ambient brightness predicted in the step S1, wherein the brightness sequence refers to a series of ambient brightness to be used in the subsequent steps. In the step, exposure parameters corresponding to the brightness sequence are set in the camera according to the brightness sequence.
其中,根据预测的所述环境亮度在所述相机内设置用于进行曝光测试的亮度序列的方法包括:以小于预测的所述环境亮度的一亮度为中心,以固定的幅度进行递增和递减,以得到大于所述预测的所述环境亮度,预测的所述环境亮度以及小于预测的所述环境亮度的亮度序列。Wherein, the method for setting a brightness sequence for exposure testing in the camera according to the predicted ambient brightness includes: centering on a brightness smaller than the predicted ambient brightness, increasing and decreasing with a fixed amplitude, to obtain the ambient brightness greater than the predicted, the predicted ambient brightness and the brightness sequence less than the predicted ambient brightness.
在本申请的一实施例中,如图2所示,在所述步骤S1中预测的所述环境亮度为0EV,则以小于预测的0EV的一亮度为中间数,例如以-4EV为中间数,以8EV为以固定的幅度进行递增和递减,增加8EV,得到4EV的环境亮度,减小8EV,得到-12EV的环境亮度,得到的环境亮度序列为(-4EV,4EV,-12EV)。In an embodiment of the present application, as shown in FIG. 2 , the ambient brightness predicted in the step S1 is 0EV, and a brightness smaller than the predicted 0EV is used as the intermediate number, for example, -4EV is used as the intermediate number , Increment and decrement with 8EV as a fixed range, increase 8EV, get 4EV ambient brightness, decrease 8EV, get -12EV ambient brightness, the obtained ambient brightness sequence is (-4EV, 4EV, -12EV).
其中,所述亮度序列中设置的亮度的数目不超过10个。例如,在本申请的一实施例中,所述亮度序列中设置的亮度的数目为3个。所述亮度序列中设置的亮度的数目并不局限于上述示例,可以根据实际需要进行选择。Wherein, the number of brightnesses set in the brightness sequence does not exceed 10. For example, in an embodiment of the present application, the number of brightnesses set in the brightness sequence is three. The number of brightnesses set in the brightness sequence is not limited to the above example, and can be selected according to actual needs.
具体地,所述亮度序列中设置的亮度的数目与所述相机曝光后生成图像的滞后时间相关,若曝光N帧之后得到第一组曝光生成的图像,则所述亮度序列中设置的亮度的数目为N-1,即在得到第一组曝光生成的图像之后即可停止曝光测试,此时,已经进行曝光了N-1组数据,当然该亮度序列中亮度的数目的设置也是示例性的。Specifically, the number of brightnesses set in the brightness sequence is related to the lag time of images generated by the camera after exposure. If the images generated by the first group of exposures are obtained after N frames of exposure, the brightness set in the brightness sequence is The number is N-1, that is, the exposure test can be stopped after obtaining the images generated by the first set of exposures. At this time, N-1 sets of data have been exposed. Of course, the setting of the number of brightness in the brightness sequence is also exemplary. .
在本申请中自动曝光过程中不管曝光的图像是否生成都继续进行曝光,而不是目前所述方法中每次曝光、得到曝光图像、进行曝光检测,在本申请中每次曝光结束后,驱使相机立即进入下一次曝光,不受帧率的影响,不等图像生成,通过所述设置曝光测试所耗时间更短。In the automatic exposure process in the present application, the exposure is continued regardless of whether the exposed image is generated or not, instead of each exposure, obtaining the exposure image, and performing the exposure detection in the current method, in the present application, after each exposure is completed, the camera is driven to Immediately enter the next exposure, not affected by the frame rate, without waiting for the image to be generated, and it takes less time to pass the set exposure test.
其中,在所述步骤S2中根据所述亮度序列中的各个亮度在所述相机内设置与所述亮度对应的曝光参数,其中,设置所述曝光参数的方式包括快门、光圈(值)大小、感光度(ISO)等。Wherein, in the step S2, exposure parameters corresponding to the brightness are set in the camera according to each brightness in the brightness sequence, wherein the methods of setting the exposure parameters include shutter, aperture (value) size, Sensitivity (ISO), etc.
其中,快门速度是快门打开到关闭的时间,快门速度数值小,快门打 开着的时间少,进来的光的量就少,被感光元件读取的光量也少;相反,快门速度数值大,则被感光元件读取的光量也多。快门速度一般为1/100s、1/30s、2s。Among them, the shutter speed is the time from the shutter opening to closing. The smaller the shutter speed value, the less time the shutter is open, the less the amount of incoming light, and the less the amount of light read by the photosensitive element; on the contrary, the larger the shutter speed value, the less the amount of light coming in. The amount of light read by the photosensitive element is also large. Shutter speed is generally 1/100s, 1/30s, 2s.
其中,光圈(值)在相机镜头里边有很多镜片,光线是可以贯通到底的,而藏在镜头某个位置的多片金属叶片(收拢之后)则能在镜头上控制光线进入的量。光圈叶片围出来的这个光线能进去的圆孔开的大,进光量就多;相反,光圈小,进光量则少。Among them, the aperture (value) has many lenses in the camera lens, and the light can penetrate to the end, and the multiple metal blades (after being folded) hidden in a certain position of the lens can control the amount of light entering on the lens. The larger the circular hole that the light surrounded by the aperture blade can enter, the more light will enter; on the contrary, the smaller the aperture, the less light will enter.
其中,感光度,也称ISO,即感光元件对光线的敏感程度:感光度高的,对光敏感,给一点光线,感光元件也能感受到并且曝光充足;感光度低的,需要提高感光度。Among them, the sensitivity, also known as ISO, is the sensitivity of the photosensitive element to light: if the sensitivity is high, it is sensitive to light. If you give a little light, the photosensitive element can also feel it and the exposure is sufficient; if the sensitivity is low, you need to increase the sensitivity. .
通过调节相机中快门、光圈(值)大小、感光度(ISO)中的一种或多种来设置所述曝光参数,以在曝光过程中使曝光的亮度等于设置的亮度序列中的所述亮度。The exposure parameters are set by adjusting one or more of shutter, aperture (value) size, and light sensitivity (ISO) in the camera, so that the brightness of the exposure during the exposure process is equal to the brightness in the set brightness sequence .
在所述步骤S3中,在相机启动之前,在所述步骤S1和所述步骤S2中已经设置好了曝光参数,在相机启动之后,则按照一定的顺序对设置好的所述曝光参数依次进行曝光即可,曝光之后得到相应的图像。In the step S3, before the camera is started, the exposure parameters have been set in the steps S1 and S2, and after the camera is started, the set exposure parameters are sequentially performed in a certain order. Exposure is enough, and the corresponding image is obtained after exposure.
其中,所述曝光、生成图像的方法与常规的方法相同,在此不再赘述。The methods for exposing and generating images are the same as the conventional methods, and are not repeated here.
在本申请的一实施例中,如图2所示,在所述亮度序列中设置有3个亮度序列,分别对所述三个亮度序列进行曝光,进而得到第一帧、第二帧和第三帧曝光得到的图像。In an embodiment of the present application, as shown in FIG. 2 , three brightness sequences are set in the brightness sequence, and the three brightness sequences are respectively exposed to obtain the first frame, the second frame and the third brightness sequence. Images obtained from three exposures.
在所述步骤S4中,根据所述步骤S3中得到的图像,进行曝光测试,即验证所述亮度序列中的是否有哪个亮度符合曝光要求,以作为曝光测试成功对应的第一曝光参数。In the step S4, an exposure test is performed according to the image obtained in the step S3, that is, it is verified whether any luminance in the luminance sequence meets the exposure requirement, as the first exposure parameter corresponding to the successful exposure test.
在本申请中判断所述曝光测试是否成功的方法时,需要首先获得两个数据,一个是对当前的环境亮度的表征,另一个是对实际曝光过程中亮度的表征,并将两者进行比较。In the method for judging whether the exposure test is successful in this application, it is necessary to first obtain two data, one is the characterization of the current ambient brightness, and the other is the characterization of the brightness in the actual exposure process, and the two are compared. .
在本申请的一实施例中,所述当前的环境亮度的表征可以为根据当前的环境亮度,计算出相机中画面亮度的预期值。In an embodiment of the present application, the representation of the current ambient brightness may be an expected value of the image brightness in the camera calculated according to the current ambient brightness.
在本申请的一实施例中,可以通过对曝光后得到的图像中的像素进行统计,以得到图像曝光亮度;其中,所述图像曝光亮度可以为统计曝光后得到的图像中的所有像素的平均亮度,还可以为曝光后得到的图像中特定区域的亮度,例如还可以为曝光后得到的图像的中心区域的亮度,其中,所述图像曝光亮度的测定可以根据实际的需求和目的进行设置,并不局限于上述示例。In an embodiment of the present application, the image exposure brightness can be obtained by performing statistics on the pixels in the image obtained after exposure; wherein, the image exposure brightness can be the average of all pixels in the image obtained after statistical exposure. The brightness can also be the brightness of a specific area in the image obtained after exposure, for example, it can also be the brightness of the central area of the image obtained after exposure, wherein the measurement of the exposure brightness of the image can be set according to actual needs and purposes, Not limited to the above examples.
在判断曝光测试是否成功时,需要将所述预期值和所述图像曝光亮度判断曝光测试进行比较,在比较过程中存在两种情况,即曝光不足和曝光过度的情况,下面针对每种情况进行详细的说明。When judging whether the exposure test is successful, it is necessary to compare the expected value with the image exposure brightness judgment exposure test. There are two situations in the comparison process, namely underexposure and overexposure. The following is for each situation. Detailed explanation.
第一种,当曝光不足时,所述图像曝光亮度小于或等于所述亮度的预期值,此时,在曝光图像中存在暗部,当所述曝光图像中暗部的数目占比不是太多则曝光测试成功。具体地,所述图像中暗部的数目小于设定暗部阈值,则曝光测试成功。其中,所述设定暗部阈值可以根据实际需要进行设定,例如可以设定图像中暗部的像素点的阈值数,当图像中实际为暗部的像素点小于或等于所述像素点的阈值数,则认定为曝光测试成功。First, when the exposure is insufficient, the exposure brightness of the image is less than or equal to the expected value of the brightness. At this time, there are dark parts in the exposed image. When the number of dark parts in the exposed image does not account for too much, the exposure Test success. Specifically, if the number of dark parts in the image is less than the set dark part threshold, the exposure test is successful. Wherein, the set dark part threshold can be set according to actual needs. For example, the threshold number of pixels in the dark part in the image can be set. When the actual dark part in the image is less than or equal to the threshold number of pixels, The exposure test is deemed successful.
在本申请的一实施例中,根据预设曝光参数产生的统计值,通过所述统计值可以获得所述图像中所有像素的平均亮度。当所述图像中所有像素的平均亮度小于或等于所述亮度的预期值,并且图像中暗部的数目小于设定暗部阈值,则曝光测试成功。In an embodiment of the present application, according to a statistical value generated by a preset exposure parameter, the average brightness of all pixels in the image can be obtained through the statistical value. When the average brightness of all pixels in the image is less than or equal to the expected value of brightness, and the number of dark parts in the image is less than the set dark part threshold, the exposure test is successful.
第二种,当过度曝光时,所述图像曝光亮度大于所述亮度的预期值,此时,在曝光图像中存在亮部,当所述曝光图像中亮部的数目占比不是太多则曝光测试成功。具体地,所述图像中亮部的数目小于设定亮部阈值,则曝光测试成功。其中,所述设定亮部阈值可以根据实际需要进行设定,例如可以设定图像中亮部的像素点的阈值数,当图像中实际为亮部的像素点小于或等于所述像素点的阈值数,则认定为曝光测试成功。Second, when overexposed, the exposure brightness of the image is greater than the expected value of the brightness, at this time, there are bright parts in the exposed image, and when the number of bright parts in the exposed image does not account for too much, the exposure Test success. Specifically, if the number of bright parts in the image is less than the set bright part threshold, the exposure test is successful. The threshold value of the bright part can be set according to actual needs, for example, the threshold number of the pixels in the bright part in the image can be set. If the threshold number is exceeded, the exposure test is considered to be successful.
在过度曝光时,由于自动曝光中不知道过度曝光的像素究竟有多亮,不清楚降低多少曝光参数这些过度曝光像素才不会过曝,所以无法准确测光,因此需要严格控制所述图像中亮部的数目小于设定亮部阈值以保证所述曝光亮度符合要求。In the case of overexposure, since it is not known how bright the overexposed pixels are in automatic exposure, and it is unclear how much the exposure parameters are lowered so that these overexposed pixels will not be overexposed, accurate metering cannot be performed, so it is necessary to strictly control the The number of bright parts is less than the set bright part threshold to ensure that the exposure brightness meets the requirements.
在本申请的一实施例中,根据预设曝光参数产生的统计值,通过所述 统计值可以获得所述图像中所有像素的平均亮度。当所述图像中所有像素的平均亮度大于所述亮度的预期值,并且图像中亮部的数目小于设定亮部阈值,则曝光测试成功。In an embodiment of the present application, according to a statistical value generated by a preset exposure parameter, the average brightness of all pixels in the image can be obtained through the statistical value. When the average brightness of all pixels in the image is greater than the expected value of the brightness, and the number of bright parts in the image is less than the set bright part threshold, the exposure test is successful.
在本申请中按照顺序依次对曝光得到的图像进行判断,以判断所述曝光参数的曝光测试是否成功,并且在获得曝光测试成功的结果之后停止,不再对后续没有判断的曝光图像进行判断。若所有所述曝光参数得到的图像均曝光测试失败时,则进行异常处理。In the present application, the images obtained by exposure are judged in order to judge whether the exposure test of the exposure parameters is successful, and stop after obtaining the result of the successful exposure test, and no subsequent exposure images that have not been judged are judged. If all the images obtained by the exposure parameters fail the exposure test, abnormal processing will be performed.
在本申请的一实施例中,如图2所示,在本申请中所述曝光生成图像的延迟为4帧,设置的亮度序列中包含3个亮度,依次进行曝光之后分别得到3帧图像,分别为第一帧图形、第二帧图像和第三帧图像,分别对所述3帧图像进行曝光测试,首先对第一帧曝光图像进行曝光测试判断,若第一帧图像中曝光测试成功,则停止继续曝光测试的检测,第一帧曝光对应的曝光阐述则为所述第一亮度,可用于后续实际亮度的计算。In an embodiment of the present application, as shown in FIG. 2 , the delay of the exposure-generated image described in the present application is 4 frames, the set luminance sequence includes 3 luminances, and after exposure is performed in sequence, 3 frames of images are obtained respectively, The first frame of graphics, the second frame of images, and the third frame of images are respectively the first frame of images, the second frame of images, and the third frame of images, and exposure tests are performed on the three frames of images. Then, the detection of the exposure test is stopped, and the exposure description corresponding to the exposure of the first frame is the first brightness, which can be used for subsequent calculation of the actual brightness.
若第一帧曝光图像中曝光测试失败,则继续对第二帧曝光图像进行曝光测试判断,若第二帧图像中曝光测试成功,则停止继续曝光测试的检测,第二帧曝光对应的曝光阐述则为所述第一亮度,可用于后续实际亮度的计算。If the exposure test in the first frame of exposure image fails, continue to judge the exposure test of the second frame of exposure image, if the exposure test in the second frame of image is successful, stop the continuous exposure test detection, and the exposure corresponding to the second frame of exposure is explained. is the first brightness, which can be used for subsequent calculation of actual brightness.
若第二帧曝光图像中曝光测试失败,则继续对第三帧曝光图像进行曝光测试判断,若第三帧图像中曝光测试成功,则停止继续曝光测试的检测,第三帧曝光对应的曝光阐述则为所述第一亮度,可用于后续实际亮度的计算。If the exposure test in the second frame of exposure image fails, continue to judge the exposure test on the third frame of exposure image. If the exposure test in the third frame of image is successful, stop continuing the exposure test detection, and the exposure corresponding to the third frame of exposure is explained. is the first brightness, which can be used for subsequent calculation of actual brightness.
若第三帧(即所有的曝光图像)图像中曝光测试失败,则说明预测的所述环境亮度以及根据预测所述环境亮度设置的亮度序列与当前环境的亮度不匹配,相差较大,则进行异常处理,例如可以重新设定或增加额外的亮度序列继续进行曝光,或者根据目前情况直接按预设方法估计出一个值来进行曝光。If the exposure test fails in the images of the third frame (that is, all exposed images), it means that the predicted ambient brightness and the brightness sequence set according to the predicted ambient brightness do not match the current ambient brightness, and the difference is large. For exception handling, for example, you can reset or add additional brightness sequences to continue exposure, or directly estimate a value according to the current situation to perform exposure.
在本申请的一实施例中,根据前文所述的曝光测试成功的条件,需要图像曝光亮度适中,根据经验将相机中画面亮度的预期值设置为[-8EV,0EV],即在[-8EV,0EV]之间能够测光成功。In an embodiment of the present application, according to the conditions for the successful exposure test described above, the image exposure brightness needs to be moderate. According to experience, the expected value of the image brightness in the camera is set to [-8EV, 0EV], that is, at [-8EV] ,0EV] can be successfully metered.
设“预估的环境亮度”为0EV,以-4EV为中间数,以8EV为以固定 的幅度进行递增和递减,得到的测光序列为[-4EV,-12EV,+4EV],则:Set the "estimated ambient brightness" as 0EV, take -4EV as the middle number, and take 8EV as the increment and decrement in a fixed range, the resulting metering sequence is [-4EV, -12EV, +4EV], then:
如果当前的环境亮度在[-4,+4]EV范围,在第一帧曝光中的曝光参数为-4EV,则将当前的环境亮度和所述曝光参数的曝光亮度相叠加得到相机中画面亮度的预期值,即-4EV和-4EV叠加为-8EV,-4EV和4EV叠加为0EV,则在所述预期值[-8EV,0EV]的范围内,则第一帧测光成功。当第一帧曝光成功,则可以不再继续进行曝光测试。If the current ambient brightness is in the range of [-4,+4]EV, and the exposure parameter in the first frame of exposure is -4EV, then the current ambient brightness and the exposure brightness of the exposure parameter are superimposed to obtain the image brightness in the camera The expected value of -4EV and -4EV is -8EV, and -4EV and 4EV is superimposed as 0EV, then within the range of the expected value [-8EV, 0EV], the first frame metering is successful. When the exposure of the first frame is successful, the exposure test may not be continued.
同理,如果真实环境亮度在[+4,+12]EV范围,在第一帧曝光中的曝光参数为-12EV,则将当前的环境亮度和所述曝光参数的曝光亮度相叠加得到相机中画面亮度的预期值,即4EV和-12EV叠加为-8EV,-12EV和12EV叠加为0EV,则在所述预期值[-8EV,0EV]的范围内,则第二帧测光成功。In the same way, if the real ambient brightness is in the range of [+4, +12]EV, and the exposure parameter in the first frame of exposure is -12EV, then the current ambient brightness and the exposure brightness of the exposure parameter are superimposed to get the camera. The expected value of the picture brightness, that is, the superposition of 4EV and -12EV is -8EV, and the superposition of -12EV and 12EV is 0EV, if it is within the range of the expected value [-8EV, 0EV], the second frame metering is successful.
同理,如果真实环境亮度在[-12,-4]EV范围,则第三帧测光成功。Similarly, if the real ambient brightness is in the [-12,-4]EV range, the third frame metering is successful.
通过上面三帧测光序列,可以测光成功的范围为-12EV到12EV,达到24EV,比相机在室外自然条件能够遇到亮度范围要高,可以获得曝光测试成功的数据,如果环境光亮度超过这个范围可以按异常处理。Through the above three-frame metering sequence, the range that can be successfully metered is -12EV to 12EV, reaching 24EV, which is higher than the brightness range that the camera can encounter in outdoor natural conditions, and the data of the successful exposure test can be obtained. If the ambient light brightness exceeds This range can be handled by exception.
在所述步骤S5中,在确定曝光成功对应的第一亮度之后,需要根据第一亮度进行计算,以得到与当前环境亮度更加接近的实际曝光参数,进而使曝光亮度与所述当前环境亮度相差更小,更有利于拍照。In the step S5, after determining the first brightness corresponding to the successful exposure, calculation needs to be performed according to the first brightness to obtain an actual exposure parameter that is closer to the current ambient brightness, thereby making the exposure brightness different from the current ambient brightness Smaller and better for taking pictures.
在本申请中根据所述步骤S4中曝光不足和曝光过度两种情况分别进行计算:In this application, the calculation is performed according to the two situations of underexposure and overexposure in the step S4:
第一种,当曝光不足时,即所述图像曝光亮度小于或等于所述亮度的预期值,则通过迭代的方法进行计算,以使所述实际曝光参数更接近所述亮度的预期值,使所述实际曝光参数和所述亮度的预期值之间的误差在设定误差阈值之内。First, when the exposure is insufficient, that is, the exposure brightness of the image is less than or equal to the expected value of the brightness, the calculation is performed by an iterative method, so that the actual exposure parameter is closer to the expected value of the brightness, so that the The error between the actual exposure parameter and the expected value of the brightness is within a set error threshold.
在本申请的一实施例中,可以通过迭代的方法,使所述实际曝光参数无线接近于所述亮度的预期值。In an embodiment of the present application, the actual exposure parameter can be wirelessly approached to the expected value of the brightness through an iterative method.
第二种,当过度曝光时,所述第一曝光参数中的曝光量为A,则所述实际曝光参数的曝光量设置是根据A与图像曝光亮度的比值和所述预期值的乘积确定的。Second, when overexposed, the exposure amount in the first exposure parameter is A, then the exposure amount setting of the actual exposure parameter is determined according to the product of the ratio of A to image exposure brightness and the expected value .
在本申请的一实施例中,所述第一曝光参数中的曝光量为A,所述实际曝光参数的曝光量设置是根据A与图像中所有像素的平均亮度的比值和所述预期值的乘积确定的。In an embodiment of the present application, the exposure amount in the first exposure parameter is A, and the exposure amount of the actual exposure parameter is set according to the ratio of A to the average brightness of all pixels in the image and the expected value The product is determined.
在执行所述步骤S1至所述步骤S5的过程中,所述相机显示的画面固定不动,以防止对用户的视觉产生不适的感觉,例如将所述相机显示的画面锁定为第一次曝光时的画面。In the process of executing the steps S1 to S5, the picture displayed by the camera is fixed to prevent discomfort to the user's vision, for example, the picture displayed by the camera is locked as the first exposure time screen.
在本申请的一示例中,如上所述,若亮度序列为[-4EV,-12EV,+4EV],其中,亮度分别-12EV,+4EV的曝光参数进行曝光时,其明暗差别很大,若相机显示的画面为当时真实的曝光亮度的画面,则会造成用于视觉忽明忽暗,造成刺激,因此通过将画面固定可以给用户更好的使用体验。In an example of the present application, as mentioned above, if the brightness sequence is [-4EV, -12EV, +4EV], when exposure parameters with brightness of -12EV and +4EV are used for exposure, the difference between brightness and darkness is very large. The picture displayed by the camera is the picture of the real exposure brightness at that time, which will cause the visual flickering and cause stimulation, so by fixing the picture, the user can have a better experience.
可选地,在本申请中,在所述步骤S1至所述步骤S5各个步骤,执行各个指令时所产生的数据,包括历史亮度数据均存储于存储介质中,以便于用户在需要时可以查找。Optionally, in this application, in each step from step S1 to step S5, the data generated when each instruction is executed, including the historical brightness data, are stored in the storage medium, so that the user can find it when needed. .
所述存储介质为相机中的本地存储介质。所述本地存储介质可以包括各种形式的计算机可读存储介质,例如易失性存储器和/或非易失性存储器。所述易失性存储器例如可以包括随机存取存储器(RAM)和/或高速缓冲存储器(cache)等。所述非易失性存储器例如可以包括只读存储器The storage medium is a local storage medium in the camera. The local storage medium may include various forms of computer-readable storage medium, such as volatile memory and/or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and/or cache memory, or the like. The non-volatile memory may include, for example, read-only memory
(ROM)、硬盘、闪存等。在所述相机可读存储介质上可以存储一个或多个计算机程序指令,可以运行所述程序指令,以实现前文所述的本申请实施例中各个步骤。在所述相机可读存储介质中还可以存储各种应用程序和各种数据,例如所述应用程序使用和/或产生的各种数据等。(ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the camera-readable storage medium, and the program instructions may be executed to implement various steps in the foregoing embodiments of the present application. Various application programs and various data, such as various data used and/or generated by the application program, may also be stored in the camera-readable storage medium.
此外,而本申请还提供了一种存储介质,在所述存储介质上存储了程序指令,在所述程序指令被计算机或处理器运行时用于执行本申请实施例步骤S1至步骤S5的相应操作。所述存储介质例如可以包括相机的存储卡、平板电脑的存储部件、个人计算机的硬盘、只读存储器(ROM)、可擦除可编程只读存储器(EPROM)、便携式紧致盘只读存储器(CD-ROM)、USB存储器、或者上述存储介质的任意组合。所述计算机可读存储介质可以是一个或多个计算机可读存储介质的任意组合。In addition, the present application also provides a storage medium, where program instructions are stored on the storage medium, and when the program instructions are run by a computer or a processor, the program instructions are used to execute the corresponding steps from step S1 to step S5 in the embodiment of the present application. operate. The storage medium may include, for example, a memory card of a camera, a storage unit of a tablet computer, a hard disk of a personal computer, a read only memory (ROM), an erasable programmable read only memory (EPROM), a portable compact disk read only memory ( CD-ROM), USB memory, or any combination of the above storage media. The computer-readable storage medium can be any combination of one or more computer-readable storage media.
尽管这里已经参考附图描述了示例实施例,应理解上述示例实施例仅仅是示例性的,并且不意图将本发明的范围限制于此。本领域普通技术人员可以在其中进行各种改变和修改,而不偏离本发明的范围和精神。所有这些改变和修改意在被包括在所附权利要求所要求的本发明的范围之内。Although example embodiments have been described herein with reference to the accompanying drawings, it should be understood that the above-described example embodiments are exemplary only, and are not intended to limit the scope of the invention thereto. Various changes and modifications can be made therein by those of ordinary skill in the art without departing from the scope and spirit of the invention. All such changes and modifications are intended to be included within the scope of the invention as claimed in the appended claims.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementations should not be considered beyond the scope of the present invention.
在本申请所提供的几个实施例中,应该理解到,所揭露的设备和方法,可以通过其它的方式实现。例如,以上所描述的设备实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个设备,或一些特征可以忽略,或不执行。In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or May be integrated into another device, or some features may be omitted, or not implemented.
在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本发明的实施例可以在没有这些具体细节的情况下实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。In the description provided herein, numerous specific details are set forth. It will be understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
类似地,应当理解,为了精简本发明并帮助理解各个发明方面中的一个或多个,在对本发明的示例性实施例的描述中,本发明的各个特征有时被一起分组到单个实施例、图、或者对其的描述中。然而,并不应将该本发明的方法解释成反映如下意图:即所要求保护的本发明要求比在每个权利要求中所明确记载的特征更多的特征。更确切地说,如相应的权利要求书所反映的那样,其发明点在于可以用少于某个公开的单个实施例的所有特征的特征来解决相应的技术问题。因此,遵循具体实施方式的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身都作为本发明的单独实施例。Similarly, it is to be understood that in the description of the exemplary embodiments of the invention, various features of the invention are sometimes grouped together , or in its description. However, this method of the invention should not be interpreted as reflecting the intention that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the corresponding claims reflect, the invention lies in the fact that the corresponding technical problem may be solved with less than all features of a single disclosed embodiment. Thus, the claims following the Detailed Description are hereby expressly incorporated into this Detailed Description, with each claim standing on its own as a separate embodiment of this invention.
本领域的技术人员可以理解,除了特征之间相互排斥之外,可以采用任何组合对本说明书(包括伴随的权利要求、摘要和附图)中公开的所有 特征以及如此公开的任何方法或者设备的所有过程或单元进行组合。除非另外明确陈述,本说明书(包括伴随的权利要求、摘要和附图)中公开的每个特征可以由提供相同、等同或相似目的替代特征来代替。It will be understood by those skilled in the art that all features disclosed in this specification (including the accompanying claims, abstract and drawings) and any method or apparatus so disclosed may be used in any combination, except that the features are mutually exclusive. Processes or units are combined. Each feature disclosed in this specification (including accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
此外,本领域的技术人员能够理解,尽管在此所述的一些实施例包括其它实施例中所包括的某些特征而不是其它特征,但是不同实施例的特征的组合意味着处于本发明的范围之内并且形成不同的实施例。例如,在权利要求书中,所要求保护的实施例的任意之一都可以以任意的组合方式来使用。Furthermore, those skilled in the art will appreciate that although some of the embodiments described herein include certain features, but not others, included in other embodiments, that combinations of features of different embodiments are intended to be within the scope of the invention within and form different embodiments. For example, in the claims, any of the claimed embodiments may be used in any combination.
本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的一些模块的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的装置程序(例如,计算机程序和计算机程序产品)。这样的实现本发明的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。Various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art should understand that a microprocessor or a digital signal processor (DSP) may be used in practice to implement some or all of the functions of some modules according to the embodiments of the present invention. The present invention may also be implemented as apparatus programs (eg, computer programs and computer program products) for performing part or all of the methods described herein. Such a program implementing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals. Such signals may be downloaded from Internet sites, or provided on carrier signals, or in any other form.
应该注意的是上述实施例对本发明进行说明而不是对本发明进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。本发明可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。It should be noted that the above-described embodiments illustrate rather than limit the invention, and that alternative embodiments may be devised by those skilled in the art without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The invention can be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means may be embodied by one and the same item of hardware. The use of the words first, second, and third, etc. do not denote any order. These words can be interpreted as names.
以上所述,仅为本发明的具体实施方式或对具体实施方式的说明,本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。本发明的保护范围应以权利要求的保护范围为准。The above is only the specific embodiment of the present invention or the description of the specific embodiment, and the protection scope of the present invention is not limited thereto. Any changes or substitutions should be included within the protection scope of the present invention. The protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (18)

  1. 一种相机快速自动曝光的方法,其特征在于,所述方法包括:A method for fast automatic exposure of a camera, characterized in that the method comprises:
    根据相机之前曝光的历史亮度数据,预测下一次相机启动时的环境亮度;According to the historical brightness data of the previous exposure of the camera, predict the ambient brightness when the camera is activated next time;
    根据预测的所述环境亮度设置用于进行曝光测试的亮度序列,并根据所述亮度序列在所述相机内设置与所述亮度序列对应的曝光参数;Setting a brightness sequence for exposure testing according to the predicted ambient brightness, and setting exposure parameters corresponding to the brightness sequence in the camera according to the brightness sequence;
    相机启动后,按照设置的所述曝光参数依次进行曝光并得到对应的图像;After the camera is started, exposure is performed in sequence according to the set exposure parameters and corresponding images are obtained;
    根据曝光得到的图像判断曝光测试是否成功,并得到曝光测试成功对应的第一曝光参数;Determine whether the exposure test is successful according to the image obtained by the exposure, and obtain the first exposure parameter corresponding to the successful exposure test;
    根据所述第一曝光参数计算实际曝光参数,以用于进行拍照。Actual exposure parameters are calculated according to the first exposure parameters for taking pictures.
  2. 根据权利要求1所述的方法,其特征在于,判断曝光测试是否成功的方法包括:The method according to claim 1, wherein the method for judging whether the exposure test is successful comprises:
    根据当前的环境亮度,计算出相机中画面亮度的预期值;Calculate the expected value of the screen brightness in the camera according to the current ambient brightness;
    对曝光后得到的图像中的像素进行统计,以得到图像曝光亮度;Count the pixels in the image obtained after exposure to obtain the image exposure brightness;
    根据所述预期值和所述图像曝光亮度判断曝光测试是否成功。Whether the exposure test is successful is determined according to the expected value and the image exposure brightness.
  3. 根据权利要求2所述的方法,其特征在于,所述图像曝光亮度为所述图像中所有像素的平均亮度。The method according to claim 2, wherein the image exposure brightness is the average brightness of all pixels in the image.
  4. 根据权利要求2所述的方法,其特征在于,所述根据所述预期值和所述图像曝光亮度判断曝光测试是否成功,包括:The method according to claim 2, wherein the determining whether the exposure test is successful according to the expected value and the image exposure brightness comprises:
    当所述图像曝光亮度小于或等于所述亮度的预期值,并且图像中暗部的数目小于设定暗部阈值,则曝光测试成功。When the exposure brightness of the image is less than or equal to the expected value of the brightness, and the number of dark parts in the image is less than the set dark part threshold, the exposure test is successful.
  5. 根据权利要求4所述的方法,其特征在于,根据所述第一曝光参数进行迭代,以得到误差在设定误差阈值之内的所述实际曝光参数。The method according to claim 4, wherein iterating according to the first exposure parameter is performed to obtain the actual exposure parameter whose error is within a set error threshold.
  6. 根据权利要求2所述的方法,其特征在于,所述根据所述预期值和所述目标亮度判断曝光测试是否成功,包括:The method according to claim 2, wherein the judging whether the exposure test is successful according to the expected value and the target brightness comprises:
    当所述图像曝光亮度大于所述预期值,并且图像中亮部的数目小于设定亮部阈值,则曝光测试成功。When the exposure brightness of the image is greater than the expected value, and the number of bright parts in the image is less than the set bright part threshold, the exposure test is successful.
  7. 根据权利要求6所述的方法,其特征在于,所述第一曝光参数中的曝光量为A,则所述实际曝光参数的曝光量设置是根据A与图像曝光亮 度的比值和所述预期值的乘积确定的。The method according to claim 6, wherein the exposure amount in the first exposure parameter is A, and the exposure amount of the actual exposure parameter is set according to the ratio of A to image exposure brightness and the expected value is determined by the product of .
  8. 根据权利要求1所述的方法,其特征在于,所述根据相机之前曝光的历史亮度数据,预测下一次拍摄时的环境亮度包括:The method according to claim 1, wherein the predicting the ambient brightness during the next shooting according to the historical brightness data previously exposed by the camera comprises:
    将所述相机之前曝光的历史亮度和与所述历史亮度所对应的参数进行拟合,以得到所述历史亮度数据;Fitting the historical brightness previously exposed by the camera and the parameter corresponding to the historical brightness to obtain the historical brightness data;
    根据下一次拍摄时的参数结合所述历史亮度数据,预测下一次拍摄时的环境亮度。According to the parameters at the next shooting time and the historical brightness data, the ambient brightness at the next shooting time is predicted.
  9. 根据权利要求8所述的方法,其特征在于,与历史亮度所对应的参数包括时间和/或位置。The method according to claim 8, wherein the parameters corresponding to the historical brightness include time and/or location.
  10. 根据权利要求1所述的方法,其特征在于,所述根据相机之前曝光的历史亮度数据,预测下一次拍摄时的环境亮度包括:The method according to claim 1, wherein the predicting the ambient brightness during the next shooting according to the historical brightness data previously exposed by the camera comprises:
    根据所述相机最后一次的曝光亮度预测下一次拍摄时的环境亮度。The ambient brightness at the next shooting is predicted according to the last exposure brightness of the camera.
  11. 根据权利要求1所述的方法,其特征在于,根据预测的所述环境亮度在所述相机内设置用于进行曝光测试的亮度序列的方法包括:The method according to claim 1, wherein the method for setting a brightness sequence in the camera for performing an exposure test according to the predicted ambient brightness comprises:
    以小于预测的所述环境亮度的一亮度为中间数,以固定的幅度进行递增和递减,进而得到包含多个亮度的亮度序列。Taking a brightness smaller than the predicted ambient brightness as an intermediate number, increment and decrement are performed with a fixed amplitude, thereby obtaining a brightness sequence including a plurality of brightnesses.
  12. 根据权利要求11所述的方法,其特征在于,所述亮度序列中设置的亮度的数目不超过10个。The method according to claim 11, wherein the number of luminances set in the luminance sequence does not exceed 10.
  13. 根据权利要求1所述的方法,其特征在于,根据曝光得到的图像按照顺序判断所述曝光参数的曝光测试是否成功,至曝光测试成功得到第一亮度为止,不再对后面的曝光参数进行曝光测试的判断。The method according to claim 1, wherein whether the exposure test of the exposure parameters is successful is determined in sequence according to the images obtained by exposure, and the subsequent exposure parameters are no longer exposed until the exposure test successfully obtains the first brightness test judgment.
  14. 根据权利要求13所述的方法,其特征在于,若所有所述曝光参数得到的图像均曝光测试失败时,则进行异常处理。The method according to claim 13, characterized in that, if all the images obtained by the exposure parameters fail the exposure test, abnormal processing is performed.
  15. 根据权利要求1所述的方法,其特征在于,所述相机在依次进行曝光并得到对应的图像以及根据曝光得到的图像判断曝光测试是否成功的过程中,所述相机显示的画面始终为第一次曝光时的画面。The method according to claim 1, wherein in the process of sequentially exposing the camera to obtain corresponding images and judging whether the exposure test is successful according to the images obtained by exposure, the picture displayed by the camera is always the first image. The image at the second exposure.
  16. 根据权利要求1所述的方法,其特征在于,所述历史亮度数据、所述方法各个步骤中产生的数据信息均存储于存储介质中。The method according to claim 1, wherein the historical luminance data and the data information generated in each step of the method are stored in a storage medium.
  17. 根据权利要求16所述的方法,其特征在于,所述存储介质为本地存储介质。The method according to claim 16, wherein the storage medium is a local storage medium.
  18. 一种存储介质,其特征在于,所述存储介质上存储有计算机程序,所述计算机程序在运行时执行如权利要求1-17中的任一项所述的方法。A storage medium, characterized in that a computer program is stored on the storage medium, and the computer program executes the method according to any one of claims 1-17 when running.
PCT/CN2020/118798 2020-09-29 2020-09-29 Fast auto-exposure method for camera, and storage medium WO2022067496A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/118798 WO2022067496A1 (en) 2020-09-29 2020-09-29 Fast auto-exposure method for camera, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/118798 WO2022067496A1 (en) 2020-09-29 2020-09-29 Fast auto-exposure method for camera, and storage medium

Publications (1)

Publication Number Publication Date
WO2022067496A1 true WO2022067496A1 (en) 2022-04-07

Family

ID=80949282

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/118798 WO2022067496A1 (en) 2020-09-29 2020-09-29 Fast auto-exposure method for camera, and storage medium

Country Status (1)

Country Link
WO (1) WO2022067496A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116095497A (en) * 2022-06-29 2023-05-09 荣耀终端有限公司 Exposure control method, device and terminal equipment
CN116489517A (en) * 2023-06-20 2023-07-25 深圳比特微电子科技有限公司 Method, device, equipment and medium for starting image pickup equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101399919A (en) * 2007-09-25 2009-04-01 展讯通信(上海)有限公司 Method for automatic exposure and automatic gain regulation and method thereof
US20180041691A1 (en) * 2007-12-19 2018-02-08 Monument Peak Ventures, Llc Camera using preview image to select exposure
CN108141543A (en) * 2016-08-17 2018-06-08 谷歌有限责任公司 Camera setting adjustment based on prediction environmental factor and the tracking system using the setting adjustment of this camera
US10051191B1 (en) * 2017-03-31 2018-08-14 Qualcomm Incorporated Systems and methods for improved exposures when panning

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101399919A (en) * 2007-09-25 2009-04-01 展讯通信(上海)有限公司 Method for automatic exposure and automatic gain regulation and method thereof
US20180041691A1 (en) * 2007-12-19 2018-02-08 Monument Peak Ventures, Llc Camera using preview image to select exposure
CN108141543A (en) * 2016-08-17 2018-06-08 谷歌有限责任公司 Camera setting adjustment based on prediction environmental factor and the tracking system using the setting adjustment of this camera
US10051191B1 (en) * 2017-03-31 2018-08-14 Qualcomm Incorporated Systems and methods for improved exposures when panning

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116095497A (en) * 2022-06-29 2023-05-09 荣耀终端有限公司 Exposure control method, device and terminal equipment
CN116095497B (en) * 2022-06-29 2023-10-20 荣耀终端有限公司 Exposure control method, device and terminal equipment
CN116489517A (en) * 2023-06-20 2023-07-25 深圳比特微电子科技有限公司 Method, device, equipment and medium for starting image pickup equipment
CN116489517B (en) * 2023-06-20 2023-09-12 深圳比特微电子科技有限公司 Method, device, equipment and medium for starting image pickup equipment

Similar Documents

Publication Publication Date Title
US11563897B2 (en) Image processing method and apparatus which determines an image processing mode based on status information of the terminal device and photographing scene information
CN108933899B (en) Panorama shooting method, device, terminal and computer readable storage medium
US10158797B2 (en) Combining images when a face is present
US9407831B2 (en) Intelligent auto-exposure bracketing
WO2020038109A1 (en) Photographing method and device, terminal, and computer-readable storage medium
JP5719418B2 (en) High dynamic range image exposure time control method
US8339506B2 (en) Image capture parameter adjustment using face brightness information
CN101237530B (en) Photographing apparatus, method for controlling photographing apparatus
CN107948538B (en) Imaging method, imaging device, mobile terminal and storage medium
WO2022067496A1 (en) Fast auto-exposure method for camera, and storage medium
US9838616B2 (en) Image processing method and electronic apparatus
WO2019149099A1 (en) Electronic device, human face recognition method, and relevant product
WO2019080543A1 (en) High dynamic range video capturing method and capturing device
CN102523386B (en) Automatic exposure method based on histogram equalization
JP5479068B2 (en) Image processing apparatus and image processing method
CN106657798A (en) Photographing method for intelligent terminal
CN113497879B (en) Photographing light supplementing method and device, terminal and storage medium
US8090253B2 (en) Photographing control method and apparatus using strobe
WO2017088314A1 (en) Photographing method, terminal, and computer storage medium
WO2021218536A1 (en) High-dynamic range image synthesis method and electronic device
US20190082091A1 (en) Automatically determining a set of exposure values for a high dynamic range image capture device
WO2017004886A1 (en) Image capturing method and terminal
WO2016074414A1 (en) Image processing method and apparatus
US20150254856A1 (en) Smart moving object capture methods, devices and digital imaging systems including the same
JP2005354199A5 (en)

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: 20955523

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: 20955523

Country of ref document: EP

Kind code of ref document: A1