CN107852455B - A method and terminal for taking pictures - Google Patents
A method and terminal for taking pictures Download PDFInfo
- Publication number
- CN107852455B CN107852455B CN201680017675.4A CN201680017675A CN107852455B CN 107852455 B CN107852455 B CN 107852455B CN 201680017675 A CN201680017675 A CN 201680017675A CN 107852455 B CN107852455 B CN 107852455B
- Authority
- CN
- China
- Prior art keywords
- exposure time
- terminal
- sensitivity
- time
- holding time
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/67—Focus control based on electronic image sensor signals
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Studio Devices (AREA)
Abstract
Description
技术领域technical field
本发明涉及终端技术领域,尤其涉及一种拍照的方法及终端。The present invention relates to the technical field of terminals, and in particular, to a method and a terminal for taking pictures.
背景技术Background technique
随着终端如手机、平板等的智能化发展,可为人们的生活、工作、学习及娱乐提供非常大的帮助。尤其在拍照方面,终端的性能提升很快,相对于相机而言,终端通常具备更好的便携性。因此,在大多数场景下,用户更喜欢使用终端进行拍照。照片的质量不仅取决于终端的拍照性能,还与采用的拍照参数息息相关。例如,曝光时间和感光度等。其中,曝光时间是为了将光投射到照相感光材料的感光面上,快门所要打开的时间。视照相感光材料的感光度和对感光面上的照度而定。快门是摄像器材中用来控制光线照射感光元件时间的装置。曝光时间即从快门打开到关闭的时间间隔。感光度则是底片对光线的化学反应速度,也是制造底片行业中感光速度的标准。国际标准化组织(International StandardizationOrganization,简称ISO)对感光度做了量化规定。对较低敏感度底片即感光度较低的底片,需要曝光更长的时间以达到跟较高敏感度底片相同的成像,因此通常被称为慢速底片。较高敏感度的底片即感光度较高的底片称为快速底片。由于感光度较高的底片通常具备较粗的底片颗粒或是较高的影像噪声,因此无论是数位或是底片摄影,为了减少曝光时间相对使用较高感光度的底片通常会导致照片的噪点较多,质量较差。With the intelligent development of terminals such as mobile phones and tablets, it can provide great help for people's life, work, study and entertainment. Especially in the aspect of taking pictures, the performance of the terminal is improved rapidly. Compared with the camera, the terminal usually has better portability. Therefore, in most scenarios, users prefer to use the terminal to take pictures. The quality of photos not only depends on the camera performance of the terminal, but also is closely related to the parameters used for taking pictures. For example, exposure time and sensitivity, etc. The exposure time is the time for the shutter to be opened in order to project light onto the photosensitive surface of the photographic photosensitive material. It depends on the sensitivity of the photographic photosensitive material and the illuminance on the photosensitive surface. The shutter is a device used in the camera equipment to control the time when the light hits the photosensitive element. Exposure time is the time interval from when the shutter opens to when it closes. Sensitivity is the speed at which a film reacts chemically to light, and is the standard for speed of light in the film industry. The International Standardization Organization (ISO) quantifies the sensitivity. A lower sensitivity film, ie a film with a lower sensitivity, needs to be exposed for a longer time to achieve the same image as a higher sensitivity film, so it is often referred to as a slow film. Films with higher sensitivity, that is, films with higher sensitivity, are called fast film. Because the film with higher sensitivity usually has coarser film grain or higher image noise, whether it is digital or film photography, in order to reduce the exposure time, the use of higher sensitivity film usually results in more noise in the photo. Many, poor quality.
由于用户在手持终端拍照时,手并不是一直稳定的。手抖动的时候将拍出模糊的照片。当处于暗光场景下,例如傍晚,拍照需要的曝光时间通常比白天更长。时间越长,受到手抖动的影响越大,越容易拍出模糊的照片。这时,一般通过提升ISO值来减少曝光时间,避免照片模糊。但是这样将降低照片质量。事实上,用户个体之间是存在差异的,如老人、小孩与中年人对比,或普通用户与专业摄影爱好者对比等,他们手持终端时可保持稳定的时间是不同的,因此,对于所有用户设置相同的拍照参数进行拍照,无法得到当前用户可拍摄的较佳质量的照片。When the user takes a photo by holding the terminal, the hand is not always stable. Blurred photos will be taken when the hand shakes. In low light scenes, such as in the evening, the exposure time required to take pictures is usually longer than during the day. The longer the time, the greater the influence of hand shake, and the easier it is to take blurry photos. At this time, generally increase the ISO value to reduce the exposure time and avoid blurred photos. But this will reduce the photo quality. In fact, there are differences between individual users, such as the comparison between the elderly, children and middle-aged people, or the comparison between ordinary users and professional photography enthusiasts. If the user sets the same photographing parameters to take a photograph, it is impossible to obtain a photograph of better quality that can be photographed by the current user.
发明内容SUMMARY OF THE INVENTION
本发明实施例所要解决的技术问题在于,提供一种拍照的方法及终端。以解决终端对于所有用户设置相同拍照参数进行拍照,照片质量较差的问题。The technical problem to be solved by the embodiments of the present invention is to provide a method and a terminal for taking pictures. In order to solve the problem that the terminal sets the same photographing parameters for all users to take pictures, the picture quality is poor.
第一方面,本发明实施例提供了一种拍照的方法,包括:In a first aspect, an embodiment of the present invention provides a method for taking pictures, including:
根据当前环境光线强度计算得到第一曝光时间和第一感光度;Calculate the first exposure time and the first sensitivity according to the current ambient light intensity;
获取用户维持终端在稳定状态下的最长持稳时间;Obtain the longest holding time for the user to maintain the terminal in a stable state;
判断所述最长持稳时间是否大于所述第一曝光时间;judging whether the longest holding time is greater than the first exposure time;
若所述最长持稳时间大于所述第一曝光时间,则调节拍照的曝光时间和感光度,使用第二曝光时间和第二感光度进行拍照;If the longest holding time is greater than the first exposure time, adjusting the exposure time and sensitivity for taking pictures, and using the second exposure time and the second sensitivity to take pictures;
其中,所述第二曝光时间不大于所述第一曝光时间,所述第二感光度不小于所述第一感光度。Wherein, the second exposure time is not greater than the first exposure time, and the second sensitivity is not less than the first sensitivity.
通过获取用户维持终端在稳定状态下的最长持稳时间,并将最长持稳时间与当前环境光线强度下终端计算得到的第一曝光时间比较,在前者大于后者时调节拍照的曝光时间和感光度,使用更大的第二曝光时间和更小的第二感光度进行拍照。可以充分匹配当前用户的个体特性来调节拍照参数,提升终端的拍照效果,且可以与现有终端中使用的光学防抖功能兼容,扩展了终端的功能和适用性,提升了用户的拍照体验,利于不同的用户拍出符合自身条件的较佳质量的照片。By obtaining the longest holding time that the user maintains the terminal in a stable state, and comparing the longest holding time with the first exposure time calculated by the terminal under the current ambient light intensity, the exposure time for taking pictures is adjusted when the former is greater than the latter. and sensitivity, use a larger second exposure time and a smaller second sensitivity to take pictures. It can fully match the individual characteristics of the current user to adjust the photographing parameters, improve the photographing effect of the terminal, and is compatible with the optical anti-shake function used in the existing terminal, which expands the function and applicability of the terminal and improves the user's photographing experience. It is helpful for different users to take better quality photos that meet their own conditions.
结合第一方面,在第一方面第一种可能的实现方式中,若所述最长持稳时间小于所述第一曝光时间,则使用所述第一曝光时间和所述第一感光度进行拍照。In combination with the first aspect, in a first possible implementation manner of the first aspect, if the longest holding time is less than the first exposure time, the first exposure time and the first sensitivity are used to perform Photograph.
在最长持稳时间小于第一曝光时间时,可以使用终端初始计算得到第一曝光时间和第一感光度进行计算,无需对拍照参数进行调整便可以得到较佳质量的照片。When the longest holding time is less than the first exposure time, the first exposure time and the first sensitivity obtained from the initial calculation of the terminal can be used for calculation, and photos of better quality can be obtained without adjusting the photographing parameters.
结合第一方面,在第一方面第二种可能的实现方式中,所述获取用户维持终端在稳定状态下的最长持稳时间,包括:With reference to the first aspect, in a second possible implementation manner of the first aspect, the obtaining the longest holding time for the user to maintain the terminal in a stable state includes:
采集所述用户使用所述终端进行对焦到按下快门的抖动数据;collecting jitter data from the user using the terminal to focus to pressing the shutter;
将所述抖动数据与预设阈值进行比较;comparing the jitter data with a preset threshold;
当所述抖动数据低于所述预设阈值时,所述终端处于稳定状态,统计所述终端处于稳定状态的最长持稳时间。When the jitter data is lower than the preset threshold, the terminal is in a stable state, and the longest holding time of the terminal in a stable state is counted.
通过将抖动数据与预设阈值比较,当抖动数据低于预设阈值时便可以判定终端处于稳定状态,统计其处于稳定状态下的最长持稳时间即可,统计结果比较准确,可以良好的体现终端的抖动,利于后续对曝光时间和感光度的调整,得到质量较佳的照片。By comparing the jitter data with the preset threshold, when the jitter data is lower than the preset threshold, it can be determined that the terminal is in a stable state, and the longest stable time in the stable state can be counted. It reflects the jitter of the terminal, which is conducive to the subsequent adjustment of exposure time and sensitivity, and obtains photos with better quality.
结合第一方面,在第一方面第三种可能的实现方式中,若所述最长持稳时间大于所述第一曝光时间,则调节所述第二曝光时间等于所述最长持稳时间;With reference to the first aspect, in a third possible implementation manner of the first aspect, if the longest holding time is greater than the first exposure time, the second exposure time is adjusted to be equal to the longest holding time ;
根据所述第一曝光时间和所述第一感光度的乘积,再除以所述最长持稳时间得到所述第二感光度。The second sensitivity is obtained by dividing the product of the first exposure time and the first sensitivity by the longest holding time.
通过将第二曝光时间调整为最大持稳时间,并依据第一曝光时间、第一感光度和最大持稳时间计算第二感光度,使得最终拍照使用的拍照参数最适合当前用户,可以得到当前环境当前用户可拍摄得到的质量较佳的照片。By adjusting the second exposure time to the maximum holding time, and calculating the second sensitivity according to the first exposure time, the first sensitivity, and the maximum holding time, so that the photographing parameters used in the final photograph are most suitable for the current user, the current user can be obtained. A better quality photo that can be taken by the current user in the environment.
结合第一方面,或结合第一方面第一至第三种任一可能的实现方式,在第一方面第四种可能的实现方式中,当所述用户拍照时,提示所述用户持稳所述终端。In combination with the first aspect, or in combination with any of the first to third possible implementation manners of the first aspect, in a fourth possible implementation manner of the first aspect, when the user takes a picture, the user is prompted to hold the described terminal.
通过提醒,可提示缺乏拍照专业知识的用户尽量保持终端处于稳定状态,利于得到准确的最大持稳时间,利于拍出清晰的照片。Through the reminder, users who lack professional knowledge of photography can be prompted to keep the terminal in a stable state as much as possible, which is beneficial to obtain an accurate maximum stabilization time and to take clear photos.
结合第一方面,在第一方面第五种可能的实现方式中,在获取用户维持终端在稳定状态下的最长持稳时间之前,还包括:With reference to the first aspect, in a fifth possible implementation manner of the first aspect, before acquiring the longest holding time for the user to maintain the terminal in a stable state, the method further includes:
提示用户输入数字密码、手势密码或生物密码进行身份验证;Prompt the user to enter a digital password, gesture password or biometric password for authentication;
当获取到所述用户维持终端在稳定状态下的最长持稳时间之后,将所述最长持稳时间与用户身份进行关联并保存;After obtaining the longest holding time for the user to maintain the terminal in a stable state, associate and save the longest holding time with the user identity;
在下一次拍照时,身份验证通过后调用对应的最长持稳时间与所述第一曝光时间比较。When taking a photo next time, after the identity verification is passed, the corresponding longest holding time is called to compare with the first exposure time.
通过结合身份验证的步骤,可以满足多用户使用终端拍照的需求,对于不同用户获取到不同的最长持稳时间并保存以便于后续调用并直接使用,可进一步提升终端的适用性和拍照的速度。By combining the steps of identity verification, it can meet the needs of multiple users using the terminal to take pictures. For different users, different longest holding times can be obtained and saved for subsequent recall and direct use, which can further improve the applicability of the terminal and the speed of taking pictures. .
第二方面,本发明实施例提供了一种终端,包括:In a second aspect, an embodiment of the present invention provides a terminal, including:
计算单元,用于根据当前环境光线强度计算得到第一曝光时间和第一感光度;a calculation unit, configured to calculate and obtain the first exposure time and the first sensitivity according to the current ambient light intensity;
获取单元,用于获取用户维持终端在稳定状态下的最长持稳时间;an obtaining unit, used to obtain the longest holding time for the user to maintain the terminal in a stable state;
判断单元,用于判断所述最长持稳时间是否大于所述第一曝光时间;a judging unit for judging whether the longest holding time is greater than the first exposure time;
拍照单元,用于若所述最长持稳时间大于所述第一曝光时间,则调节拍照的曝光时间和感光度,使用第二曝光时间和第二感光度进行拍照;a photographing unit, configured to adjust the exposure time and sensitivity for taking pictures if the longest holding time is greater than the first exposure time, and use the second exposure time and the second sensitivity to take pictures;
其中,所述第二曝光时间不大于所述第一曝光时间,所述第二感光度不小于所述第一感光度。Wherein, the second exposure time is not greater than the first exposure time, and the second sensitivity is not less than the first sensitivity.
基于同一发明构思,由于该终端解决问题的原理以及有益效果可以参见上述第一方面和第一方面的各可能的实施方式以及所带来的有益效果,因此该终端的实施可以参见方法的实施,重复之处不再赘述。Based on the same inventive concept, since the principle and beneficial effect of the terminal for solving the problem can refer to the possible implementation manners and the beneficial effects brought by the first aspect and the first aspect, the implementation of the terminal can refer to the implementation of the method, The repetition will not be repeated.
第三方面,本发明实施例提供了一种终端,包括:In a third aspect, an embodiment of the present invention provides a terminal, including:
处理器、存储器、摄像头、加速度传感器、显示屏、接口电路和总线,所述处理器、存储器、摄像头、加速度传感器、显示屏和接口电路通过所述总线连接并完成相互间的通信,其中,所述摄像头用于拍照,所述加速度传感器用于感应用户手持所述终端时的抖动,并采集抖动收据发送给所述处理器,所述显示屏用于人机交互及显示拍摄画面,所述存储器用于存储一组程序代码,所述处理器用于调用所述存储器中存储的程序代码,执行以下操作:A processor, a memory, a camera, an acceleration sensor, a display screen, an interface circuit and a bus, the processor, memory, camera, acceleration sensor, display screen and interface circuit are connected through the bus and communicate with each other, wherein all the The camera is used for taking pictures, the acceleration sensor is used for sensing the shaking when the user holds the terminal, and the shaking receipt is collected and sent to the processor, the display screen is used for human-computer interaction and displaying the shooting picture, and the memory For storing a set of program codes, the processor is configured to call the program codes stored in the memory to perform the following operations:
通过所述摄像头感应环境光线强度,根据当前环境光线强度计算得到第一曝光时间和第一感光度;The camera senses the ambient light intensity, and calculates the first exposure time and the first sensitivity according to the current ambient light intensity;
获取用户维持终端在稳定状态下的最长持稳时间;Obtain the longest holding time for the user to maintain the terminal in a stable state;
判断所述最长持稳时间是否大于所述第一曝光时间;judging whether the longest holding time is greater than the first exposure time;
若所述最长持稳时间大于所述第一曝光时间,则调节拍照的曝光时间和感光度,使用第二曝光时间和第二感光度进行拍照;If the longest holding time is greater than the first exposure time, adjusting the exposure time and sensitivity for taking pictures, and using the second exposure time and the second sensitivity to take pictures;
其中,所述第二曝光时间不大于所述第一曝光时间,所述第二感光度不小于所述第一感光度。Wherein, the second exposure time is not greater than the first exposure time, and the second sensitivity is not less than the first sensitivity.
所述处理器调用存储在所述存储器中的指令以实现上述第一方面的方法设计中的方案,由于该终端解决问题的实施方式以及有益效果可以参见上述第一方面和第一方面的各可能的实施方式以及有益效果,因此该终端的实施可以参见方法的实施,重复之处不再赘述。The processor invokes the instructions stored in the memory to implement the solution in the method design of the first aspect. For the implementation manner and beneficial effect of the terminal to solve the problem, reference may be made to the first aspect and the various possibilities of the first aspect. Therefore, the implementation of the terminal can refer to the implementation of the method, and the repeated parts will not be repeated.
第四方面,本发明实施例提供了一种计算机存储介质,所述计算机存储介质包括一组程序代码,用于执行如本发明实施例第一方面以及第一方面的和第一方面的各可能的实施方式所述的方法。In a fourth aspect, an embodiment of the present invention provides a computer storage medium, where the computer storage medium includes a set of program codes for executing the first aspect and the various possibilities of the first aspect and the first aspect according to the embodiment of the present invention The method described in the embodiment of .
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the accompanying drawings required in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some of the present invention. In the embodiments, for those of ordinary skill in the art, other drawings can also be obtained according to these drawings without any creative effort.
图1为本发明提供的一种拍照的方法的流程示意图;1 is a schematic flowchart of a method for taking pictures provided by the present invention;
图2为本发明提供的另一种拍照的方法的流程示意图;2 is a schematic flowchart of another method for taking pictures provided by the present invention;
图3为本发明提供的又一种拍照的方法的流程示意图;3 is a schematic flowchart of another method for taking pictures provided by the present invention;
图4为本发明提供的一种终端的组成示意图;4 is a schematic diagram of the composition of a terminal provided by the present invention;
图5为本发明提供的另一种终端的组成示意图;5 is a schematic diagram of the composition of another terminal provided by the present invention;
图6为本发明提供的又一种终端的组成示意图。FIG. 6 is a schematic diagram of the composition of another terminal provided by the present invention.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
应理解,在本发明实施例中,终端可称之为用户设备(User Equipment,UE)、移动台(Mobile Station,MS)、移动终端(Mobile Terminal,MT),计算机,微机等。该终端可以经无线接入网(Radio Access Network,RAN)与一个或多个核心网进行通信,例如,终端可以是移动电话(或称为“蜂窝”电话)、具有移动终端的计算机等,例如,终端还可以是便携式、袖珍式、手持式、计算机内置的或者车载的移动装置,它们与无线接入网交换语音和/或数据。本发明对此并不限定,例如终端还包括具有多承载特征的有线接入的终端。本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”和“第三”等是用于区别不同对象,而非用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其它步骤或单元。It should be understood that, in this embodiment of the present invention, a terminal may be referred to as a user equipment (User Equipment, UE), a mobile station (Mobile Station, MS), a mobile terminal (Mobile Terminal, MT), a computer, a microcomputer, and the like. The terminal may communicate with one or more core networks via a Radio Access Network (RAN), for example, the terminal may be a mobile phone (or "cellular" phone), a computer with a mobile terminal, etc., for example , the terminal may also be a portable, pocket-sized, hand-held, computer-built or vehicle-mounted mobile device that exchanges voice and/or data with the wireless access network. The present invention is not limited to this, for example, the terminal also includes a wired access terminal with multi-bearer characteristics. The terms "first", "second" and "third" in the description and claims of the present invention and the above drawings are used to distinguish different objects, rather than to describe a specific order. Furthermore, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but optionally also includes unlisted steps or units, or optionally also includes For other steps or units inherent to these processes, methods, products or devices.
请参考图1,本发明提供的一种拍照的方法的流程示意图。在本实施例中,所述方法包括:Please refer to FIG. 1 , which is a schematic flowchart of a method for photographing provided by the present invention. In this embodiment, the method includes:
S101,根据当前环境光线强度计算得到第一曝光时间和第一感光度。S101: Calculate and obtain a first exposure time and a first sensitivity according to the current ambient light intensity.
在不同的环境光线强度下,终端计算得到的曝光时间和感光度是不同的。例如,在暗光环境下,曝光时间通常比较长,感光度也比较高,得到的照片品质较差,而光线较好的环境下,曝光时间可以缩短,感光度也可以较低,可以得到品质较佳的照片。因此,当用户开启相机应用,要进行拍照时,终端可以根据当前环境光线强度的不同,采用预设算法计算得到适合当前环境光线强度下的第一曝光时间和第一感光度。例如,比较常见的3A数字成像技术即自动对焦(AF)、自动曝光(AE)和自动白平衡(AWB)。其利用了AF自动对焦算法、AE自动曝光算法及AWB自动白平衡算法来实现图像对比度最大、改善主体拍摄物过曝光或曝光不足情况、使画面在不同光线照射下的色差得到补偿,从而呈现较高画质的图像信息。采用了3A数字成像技术的摄像头能够很好的保障图像精准的色彩还原度,呈现较佳的拍照效果。其中。计算曝光时间就是这其中的AE算法,具体可以在存储器中预设环境光线强度与曝光时间和感光度的对应关系,当获取到环境光线强度后,通过查询预设的对应关系,得到匹配当前环境光线强度的曝光时间和感光度。Under different ambient light intensities, the exposure time and sensitivity calculated by the terminal are different. For example, in a dark light environment, the exposure time is usually longer and the sensitivity is relatively high, resulting in poor quality photos, while in a better light environment, the exposure time can be shortened, the sensitivity can also be lower, and the quality can be obtained. better photos. Therefore, when the user opens the camera application and wants to take a photo, the terminal can calculate the first exposure time and the first sensitivity suitable for the current ambient light intensity by using a preset algorithm according to the current ambient light intensity. For example, the more common 3A digital imaging technologies are Auto Focus (AF), Auto Exposure (AE) and Auto White Balance (AWB). It uses the AF auto-focus algorithm, AE auto-exposure algorithm and AWB auto-white balance algorithm to maximize the image contrast, improve the over-exposure or under-exposure of the main subject, and compensate for the chromatic aberration of the picture under different lighting conditions, thereby presenting a better image. High-quality image information. The camera using 3A digital imaging technology can well guarantee the accurate color reproduction of the image and present a better photo effect. in. The calculation of exposure time is one of the AE algorithms. Specifically, the corresponding relationship between ambient light intensity, exposure time and sensitivity can be preset in the memory. When the ambient light intensity is obtained, the preset corresponding relationship can be queried to obtain a matching current environment. Exposure time and sensitivity of light intensity.
此处的曝光时间也可理解为快门时间或快门数。在另一种可能的实现方式中,对于第一曝光时间和第一感光度也可以由对拍照具备一定专业知识的用户进行设置或调整。The exposure time here can also be understood as the shutter time or the number of shutters. In another possible implementation manner, the first exposure time and the first sensitivity may also be set or adjusted by a user who has certain professional knowledge in taking pictures.
S102,获取用户维持终端在稳定状态下的最长持稳时间。S102: Obtain the longest holding time for the user to maintain the terminal in a stable state.
此处的稳定状态,指的是用户手持终端时,终端在一定时间内抖动幅度维持在一定幅度之内的状态。时间及幅度的参数设置可由终端厂商配置或由用户自定义。而最长持稳时间,则表示用户在该段连续时间内可一直保持终端处于稳定状态。The stable state here refers to a state in which the jitter amplitude of the terminal is maintained within a certain amplitude within a certain period of time when the user holds the terminal. The parameter settings of time and amplitude can be configured by the terminal manufacturer or customized by the user. The longest holding time means that the user can keep the terminal in a stable state for this continuous period of time.
此步骤可以在用户拍照时进行,例如,用户启动相机应用后,终端便开始获取最长持稳时间;或者,此步骤也可以根据用户操作,进行单独的最长持稳时间测试,例如,终端可接收用户测试启动指令,开启测试,获取最长持稳时间。具体在测试时,可以进行多次测试去除异常值后取平均值。此处的异常值指的是相对于大多数测试数据明显较大或明显较小的数据。在测试之前,由于终端可能被多个用户使用,因此还可以先对测试用户进行身份验证和身份记录,并将测试的结果与用户身份进行对应关联及存储,以便不同用户使用终端拍照时,调用对应该用户的数据进行拍照参数的调整。This step can be performed when the user takes a picture. For example, after the user starts the camera application, the terminal starts to obtain the longest holding time; It can receive the user's test start command, start the test, and obtain the longest stable time. Specifically, during testing, multiple tests can be performed to remove outliers and then take the average value. Outliers here refer to data that are significantly larger or smaller relative to most of the test data. Before the test, since the terminal may be used by multiple users, the test user can also be authenticated and recorded. Adjust the camera parameters for the user's data.
S103,判断所述最长持稳时间是否大于所述第一曝光时间。若是,则执行步骤S104。S103: Determine whether the longest holding time is greater than the first exposure time. If yes, step S104 is executed.
S104,调节拍照的曝光时间和感光度,使用第二曝光时间和第二感光度进行拍照。S104 , adjusting the exposure time and the sensitivity for taking pictures, and using the second exposure time and the second sensitivity to take pictures.
其中,所述第二曝光时间不小于所述第一曝光时间,所述第二感光度不大于所述第一感光度。Wherein, the second exposure time is not less than the first exposure time, and the second sensitivity is not greater than the first sensitivity.
即,如果最长持稳时间大于第一曝光时间,则说明当前用户可以比较长时间的确保终端处于稳定状态,因此,相对于初始计算得到的第一曝光时间,实际曝光时间可以延长,同时,也无需使用原来较高的第一感光度。这样,对于可以确保终端较长时间处于稳定状态下的用户,可以通过调节曝光时间和感光度来提升照片质量。例如,当前环境下初始计算的第一曝光时间即快门时间为250毫秒,第一ISO为800,但是由于当前用户的最大持稳时间为500毫秒,则可以使用250-500毫秒的第二曝光时间,同时根据第二曝光时间自适应地计算或匹配低于800的第二ISO。That is, if the longest holding time is longer than the first exposure time, it means that the current user can ensure that the terminal is in a stable state for a long time. Therefore, the actual exposure time can be extended relative to the first exposure time calculated initially. At the same time, There is also no need to use the original higher first sensitivity. In this way, for users who can ensure that the terminal is in a stable state for a long time, the photo quality can be improved by adjusting the exposure time and sensitivity. For example, in the current environment, the initially calculated first exposure time, that is, the shutter time, is 250 milliseconds, and the first ISO is 800. However, since the current user's maximum holding time is 500 milliseconds, a second exposure time of 250-500 milliseconds can be used. , while adaptively calculating or matching a second ISO lower than 800 according to the second exposure time.
在另一种可能的实现方式中,若所述最长持稳时间小于所述第一曝光时间,则使用所述第一曝光时间和所述第一感光度进行拍照。第一曝光时间和第一感光度是由终端根据当前环境光线强度计算得到的,符合当前环境下的拍照需求。In another possible implementation manner, if the longest holding time is less than the first exposure time, the first exposure time and the first sensitivity are used to take pictures. The first exposure time and the first sensitivity are calculated by the terminal according to the current ambient light intensity, and meet the photographing requirements in the current environment.
在另一种可能的实现方式中,对于最长持稳时间稍大于第一曝光时间时,例如最长持稳时间为250.1毫秒,第一曝光时间为250毫秒,可以严格按照上述方式设置第二曝光时间和第二感光度,或者,也可以直接采用第一曝光时间和第一感光度拍照,此处“稍大于”的允许差值可根据经验值或仿真结果进行限定。In another possible implementation, when the longest holding time is slightly longer than the first exposure time, for example, the longest holding time is 250.1 milliseconds and the first exposure time is 250 milliseconds, the second The exposure time and the second sensitivity, or, the first exposure time and the first sensitivity can also be directly used to take pictures, where the allowable difference of "slightly greater than" can be limited based on empirical values or simulation results.
需要说明的是,在又一种可能的实现方式中,对于最长持稳时间远远小于第一曝光时间的情况,也即当前用户维持终端在稳定状态下的时间极短,在正常操作状态下一般年龄较大的老龄用户由于身体原因可能出现这样的情况,此时则可以进一步的减小曝光时间来,牺牲照片质量以提高照片清晰度。It should be noted that, in another possible implementation manner, for the case where the longest holding time is far less than the first exposure time, that is, the current user maintains the terminal in a stable state for a very short time, and in a normal operating state. In general, older and elderly users may have such a situation due to physical reasons. At this time, the exposure time can be further reduced, and the quality of the photos can be sacrificed to improve the clarity of the photos.
另外,对于现有终端拍照时经常使用的光学防抖技术,其主要是通过镜头内的陀螺仪侦测微小的移动,并且会将信号传至微处理器立即计算需要补偿的位移量,然后通过补偿镜片组,根据镜头的抖动方向及位移量加以补偿,从而有效的克服因相机的振动产生的影像模糊。但是首先其需要配置光学防抖的器件,这将增加摄像头的成本,并未完全普及;其次光学防抖并不能完全解决防抖问题,曝光时间超过一定时间长度也会出现照片模糊的问题。而本申请的技术方案与光学防抖技术并不冲突,本申请的技术方案可以结合光学防抖技术使用来提高照片质量。In addition, for the optical anti-shake technology that is often used when taking pictures in existing terminals, it mainly detects tiny movements through the gyroscope in the lens, and transmits the signal to the microprocessor to immediately calculate the displacement to be compensated, and then passes The compensation lens group compensates according to the shaking direction and displacement of the lens, so as to effectively overcome the image blur caused by the vibration of the camera. But first of all, it needs to be equipped with optical anti-shake devices, which will increase the cost of cameras and is not fully popular; secondly, optical anti-shake cannot completely solve the problem of anti-shake, and the problem of blurred photos will also occur when the exposure time exceeds a certain length of time. However, the technical solution of the present application does not conflict with the optical anti-shake technology, and the technical solution of the present application can be used in combination with the optical anti-shake technology to improve photo quality.
在本实施例中,通过获取用户维持终端在稳定状态下的最长持稳时间,并将最长持稳时间与当前环境光线强度下终端计算得到的第一曝光时间比较,在前者大于后者时调节拍照的曝光时间和感光度,使用比第一曝光时间更大的第二曝光时间和比计算得到的第一感光度更小的第二感光度进行拍照。可以充分匹配当前用户的个体特性来调节拍照参数,提升终端的拍照效果,且可以与现有终端中使用的光学防抖功能兼容,扩展了终端的功能和适用性,提升了用户的拍照体验,利于不同的用户拍出符合自身条件的较佳质量的照片。In this embodiment, the longest holding time for the user to maintain the terminal in a stable state is obtained, and the longest holding time is compared with the first exposure time calculated by the terminal under the current ambient light intensity. The former is greater than the latter. Adjust the exposure time and sensitivity for taking pictures when taking pictures, and use a second exposure time that is larger than the first exposure time and a second sensitivity that is smaller than the calculated first sensitivity to take pictures. It can fully match the individual characteristics of the current user to adjust the photographing parameters, improve the photographing effect of the terminal, and is compatible with the optical anti-shake function used in the existing terminal, which expands the function and applicability of the terminal and improves the user's photographing experience. It is helpful for different users to take better quality photos that meet their own conditions.
请参考图2,本发明提供的另一种拍照的方法的流程示意图。在本实施例中,所述方法包括:Please refer to FIG. 2 , which is a schematic flowchart of another photographing method provided by the present invention. In this embodiment, the method includes:
S201,根据当前环境光线强度计算得到第一曝光时间和第一感光度。S201: Calculate and obtain a first exposure time and a first sensitivity according to the current ambient light intensity.
以下步骤S202-S204详细介绍获取用户维持终端在稳定状态下的最长持稳时间;The following steps S202-S204 describe in detail the acquisition of the longest holding time for the user to maintain the terminal in a stable state;
S202,采集所述用户使用所述终端进行对焦到按下快门的抖动数据。S202: Collect jitter data from when the user uses the terminal to focus to when the shutter is pressed.
具体地,抖动数据可以为抖动幅度和时间的比值,其可以用于表征终端在单位时间内的最大抖动幅度。也可以是终端在单位时间内的角速度。单位时间的具体大小可以由终端厂商设置或由用户自定义,本发明实施例不作任何限定。而抖动幅度可以通过终端内的加速度传感器进行实时检测和采集。当单位时间内用户手持终端在立体空间上的任意方向发生抖动导致终端发生位移变化时,加速度传感器可以检测到位移变化量并计算得到终端的偏移角度或振动幅度,使用终端的偏移角度或振动幅度来表征用户的抖动幅度。例如,当终端拍照时,上下垂直或前后水平移动的距离可以视为振动幅度用于表征用户的抖动幅度,而终端水平或垂直旋转时,则可以视为偏移角度用于表征用户的抖动幅度。或者,也可以由加速度传感器检测终端的角速度,通过终端在单位时间内的角速度来作为用户的抖动数据。Specifically, the jitter data may be the ratio of the jitter amplitude and the time, which may be used to represent the maximum jitter amplitude of the terminal in a unit time. It can also be the angular velocity of the terminal in unit time. The specific size of the unit time may be set by the terminal manufacturer or defined by the user, which is not limited in this embodiment of the present invention. The jitter amplitude can be detected and collected in real time through the acceleration sensor in the terminal. When the user's handheld terminal shakes in any direction in the three-dimensional space within a unit time, resulting in a displacement change of the terminal, the acceleration sensor can detect the displacement change and calculate the offset angle or vibration amplitude of the terminal. Vibration amplitude to characterize the user's shaking amplitude. For example, when the terminal takes a picture, the distance that the terminal moves vertically up and down or back and forth horizontally can be regarded as the vibration amplitude to characterize the user's shaking amplitude, and when the terminal rotates horizontally or vertically, it can be regarded as the offset angle and used to characterize the user's shaking amplitude . Alternatively, the angular velocity of the terminal may also be detected by an acceleration sensor, and the angular velocity of the terminal in a unit time may be used as the shaking data of the user.
当加速度传感器检测到的位移变化量为0时,终端没有任何偏移,处于稳定状态,但在实际应用时,微小的位移变化量对拍照效果影响极小,因此,对于微小的位移变化导致的较小抖动幅度可以忽略,仍可以认为终端处于稳定状态。例如,可以设定单位时间为50毫秒,在50毫秒内可以通过加速度传感器采集终端的抖动幅度。当用户手持终端拍照时,若终端在单位时间内的最大抖动幅度较小,对照片清晰度影响较小。如在50毫秒内最大抖动幅度小于0.5度,则说明用户在单位时间内是持稳终端的,终端处于稳定状态;若终端在单位时间内的最大抖动幅度较大,对照片清晰度影响较大。如在50毫秒内最大抖动幅度大于3度,则说明用户在单位时间内没有持稳终端,终端处于非稳定状态。When the displacement change detected by the acceleration sensor is 0, the terminal does not have any offset and is in a stable state, but in practical applications, the slight displacement change has little effect on the photographing effect. Small jitter amplitudes can be ignored, and the terminal can still be considered to be in a stable state. For example, the unit time can be set to 50 milliseconds, and the vibration amplitude of the terminal can be collected by the acceleration sensor within 50 milliseconds. When the user holds the terminal to take a photo, if the maximum shaking amplitude of the terminal per unit time is small, the impact on the clarity of the photo is small. If the maximum jitter amplitude is less than 0.5 degrees within 50 milliseconds, it means that the user is holding the terminal steadily in a unit time, and the terminal is in a stable state; if the maximum jitter amplitude of the terminal in a unit time is larger, it will have a greater impact on the clarity of the photo . If the maximum jitter amplitude is greater than 3 degrees within 50 milliseconds, it means that the user does not hold the terminal steadily within a unit time, and the terminal is in an unstable state.
可选地,可以在用户拍照时采集抖动数据,为了提高准确度,还可以多次采集去除异常值后取平均值,此处的异常值指的是相对于大多数测试数据明显较大或明显较小的数据。采集过程也可以通过独立的流程完成,如配置测试应用,用户开启测试应用后提示用户测试抖动数据,多次测试后去除异常值取平均值,将该平均值作为该用户的抖动数据。Optionally, jitter data can be collected when the user takes a photo. In order to improve the accuracy, an average value can be obtained after removing abnormal values after collecting multiple times. smaller data. The collection process can also be completed through an independent process, such as configuring the test application, prompting the user to test the jitter data after opening the test application, removing abnormal values after multiple tests and taking the average value, and using the average value as the user's jitter data.
S203,将所述抖动数据与预设阈值进行比较。S203. Compare the jitter data with a preset threshold.
此处的预设阈值可以由终端厂商设置如可以设置为1.8度/50毫秒或其他数值,也可以由用户自定义。例如,当设置预设阈值为1.8度/50毫秒时,若在50毫秒内采集到终端的最大抖动幅度为1.6度,则1.6度/50毫秒小于预设阈值,若50毫秒内采集到的终端的最大抖动幅度为2度,则2度/50毫秒大于预设阈值。The preset threshold here can be set by the terminal manufacturer, for example, can be set to 1.8 degrees/50 milliseconds or other values, and can also be defined by the user. For example, when the preset threshold is set to 1.8 degrees/50 milliseconds, if the maximum jitter amplitude of the terminal collected within 50 milliseconds is 1.6 degrees, then 1.6 degrees/50 milliseconds is less than the preset threshold. The maximum jitter amplitude is 2 degrees, then 2 degrees/50ms is greater than the preset threshold.
S204,当所述抖动数据低于所述预设阈值时,所述终端处于稳定状态,统计所述终端处于稳定状态的最长持稳时间。S204, when the jitter data is lower than the preset threshold, the terminal is in a stable state, and the longest holding time of the terminal in a stable state is counted.
例如,当开始获取最长持稳时间的第一个50毫秒之内,采集到的抖动数据为1.6度/50毫秒,预设阈值为1.8度/50毫秒,则说明在第一个50毫秒内,终端的最大抖动幅度为1.6度,小于1.8度,对照片清晰度影响较小,可认为终端在该50毫秒内处于稳定状态,将该50毫秒视为持稳时间。然后第二个50毫秒内继续判断,若第二个50毫秒也处于稳定状态,则说明该连续的100毫秒均为持稳时间,连续判断累计直至在第N个50毫秒内终端处于非稳定状态,N为大于等于1的整数,最终可得到(N-1)*50毫秒的最长持稳时间。For example, within the first 50 milliseconds of obtaining the longest holding time, the collected jitter data is 1.6 degrees/50 milliseconds, and the preset threshold is 1.8 degrees/50 milliseconds, which means that within the first 50 milliseconds , the maximum jitter amplitude of the terminal is 1.6 degrees, which is less than 1.8 degrees, and has little impact on the clarity of the photo. Then continue to judge within the second 50 milliseconds. If the second 50 milliseconds is also in a stable state, it means that the continuous 100 milliseconds are all stable time, and the continuous judgment is accumulated until the terminal is in an unstable state within the Nth 50 milliseconds. , N is an integer greater than or equal to 1, and finally the longest holding time of (N-1)*50 milliseconds can be obtained.
S205判断所述最长持稳时间是否大于所述第一曝光时间。若是,则执行步骤S206,否则执行步骤S207。S205 judges whether the longest holding time is greater than the first exposure time. If yes, go to step S206, otherwise go to step S207.
S206,调节拍照的曝光时间和感光度,使用第二曝光时间和第二感光度进行拍照。S206 , adjusting the exposure time and sensitivity for taking pictures, and using the second exposure time and the second sensitivity to take pictures.
其中,所述第二曝光时间大于所述第一曝光时间,所述第二感光度小于所述第一感光度。Wherein, the second exposure time is longer than the first exposure time, and the second sensitivity is smaller than the first sensitivity.
S207,使用所述第一曝光时间和所述第一感光度进行拍照。S207, using the first exposure time and the first sensitivity to take a picture.
在本实施例中,具体描述了获取最长持稳时间的方式,通过将抖动数据与预设阈值比较,当抖动数据低于预设阈值时便可以判定终端处于稳定状态,统计其处于稳定状态下的最长持稳时间即可,统计结果比较准确,可以良好的体现终端的抖动,利于后续对曝光时间和感光度的调整,得到质量较佳的照片。In this embodiment, the method for obtaining the longest holding time is described in detail. By comparing the jitter data with a preset threshold, when the jitter data is lower than the preset threshold, it can be determined that the terminal is in a stable state, and statistics are made that it is in a stable state. The longest holding time is enough, and the statistical results are relatively accurate, which can well reflect the jitter of the terminal, which is conducive to the subsequent adjustment of exposure time and sensitivity, and obtains photos of better quality.
请参考图3,本发明提供的又一种拍照的方法的流程示意图。在本实施例中,所述方法包括:Please refer to FIG. 3 , which is a schematic flowchart of another method for taking pictures provided by the present invention. In this embodiment, the method includes:
S301,当用户拍照时,提示所述用户持稳所述终端。S301, when a user takes a picture, prompt the user to hold the terminal steadily.
通过提示,可提示缺乏拍照专业知识的用户尽量保持终端处于稳定状态,利于得到准确的最大持稳时间,利于拍出清晰的照片。Through the prompt, users who lack professional knowledge of photography can be prompted to keep the terminal in a stable state as much as possible, which is beneficial to obtain an accurate maximum stabilization time and to take clear photos.
步骤S302-S305可以参见步骤S201-S204,此处不再赘述。For steps S302-S305, reference may be made to steps S201-S204, which will not be repeated here.
S306,判断所述最长持稳时间是否大于所述第一曝光时间。若是,则执行步骤S307-S309,否则执行步骤S310。S306: Determine whether the longest holding time is greater than the first exposure time. If yes, go to steps S307-S309, otherwise go to step S310.
S307,调节第二曝光时间等于所述最长持稳时间。S307, adjusting the second exposure time to be equal to the longest holding time.
由于当前用户的最长持稳时间大于第一曝光时间,说明终端在当前环境光线强度下计算得到的曝光时间之内,用户都可以保持终端处于稳定状态,为了提高照片质量,可使用较低的感光度进行拍照,此时需要延长曝光时间,且最佳的曝光时间即用户可以保持终端稳定状态的最长持稳时间。Since the longest holding time of the current user is greater than the first exposure time, it means that the user can keep the terminal in a stable state within the exposure time calculated by the terminal under the current ambient light intensity. When taking photos with sensitivity, the exposure time needs to be extended, and the optimal exposure time is the longest holding time that the user can keep the terminal in a stable state.
S308,根据所述第一曝光时间和所述第一感光度的乘积,再除以所述最长持稳时间得到第二感光度。S308, according to the product of the first exposure time and the first sensitivity, and then dividing by the longest holding time to obtain a second sensitivity.
例如,第一曝光时间为250毫秒,ISO为800,用户最大持稳时间为500毫秒,则可以计算第二感光度为(250*800)/500=400。For example, if the first exposure time is 250 milliseconds, the ISO is 800, and the user's maximum holding time is 500 milliseconds, the second sensitivity can be calculated as (250*800)/500=400.
S309,使用所述第二曝光时间和第二感光度进行拍照。S309, using the second exposure time and the second sensitivity to take a picture.
S310,使用所述第一曝光时间和所述第一感光度进行拍照。S310, using the first exposure time and the first sensitivity to take a picture.
在本实施例中,具体描述了调节曝光时间和感光度的方式,通过将第二曝光时间调整为最大持稳时间,并依据第一曝光时间、第一感光度和最大持稳时间计算第二感光度,使得最终拍照使用的拍照参数最适合当前用户,可以得到当前环境当前用户可拍摄得到的质量较佳的照片。In this embodiment, the method of adjusting the exposure time and the sensitivity is specifically described. By adjusting the second exposure time to the maximum holding time, and calculating the second exposure time, the first sensitivity and the maximum holding time Sensitivity, so that the photographing parameters used in the final photograph are most suitable for the current user, and a photograph with better quality that can be taken by the current user in the current environment can be obtained.
请参考图4,为本发明实施例提供的一种终端的组成示意图,在本实施例中,所述终端包括:Please refer to FIG. 4 , which is a schematic diagram of the composition of a terminal according to an embodiment of the present invention. In this embodiment, the terminal includes:
计算单元100,用于根据当前环境光线强度计算得到第一曝光时间和第一感光度;The computing unit 100 is configured to calculate and obtain the first exposure time and the first sensitivity according to the current ambient light intensity;
获取单元200,用于获取用户维持终端在稳定状态下的最长持稳时间;an obtaining unit 200, configured to obtain the longest holding time for the user to maintain the terminal in a stable state;
判断单元300,用于判断所述最长持稳时间是否大于所述第一曝光时间;A determination unit 300, configured to determine whether the longest holding time is greater than the first exposure time;
拍照单元400,用于若所述最长持稳时间大于所述第一曝光时间,则调节拍照的曝光时间和感光度,使用第二曝光时间和第二感光度进行拍照;A photographing unit 400, configured to adjust the exposure time and sensitivity for photographing if the longest holding time is greater than the first exposure time, and use the second exposure time and the second sensitivity for photographing;
其中,所述第二曝光时间不大于所述第一曝光时间,所述第二感光度不小于所述第一感光度。Wherein, the second exposure time is not greater than the first exposure time, and the second sensitivity is not less than the first sensitivity.
可选地,若所述最长持稳时间小于所述第一曝光时间,则所述拍照单元400使用所述第一曝光时间和所述第一感光度进行拍照。Optionally, if the longest holding time is less than the first exposure time, the photographing unit 400 uses the first exposure time and the first sensitivity to photograph.
可选地,所述获取单元200具体用于:Optionally, the obtaining unit 200 is specifically configured to:
采集所述用户使用所述终端进行对焦到按下快门的抖动数据;collecting jitter data from the user using the terminal to focus to pressing the shutter;
将所述抖动数据与预设阈值进行比较;comparing the jitter data with a preset threshold;
当所述抖动数据低于所述预设阈值时,所述终端处于稳定状态,统计所述终端处于稳定状态的最长持稳时间。When the jitter data is lower than the preset threshold, the terminal is in a stable state, and the longest holding time of the terminal in a stable state is counted.
可选地,所述拍照单元400具体用于:Optionally, the photographing unit 400 is specifically used for:
若所述最长持稳时间大于所述第一曝光时间,则调节所述第二曝光时间等于所述最长持稳时间;If the longest holding time is greater than the first exposure time, adjusting the second exposure time to be equal to the longest holding time;
根据所述第一曝光时间和所述第一感光度的乘积,再除以所述最长持稳时间得到所述第二感光度。The second sensitivity is obtained by dividing the product of the first exposure time and the first sensitivity by the longest holding time.
请参考图5,为本发明实施例提供的另一种终端的组成示意图,在本发明实施例中,与图6所示实施例相比,所述终端还包括:Please refer to FIG. 5 , which is a schematic diagram of the composition of another terminal provided by an embodiment of the present invention. In the embodiment of the present invention, compared with the embodiment shown in FIG. 6 , the terminal further includes:
提示单元500,用于当所述用户拍照时,提示所述用户持稳所述终端。The prompting unit 500 is configured to prompt the user to hold the terminal steady when the user takes a picture.
需要说明的是,以上计算单元100、获取单元200、判断单元300及拍照单元400可以独立存在,也可以集成设置,且以上终端实施例中计算单元100、获取单元200、判断单元300或拍照单元400可以以硬件的形式独立于终端的处理器单独设置,且设置形式可以是微处理器的形式;也可以以硬件形式内嵌于终端的处理器中,还可以以软件形式存储于终端的存储器中,以便于终端的处理器调用执行以上计算单元100、获取单元200、判断单元300及拍照单元400对应的操作。It should be noted that the above computing unit 100, acquiring unit 200, determining unit 300 and photographing unit 400 may exist independently, or may be integrated, and in the above terminal embodiment, the computing unit 100, acquiring unit 200, determining unit 300 or photographing unit 400 can be set independently from the processor of the terminal in the form of hardware, and the setting form can be in the form of a microprocessor; it can also be embedded in the processor of the terminal in the form of hardware, and can also be stored in the memory of the terminal in the form of software. , so that the processor of the terminal can call and execute the operations corresponding to the above computing unit 100 , acquiring unit 200 , determining unit 300 and photographing unit 400 .
例如,在本发明终端的第二实施例(图5所示的实施例)中,拍照单元400可以为终端的处理器,而计算单元100、获取单元200及判断单元300的功能可以内嵌于该处理器中,也可以独立于处理器单独设置,也可以以软件的形式存储于存储器中,由处理器调用实现其功能。以上处理器可以为中央处理单元(CPU)、微处理器、单片机等。For example, in the second embodiment of the terminal of the present invention (the embodiment shown in FIG. 5 ), the photographing unit 400 may be the processor of the terminal, and the functions of the computing unit 100 , the obtaining unit 200 and the judging unit 300 may be embedded in The processor can also be set independently of the processor, or can be stored in the memory in the form of software, and can be called by the processor to realize its function. The above processor may be a central processing unit (CPU), a microprocessor, a single-chip microcomputer, or the like.
请参照图6,为本发明实施例提供的又一种终端的组成示意图,在本发明实施例中,所述终端包括:Please refer to FIG. 6 , which is a schematic diagram of the composition of another terminal provided by an embodiment of the present invention. In the embodiment of the present invention, the terminal includes:
处理器1101、存储器1102、摄像头1103、加速度传感器1104、显示屏1105、接口电路1106和总线1107,所述处理器1101、存储器1102、摄像头1103、加速度传感器1104、显示屏1105和接口电路1106通过所述总线1107连接并完成相互间的通信,其中,所述摄像头1103用于拍照,所述加速度传感器1104用于感应用户手持所述终端时的抖动,并采集抖动收据发送给所述处理器1101,所述显示屏1105用于人机交互及显示拍摄画面,所述存储器1102用于存储一组程序代码,所述处理器1101用于调用所述存储器1102中存储的程序代码,执行以下操作:The processor 1101, the memory 1102, the camera 1103, the acceleration sensor 1104, the display screen 1105, the interface circuit 1106 and the bus 1107, the processor 1101, the memory 1102, the camera 1103, the acceleration sensor 1104, the display screen 1105 and the interface circuit 1106 pass through the The bus 1107 is connected and completes mutual communication, wherein the camera 1103 is used for taking pictures, and the acceleration sensor 1104 is used to sense the shaking when the user holds the terminal, and collect the shaking receipt and send it to the processor 1101, The display screen 1105 is used for human-computer interaction and display of shooting images, the memory 1102 is used to store a set of program codes, and the processor 1101 is used to call the program codes stored in the memory 1102 to perform the following operations:
通过所述摄像头1103感应环境光线强度,根据当前环境光线强度计算得到第一曝光时间和第一感光度;The camera 1103 senses the ambient light intensity, and calculates the first exposure time and the first sensitivity according to the current ambient light intensity;
获取用户维持终端在稳定状态下的最长持稳时间;Obtain the longest holding time for the user to maintain the terminal in a stable state;
判断所述最长持稳时间是否大于所述第一曝光时间;judging whether the longest holding time is greater than the first exposure time;
若所述最长持稳时间大于所述第一曝光时间,则调节拍照的曝光时间和感光度,使用第二曝光时间和第二感光度进行拍照;If the longest holding time is greater than the first exposure time, adjusting the exposure time and sensitivity for taking pictures, and using the second exposure time and the second sensitivity to take pictures;
其中,所述第二曝光时间大于所述第一曝光时间,所述第二感光度小于所述第一感光度。Wherein, the second exposure time is longer than the first exposure time, and the second sensitivity is smaller than the first sensitivity.
可选地,若所述最长持稳时间小于所述第一曝光时间,则所述处理器1101还用于指示所述摄像头1103使用所述第一曝光时间和所述第一感光度进行拍照。Optionally, if the longest holding time is less than the first exposure time, the processor 1101 is further configured to instruct the camera 1103 to use the first exposure time and the first sensitivity to take pictures. .
可选地,在获取用户维持终端在稳定状态下的最长持稳时间时,所述处理器1101具体用于:Optionally, when acquiring the longest holding time for the user to maintain the terminal in a stable state, the processor 1101 is specifically configured to:
通过所述加速度传感器1104采集所述用户使用所述终端进行对焦到按下快门的抖动数据;Collect, by using the acceleration sensor 1104, the shaking data of the user using the terminal to focus to pressing the shutter;
将所述抖动数据与预设阈值进行比较;comparing the jitter data with a preset threshold;
当所述抖动数据低于所述预设阈值时,所述终端处于稳定状态,统计所述终端处于稳定状态的最长持稳时间。When the jitter data is lower than the preset threshold, the terminal is in a stable state, and the longest holding time of the terminal in a stable state is counted.
可选地,若所述最长持稳时间大于所述第一曝光时间,则所述处理器1101具体用于:Optionally, if the longest holding time is greater than the first exposure time, the processor 1101 is specifically configured to:
调节所述第二曝光时间等于所述最长持稳时间;adjusting the second exposure time to be equal to the longest holding time;
根据所述第一曝光时间和所述第一感光度的乘积,再除以所述最长持稳时间得到所述第二感光度。The second sensitivity is obtained by dividing the product of the first exposure time and the first sensitivity by the longest holding time.
可选地,当所述用户拍照时,所述处理器1101还用于通过所述显示屏1105提示所述用户持稳所述终端。Optionally, when the user takes a picture, the processor 1101 is further configured to prompt the user to hold the terminal steadily through the display screen 1105 .
需要说明的是,这里的处理器1101可以是一个处理器,也可以是多个处理元件的统称。例如,该处理器可以是中央处理器(Central Processing Unit,CPU),也可以是特定集成电路(Application Specific Integrated Circuit,ASIC),或者是被配置成实施本发明实施例的一个或多个集成电路,例如:一个或多个微处理器(digital signalprocessor,DSP),或,一个或者多个现场可编程门阵列(Field Programmable Gate Array,FPGA)。It should be noted that the processor 1101 here may be a processor, or may be a general term for multiple processing elements. For example, the processor may be a central processing unit (Central Processing Unit, CPU), a specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention , for example: one or more microprocessors (digital signal processors, DSP), or, one or more field programmable gate arrays (Field Programmable Gate Array, FPGA).
需要说明的是,存储器1102可以是一个存储装置,也可以是多个存储元件的统称,且可以包括随机存储器(RAM),也可以包括非易失性存储器(non-volatile memory),例如磁盘存储器,闪存(Flash)等。存储器1102可主要包括存储指令区和存储数据区。其中,存储指令区可存储操作系统、可被处理器1101执行的指令等;存储数据区可用于存储获取到的最长持稳时间以及与采集到的抖动数据进行比较的预设阈值等。总线1106可以是工业标准体系结构(Industry Standard Architecture,ISA)总线、外部设备互连(PeripheralComponent,PCI)总线或扩展工业标准体系结构(Extended Industry StandardArchitecture,EISA)总线等。该总线1107可以分为地址总线、数据总线、控制总线等。为便于表示,图6中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。It should be noted that the memory 1102 may be a storage device, or may be a collective term for multiple storage elements, and may include random access memory (RAM) or non-volatile memory (non-volatile memory), such as disk storage , Flash memory (Flash) and so on. The memory 1102 may mainly include a storage instruction area and a storage data area. The storage instruction area can store the operating system, instructions that can be executed by the processor 1101, etc.; the storage data area can be used to store the acquired longest holding time and the preset threshold compared with the collected jitter data. The bus 1106 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus 1107 can be divided into an address bus, a data bus, a control bus, and the like. For ease of presentation, only one thick line is used in FIG. 6, but it does not mean that there is only one bus or one type of bus.
需要说明的是,本说明书中的各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其它实施例的不同之处,各个实施例之间相同相似的部分互相参见即可。对于装置实施例而言,由于其与方法实施例基本相似,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。It should be noted that, each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. For the same and similar parts of each embodiment, refer to each other. Can. As for the apparatus embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and reference may be made to the partial description of the method embodiment for related parts.
通过上述实施例的描述,本发明实施例通过获取用户维持终端在稳定状态下的最长持稳时间,并将最长持稳时间与当前环境光线强度下终端计算得到的第一曝光时间比较,在前者大于后者时调节拍照的曝光时间和感光度,使用比第一曝光时间更大的第二曝光时间和比第一感光度更小的第二感光度进行拍照。可以充分匹配当前用户的个体特性来调节拍照参数,提升终端的拍照效果,且可以与现有终端中使用的光学防抖功能兼容,扩展了终端的功能和适用性,提升了用户的拍照体验,利于不同的用户拍出符合自身条件的较佳质量的照片。通过将抖动数据与预设阈值比较,当抖动数据低于预设阈值时便可以判定终端处于稳定状态,统计其处于稳定状态下的最长持稳时间即可,统计结果比较准确,可以良好的体现终端的抖动,利于后续对曝光时间和感光度的调整,得到质量较佳的照片。通过将第二曝光时间调整为最大持稳时间,并依据第一曝光时间、第一感光度和最大持稳时间计算第二感光度,使得最终拍照使用的拍照参数最适合当前用户,可以得到当前环境当前用户可拍摄得到的质量较佳的照片。Through the description of the above embodiments, the embodiment of the present invention obtains the longest holding time for the user to maintain the terminal in a stable state, and compares the longest holding time with the first exposure time calculated by the terminal under the current ambient light intensity, When the former is greater than the latter, the exposure time and sensitivity of the photograph are adjusted, and the photograph is performed using a second exposure time greater than the first exposure time and a second sensitivity less than the first sensitivity. It can fully match the individual characteristics of the current user to adjust the photographing parameters, improve the photographing effect of the terminal, and is compatible with the optical anti-shake function used in the existing terminal, which expands the function and applicability of the terminal and improves the user's photographing experience. It is helpful for different users to take better quality photos that meet their own conditions. By comparing the jitter data with the preset threshold, when the jitter data is lower than the preset threshold, it can be determined that the terminal is in a stable state, and the longest stable time in the stable state can be counted. It reflects the jitter of the terminal, which is conducive to the subsequent adjustment of exposure time and sensitivity, and obtains photos with better quality. By adjusting the second exposure time to the maximum holding time, and calculating the second sensitivity according to the first exposure time, the first sensitivity, and the maximum holding time, so that the photographing parameters used in the final photograph are most suitable for the current user, the current user can be obtained. A better quality photo that can be taken by the current user in the environment.
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于一计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。Those of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiments can be completed by program instructions related to hardware, the aforementioned program can be stored in a computer-readable storage medium, and when the program is executed, execute It includes the steps of the above method embodiments; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk and other media that can store program codes.
以上对本发明实施例所提供的一种拍照的方法及终端进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。The method and terminal for taking pictures provided by the embodiments of the present invention are described above in detail. The principles and implementations of the present invention are described in this paper by using specific examples. The descriptions of the above embodiments are only used to help understand the present invention. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation and application scope. In summary, the content of this specification should not be construed as Limitations of the present invention.
Claims (16)
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2016/086230 WO2017214977A1 (en) | 2016-06-17 | 2016-06-17 | Photographing method and terminal |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107852455A CN107852455A (en) | 2018-03-27 |
CN107852455B true CN107852455B (en) | 2019-07-19 |
Family
ID=60662835
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201680017675.4A Active CN107852455B (en) | 2016-06-17 | 2016-06-17 | A method and terminal for taking pictures |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN107852455B (en) |
WO (1) | WO2017214977A1 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114449164B (en) * | 2021-12-27 | 2023-07-18 | 广州极飞科技股份有限公司 | Photographing method and device, unmanned equipment and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101241294A (en) * | 2007-02-06 | 2008-08-13 | 亚洲光学股份有限公司 | Camera shooting control method and its device |
CN102457675A (en) * | 2010-10-27 | 2012-05-16 | 展讯通信(上海)有限公司 | Image shooting anti-shake mode of handheld camera equipment |
CN102801915A (en) * | 2012-08-28 | 2012-11-28 | 广东欧珀移动通信有限公司 | Automatic photo-taking method of handheld device |
CN104601882A (en) * | 2014-12-30 | 2015-05-06 | 广东欧珀移动通信有限公司 | A panoramic shooting method and terminal |
CN105657273A (en) * | 2016-02-19 | 2016-06-08 | 广东欧珀移动通信有限公司 | Method for setting safety shutter time, device and mobile terminal |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101417816B1 (en) * | 2008-03-06 | 2014-07-09 | 삼성전자주식회사 | A digital image photographing apparatus, an exposure control method of the apparatus, a digital image photographing method, and a computer readable medium recording a program for the digital image photographing method |
CN101895783A (en) * | 2009-05-18 | 2010-11-24 | 华晶科技股份有限公司 | Method for detecting stability of digital camera device and digital camera device |
CN102055899B (en) * | 2009-11-11 | 2012-09-19 | 华晶科技股份有限公司 | Digital image device and method for setting personal safety shutter value |
CN103051841B (en) * | 2013-01-05 | 2016-07-06 | 小米科技有限责任公司 | The control method of time of exposure and device |
-
2016
- 2016-06-17 CN CN201680017675.4A patent/CN107852455B/en active Active
- 2016-06-17 WO PCT/CN2016/086230 patent/WO2017214977A1/en active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101241294A (en) * | 2007-02-06 | 2008-08-13 | 亚洲光学股份有限公司 | Camera shooting control method and its device |
CN102457675A (en) * | 2010-10-27 | 2012-05-16 | 展讯通信(上海)有限公司 | Image shooting anti-shake mode of handheld camera equipment |
CN102801915A (en) * | 2012-08-28 | 2012-11-28 | 广东欧珀移动通信有限公司 | Automatic photo-taking method of handheld device |
CN104601882A (en) * | 2014-12-30 | 2015-05-06 | 广东欧珀移动通信有限公司 | A panoramic shooting method and terminal |
CN105657273A (en) * | 2016-02-19 | 2016-06-08 | 广东欧珀移动通信有限公司 | Method for setting safety shutter time, device and mobile terminal |
Also Published As
Publication number | Publication date |
---|---|
CN107852455A (en) | 2018-03-27 |
WO2017214977A1 (en) | 2017-12-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR102310430B1 (en) | Filming method, apparatus and device | |
EP3633975B1 (en) | Photographic method, photographic apparatus, and mobile terminal | |
US11368615B2 (en) | Modifying image parameters using wearable device input | |
CN103546683B (en) | Camera control system, the mobile device with the system and camera control method | |
WO2019149099A1 (en) | Electronic device, human face recognition method, and relevant product | |
JP2019054536A (en) | Electronic apparatus | |
WO2017124899A1 (en) | Information processing method, apparatus and electronic device | |
JPWO2014155814A1 (en) | Imaging device | |
KR20160035570A (en) | Method and device for photographing | |
CN104469001A (en) | Mobile phone with photographing stabilization function and stabilization method in photographing process of mobile phone | |
CN108810277B (en) | Photo preview method and device | |
WO2014043859A1 (en) | Photographing processing method and terminal device | |
US20150116471A1 (en) | Method, apparatus and storage medium for passerby detection | |
CN101895783A (en) | Method for detecting stability of digital camera device and digital camera device | |
CN104601882B (en) | A kind of panorama shooting method and terminal | |
KR102351496B1 (en) | Image processing apparatus and method for operating thereof | |
WO2017076042A1 (en) | Method and device for image-stabilized photograph capturing and mobile terminal | |
JP2014103643A (en) | Imaging device and subject recognition method | |
CN109151323B (en) | A photographing method and device, terminal, and storage medium | |
WO2019061223A1 (en) | Camera application control method and device | |
CN104994288B (en) | A kind of photographic method and user terminal | |
CN107852455B (en) | A method and terminal for taking pictures | |
US9930267B2 (en) | Image pickup apparatus that automatically generates time-lapse moving image, moving image generation method, and storage medium | |
CN109547703B (en) | Shooting method and device of camera equipment, electronic equipment and medium | |
WO2016184060A1 (en) | Photographing method and device for terminal |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |