CN111654622B - Shooting focusing method and device, electronic equipment and storage medium - Google Patents
Shooting focusing method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN111654622B CN111654622B CN202010465750.1A CN202010465750A CN111654622B CN 111654622 B CN111654622 B CN 111654622B CN 202010465750 A CN202010465750 A CN 202010465750A CN 111654622 B CN111654622 B CN 111654622B
- Authority
- CN
- China
- Prior art keywords
- video
- target
- signal
- shooting
- expression
- 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
Images
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
-
- 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/62—Control of parameters via user interfaces
-
- 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
- H04N23/675—Focus control based on electronic image sensor signals comprising setting of focusing regions
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Human Computer Interaction (AREA)
- Studio Devices (AREA)
Abstract
Description
技术领域technical field
本申请属于电子设备领域,具体涉及一种拍摄对焦方法、装置、电子设备及存储介质。The present application belongs to the field of electronic equipment, and in particular relates to a shooting and focusing method, device, electronic equipment and storage medium.
背景技术Background technique
随着拍摄技术的发展,目前有多种方式实现拍摄对焦。其中一种方式是,用户手指触碰拍摄预览界面的某一个区域,对该区域进行对焦。另一种方式是,利用人工智能技术识别出拍摄预览界面上的目标拍摄对象,对目标拍摄对象进行对焦。With the development of shooting technology, there are many ways to achieve shooting focus. One way is that the user's finger touches a certain area of the shooting preview interface to focus on the area. Another way is to use artificial intelligence technology to identify the target shooting subject on the shooting preview interface, and focus on the target shooting subject.
但是,对于手指触碰进行对焦的方式,可以实现准确对焦,但是需要用户手动操作,对用户来说非常不便捷。对于识别到的目标拍摄对象进行对焦的方式,虽然不需要用户手动操作,但是,有些情况下对焦区域不是很准确。比如,对乱入到拍摄预览界面中的人物进行对焦。However, for the method of focusing by touching a finger, accurate focusing can be achieved, but manual operation by the user is required, which is very inconvenient for the user. As for the way of focusing on the recognized target subject, although the user does not need manual operation, in some cases, the focusing area is not very accurate. For example, focus on people who have randomly entered the shooting preview interface.
发明内容SUMMARY OF THE INVENTION
本申请实施例的目的是提供一种拍摄对焦方法、装置、电子设备及存储介质,能够解决用户需要手动操作对焦以及对焦区域的准确性不高的问题。The purpose of the embodiments of the present application is to provide a photographing focusing method, device, electronic device and storage medium, which can solve the problems that the user needs to manually operate the focusing and the accuracy of the focusing area is not high.
为了解决上述技术问题,本申请是这样实现的:In order to solve the above technical problems, this application is implemented as follows:
第一方面,本申请实施例提供了一种拍摄对焦方法,包括:In a first aspect, an embodiment of the present application provides a method for shooting and focusing, including:
在显示拍摄预览界面的情况下,获取包括目标拍摄对象的第一视频,所述第一视频由第一预定时间段内在所述拍摄预览界面上显示的多帧历史预览画面形成;In the case of displaying the shooting preview interface, acquiring a first video including the target shooting object, where the first video is formed by multiple frames of historical preview images displayed on the shooting preview interface within a first predetermined period of time;
对所述第一视频中的所述目标拍摄对象的表情动作进行放大处理,得到第二视频;Enlarging the facial expressions of the target shooting object in the first video to obtain a second video;
识别所述第二视频中的所述目标拍摄对象的表情区域;Identifying the facial expression area of the target shooting object in the second video;
对所述拍摄预览界面上的所述表情区域进行对焦。Focusing on the expression area on the shooting preview interface.
第二方面,本申请实施例提供了一种拍摄对焦装置,包括:In a second aspect, an embodiment of the present application provides a photographing focusing device, including:
视频获取模块,用于在显示拍摄预览界面的情况下,获取包括目标拍摄对象的第一视频,所述第一视频由第一预定时间段内在所述拍摄预览界面上显示的多帧历史预览画面形成;A video acquisition module, configured to acquire a first video including a target shooting object when the shooting preview interface is displayed, and the first video is composed of multiple frames of historical preview images displayed on the shooting preview interface within a first predetermined period of time form;
放大处理模块,用于对所述第一视频中的所述目标拍摄对象的表情动作进行放大处理,得到第二视频;an amplification processing module, configured to perform amplification processing on the facial expressions of the target shooting object in the first video to obtain a second video;
表情区域识别模块,用于识别所述第二视频中的所述目标拍摄对象的表情区域;an expression area identification module for identifying the expression area of the target shooting object in the second video;
区域对焦模块,用于对所述拍摄预览界面上的所述表情区域进行对焦。An area focusing module, configured to focus on the expression area on the shooting preview interface.
第三方面,本申请实施例提供了一种电子设备,该电子设备包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如第一方面所述的方法的步骤。In a third aspect, embodiments of the present application provide an electronic device, the electronic device includes a processor, a memory, and a program or instruction stored on the memory and executable on the processor, the program or instruction being The processor implements the steps of the method according to the first aspect when executed.
第四方面,本申请实施例提供了一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如第一方面所述的方法的步骤。In a fourth aspect, an embodiment of the present application provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or instruction is executed by a processor, the steps of the method according to the first aspect are implemented .
第五方面,本申请实施例提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如第一方面所述的方法。In a fifth aspect, an embodiment of the present application provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction, and implement the first aspect the method described.
在本申请实施例中,在显示拍摄预览界面的情况下,获取由多帧历史预览画面形成的第一视频。然后对第一视频中的目标拍摄对象的表情动作进行放大处理,得到第二视频。再识别第二视频中的目标拍摄对象的表情区域,对拍摄预览界面上的表情区域进行对焦。由于对第一视频中的表情动作进行放大处理,从而将第一视频中的不明显的表情动作变得更加明显,由此可以更加准确地识别出目标拍摄对象的表情区域。然后,基于表情区域进行对焦,可以保证对焦区域的准确性。另外,本申请实施例可以自动对焦,不需要用户手动操作对焦,从而方便用户进行拍摄。In the embodiment of the present application, in the case where the shooting preview interface is displayed, a first video formed by multiple frames of historical preview images is acquired. Then, the facial expressions of the target shooting object in the first video are enlarged to obtain a second video. Then, the facial expression area of the target shooting object in the second video is identified, and the facial expression area on the photographing preview interface is focused. Since the facial expressions in the first video are enlarged, the inconspicuous facial expressions in the first video become more obvious, so that the facial expression area of the target object can be more accurately identified. Then, focusing based on the expression area can ensure the accuracy of the focusing area. In addition, the embodiment of the present application can automatically focus, and does not require the user to manually operate the focus, thereby facilitating the user to shoot.
附图说明Description of drawings
图1是本申请提供的一个实施例的拍摄对焦方法的流程示意图;1 is a schematic flowchart of a method for shooting and focusing according to an embodiment of the present application;
图2是本申请提供的另一个实施例的拍摄对焦方法的流程示意图;FIG. 2 is a schematic flowchart of a photographing and focusing method according to another embodiment of the present application;
图3是本申请提供的一个实施例的包括多个表情动作的拍摄预览界面的示意图;3 is a schematic diagram of a shooting preview interface including multiple facial expressions according to an embodiment provided by the present application;
图4是本申请提供的一个实施例的包括灵敏度调节控件的拍摄预览界面的示意图;4 is a schematic diagram of a shooting preview interface including a sensitivity adjustment control according to an embodiment provided by the present application;
图5是本申请提供的一个实施例的拍摄对焦装置的结构示意图;5 is a schematic structural diagram of a photographing focusing device according to an embodiment of the present application;
图6为实现本申请实施例的一种电子设备的硬件结构示意图。FIG. 6 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.
本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施。此外,说明书以及权利要求中“和/或”表示所连接对象的至少其中之一,字符“/”,一般表示前后关联对象是一种“或”的关系。The terms "first", "second" and the like in the description and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It is to be understood that data so used may be interchanged under appropriate circumstances so that embodiments of the application can be practiced in sequences other than those illustrated or described herein. In addition, "and/or" in the description and claims indicates at least one of the connected objects, and the character "/" generally indicates that the associated objects are in an "or" relationship.
下面结合附图,通过具体的实施例及其应用场景对本申请实施例提供的拍摄对焦方法进行详细地说明。The following describes the shooting focusing method provided by the embodiments of the present application in detail through specific embodiments and application scenarios with reference to the accompanying drawings.
图1是本申请提供的一个实施例的拍摄对焦方法的流程示意图。该拍摄对焦方法可以应用于拍摄对焦装置,如图1所示,拍摄对焦方法包括:FIG. 1 is a schematic flowchart of a photographing focusing method according to an embodiment of the present application. The shooting focusing method can be applied to a shooting focusing device. As shown in FIG. 1 , the shooting focusing method includes:
步骤102,在显示拍摄预览界面的情况下,获取包括目标拍摄对象的第一视频,第一视频由第一预定时间段内在拍摄预览界面上显示的多帧历史预览画面形成。
需要说明的是,在显示拍摄预览界面的期间,缓存在拍摄预览界面上显示的预览画面。由此,可以在缓存的预览画面中获取第一预定时间段内在拍摄预览界面上显示的多帧历史预览画面,然后形成第一视频。It should be noted that, during the period when the shooting preview interface is displayed, the preview image displayed on the shooting preview interface is cached. Thereby, multiple frames of historical preview images displayed on the shooting preview interface within the first predetermined period of time can be acquired from the cached preview images, and then the first video is formed.
比如,在显示拍摄预览界面的情况下,在缓存的预览画面中获取最近5秒内在拍摄预览界面上显示的多帧历史预览画面。For example, when the shooting preview interface is displayed, the multi-frame historical preview images displayed on the shooting preview interface in the last 5 seconds are obtained from the cached preview image.
步骤104,对第一视频中的目标拍摄对象的表情动作进行放大处理,得到第二视频。Step 104: Enlarging the facial expressions of the target shooting object in the first video to obtain a second video.
步骤106,识别第二视频中的目标拍摄对象的表情区域。Step 106: Identify the facial expression area of the target shooting object in the second video.
可选地,识别第二视频中的目标拍摄对象的表情区域,可以包括:提取第二视频中的多个区域,将提取的每个区域输入至预先训练好的深度学习模型中,以得到提取的每个区域是否为表情区域。Optionally, identifying the facial expression area of the target shooting object in the second video may include: extracting multiple areas in the second video, and inputting each extracted area into a pre-trained deep learning model to obtain extraction. Whether each area of is an expression area.
可选地,识别第二视频中的目标拍摄对象的表情区域,可以包括:提取第二视频中的多个区域;将提取的每个区域与预存储的人脸表情图像进行相似度匹配,以得到提取的每个区域是否为表情区域。Optionally, identifying the facial expression area of the target shooting object in the second video may include: extracting multiple areas in the second video; performing similarity matching between each extracted area and a pre-stored facial expression image to Get whether each extracted area is an expression area.
步骤108,对拍摄预览界面上的表情区域进行对焦。
比如,第二视频中的表情区域为第二视频的某一帧图像上的微笑表情动作的截图。识别出拍摄预览界面上的与该截图匹配的表情区域,然后对拍摄预览界面上的与该截图匹配的表情区域进行对焦。For example, the expression area in the second video is a screenshot of a smile expression action on a certain frame of the second video. Identify the facial expression area on the shooting preview interface that matches the screenshot, and then focus on the facial expression area that matches the screenshot on the photographing preview interface.
在本申请实施例中,在显示拍摄预览界面的情况下,获取由多帧历史预览画面形成的第一视频。然后对第一视频中的目标拍摄对象的表情动作进行放大处理,得到第二视频。再识别第二视频中的目标拍摄对象的表情区域,对拍摄预览界面上的表情区域进行对焦。由于对第一视频中的表情动作进行放大处理,从而将第一视频中的不明显的表情动作变得更加明显,由此可以更加准确地识别出目标拍摄对象的表情区域。然后,基于表情区域进行对焦,可以保证对焦区域的准确性。另外,通过本申请实施例,用户做出表情动作可以实现对用户进行对焦,不需要用户手动操作对焦,从而方便用户进行拍摄。In the embodiment of the present application, in the case where the shooting preview interface is displayed, a first video formed by multiple frames of historical preview images is acquired. Then, the facial expressions of the target shooting object in the first video are enlarged to obtain a second video. Then, the facial expression area of the target shooting object in the second video is identified, and the facial expression area on the photographing preview interface is focused. Since the facial expressions in the first video are enlarged, the inconspicuous facial expressions in the first video become more obvious, so that the facial expression area of the target object can be more accurately identified. Then, focusing based on the expression area can ensure the accuracy of the focusing area. In addition, through the embodiments of the present application, the user can focus on the user by making an expression action, and the user does not need to manually operate the focus, thereby facilitating the user to shoot.
在本申请的一个或多个实施例中,步骤104可以包括:In one or more embodiments of the present application,
利用目标滤波器,对第一视频的信号进行滤波,得到第一视频的与表情动作相关的第一信号;Using the target filter, the signal of the first video is filtered to obtain the first signal related to the facial expression of the first video;
按照目标放大倍数,对第一信号进行放大处理,得到目标信号;According to the target amplification factor, amplify the first signal to obtain the target signal;
根据目标信号,生成第二视频。Based on the target signal, a second video is generated.
可选地,在利用目标滤波器,对第一视频的信号进行滤波,得到第一视频的与表情动作相关的第一信号之前,先利用包括表情动作的样本数据对用于欧式视频放大的初始滤波器进行训练,得到用于对表情动作进行放大处理的目标滤波器。在启动相机之后,可以直接使用目标滤波器。可选地,目标滤波器可以训练一次即可,训练完成之后,可以直接使用目标滤波器进行滤波,此后可以不用重新进行训练。Optionally, before using the target filter to filter the signal of the first video to obtain the first signal related to the facial expression of the first video, use the sample data including the facial expression to first use the sample data of the European-style video enlargement. The filter is trained to obtain the target filter for amplifying the facial expression. The target filter can be used directly after starting the camera. Optionally, the target filter can be trained once, and after the training is completed, the target filter can be directly used for filtering, and then there is no need to retrain.
可选地,目标放大倍数可以为预先设置的倍数或者由用户设置的放大倍数。Optionally, the target magnification may be a preset magnification or a magnification set by the user.
在本申请实施例可以利用欧式视频放大技术对表情动作进行放大处理。具体地,先利用目标滤波器对第一视频的信号进行滤波,可以得到与表情动作相关的第一信号,并滤除掉与表情动作无关的第二信号。然后,按照目标放大倍数对与表情动作相关的第一信号进行放大处理,得到表情动作放大后的目标信号。再根据表情动作放大后的目标信号生成第二视频。相比于第一视频,第二视频中的目标拍摄对象的表情动作更加明显,由此,可以利用第二视频更加准确地识别出目标拍摄对象的表情区域。In this embodiment of the present application, the European-style video magnification technology may be used to perform magnification processing on facial expressions. Specifically, by first filtering the signal of the first video by using the target filter, the first signal related to the facial expression can be obtained, and the second signal not related to the facial expression can be filtered out. Then, amplify the first signal related to the facial expression according to the target magnification, so as to obtain an amplified target signal of the facial expression. Then, a second video is generated according to the amplified target signal of the facial expression. Compared with the first video, the facial expressions of the target photographing subject in the second video are more obvious, and thus, the facial expression area of the target photographing subject can be more accurately identified by using the second video.
在本申请的一个或多个实施例中,利用目标滤波器,对第一视频的信号进行滤波,得到第一视频的与表情动作相关的第一信号之前,拍摄对焦方法还包括:In one or more embodiments of the present application, before using the target filter to filter the signal of the first video to obtain the first signal related to the facial expression of the first video, the method for shooting and focusing further includes:
将第一视频的时域信号转换为多个频段的频域信号;converting the time domain signal of the first video into frequency domain signals of multiple frequency bands;
其中,利用目标滤波器,对第一视频的信号进行滤波,得到第一视频的与表情动作相关的第一信号,包括:Wherein, using the target filter, the signal of the first video is filtered to obtain the first signal related to the facial expression of the first video, including:
利用目标滤波器,对频域信号进行滤波,得到频域信号中的与表情动作相关的第一信号;Using the target filter, the frequency domain signal is filtered to obtain the first signal related to the facial expression in the frequency domain signal;
根据目标信号,生成第二视频,包括:According to the target signal, a second video is generated, including:
对目标信号以及第二信号进行频域至时域的转换,得到第二视频。The target signal and the second signal are converted from frequency domain to time domain to obtain a second video.
可选地,根据目标信号,生成第二视频,可以包括:根据目标信号以及与表情动作无关的第二信号,生成第二视频。Optionally, generating the second video according to the target signal may include: generating the second video according to the target signal and a second signal unrelated to expressions and actions.
根据目标信号以及与表情动作无关的第二信号,生成第二视频,可以具体包括:对目标信号以及滤波时滤除掉的与表情动作无关的第二信号进行频域至时域的转换,得到第二视频。Generating the second video according to the target signal and the second signal irrelevant to the expression action may specifically include: converting the target signal and the second signal irrelevant to the expression action filtered out during the filtering from frequency domain to time domain, to obtain Second video.
下面通过一个具体的例子对本申请实施例的拍摄对焦方法进行说明。该拍摄对焦方法应用于拍摄对焦装置。如图2所示,拍摄对焦方法包括:The following describes the shooting focusing method of the embodiment of the present application by using a specific example. The photographing focusing method is applied to a photographing focusing device. As shown in Figure 2, the shooting focusing method includes:
步骤202,在显示拍摄预览界面的情况下,获取包括目标拍摄对象的第一视频,第一视频由第一预定时间段内在拍摄预览界面上显示的多帧历史预览画面形成。
步骤204,将第一视频的时域信号转换为多个频段的频域信号。Step 204: Convert the time domain signal of the first video into frequency domain signals of multiple frequency bands.
步骤206,利用目标滤波器,对频域信号进行滤波,得到频域信号中与表情动作相关的第一信号以及与表情动作无关的第二信号。
步骤208,按照目标放大倍数,对第一信号进行放大处理,得到目标信号。Step 208: Amplify the first signal according to the target amplification factor to obtain the target signal.
步骤210,对目标信号进行频域至时域的转换,得到第二视频。Step 210: Convert the target signal from the frequency domain to the time domain to obtain a second video.
步骤212,识别第二视频中的目标拍摄对象的表情区域。
步骤214,对拍摄预览界面上的表情区域进行对焦。
需要说明的是,本申请实施例中的步骤202与图1实施例中的步骤102类似,本申请实施例中的步骤212与图1实施例中的步骤106类似,本申请实施例中的步骤214与图1实施例中的步骤108类似,在此不再重复赘述。下面主要说明本申请实施例中的步骤204至步骤210。It should be noted that
在本申请实施例的步骤204中,可以利用快速傅里叶变换将第一视频的时域信号转换为多个频段的频域信号。In
需要说明的是,时域是描述数学函数或物理信号对时间的关系。例如一个信号的时域波形可以表达信号随着时间的变化。若考虑离散时间,时域中的函数或信号,在各个离散时间点的数值均为已知。若考虑连续时间,则函数或信号在任意时间的数值均为已知。在研究时域信号时,常会用示波器将信号转换为其时域的波形。时域信号为某一频率的波以时间轴为x轴,以振幅为y轴的波形数据。It should be noted that the time domain describes the relationship of mathematical functions or physical signals to time. For example, the time domain waveform of a signal can express the change of the signal over time. If discrete time is considered, a function or signal in the time domain has known values at each discrete time point. If continuous time is considered, the value of a function or signal at any time is known. When studying time-domain signals, an oscilloscope is often used to convert the signal to its time-domain waveform. The time domain signal is the waveform data of a certain frequency wave with the time axis as the x-axis and the amplitude as the y-axis.
视频的时域信号是对视频的模拟信号进行编码得到的数字信号,该数字信号为在时间轴的方向上的波形数据。其中,视频的模拟信号为每一帧图像是获取的真实图像信号。The time domain signal of the video is a digital signal obtained by encoding the analog signal of the video, and the digital signal is waveform data in the direction of the time axis. Among them, the analog signal of the video is the real image signal obtained for each frame of image.
频域(frequency domain)是描述信号在频率方面特性时用到的一种坐标系。频域的自变量是频率,即横轴是频率,纵轴是该频率信号的幅度,也就是通常说的频谱图。频谱图描述了信号的频率结构及频率与该频率信号幅度的关系。即,频率信号为以频率为x轴,以振幅为y轴的某一时刻的频谱数据。The frequency domain is a coordinate system used to describe the characteristics of a signal in terms of frequency. The independent variable in the frequency domain is the frequency, that is, the horizontal axis is the frequency, and the vertical axis is the amplitude of the frequency signal, which is commonly referred to as a spectrogram. A spectrogram describes the frequency structure of a signal and the relationship between frequency and signal amplitude at that frequency. That is, the frequency signal is spectral data at a certain time with the frequency on the x-axis and the amplitude on the y-axis.
在本申请实施例的步骤206中,利用目标滤波器,对频域信号进行滤波,得到频域信号中与表情动作相关的第一信号。该第一信号可以包括一些微小表情动作的信号。比如,第一信号包括用户嘴角微微上扬的信号、用户眉毛上挑的信号和用户眨眼的信号中的至少一项。In
另外,通过对频域信号进行滤波,还得到频域信号中的与表情动作无关的第二信号,第二信号为频域信号中的除了与表情动作相关的信号之外的信号。In addition, by filtering the frequency-domain signal, a second signal in the frequency-domain signal unrelated to the expression action is also obtained, and the second signal is a signal in the frequency-domain signal except the signal related to the expression action.
在本申请实施例的步骤208中,通过对第一信号的幅度进行放大,由此实现对第一信号进行放大处理。In
在本申请实施例的步骤210中,由于进行信号放大后的目标信号为频域信号,因此,为了进行视频还原,利用反傅里叶变换将目标信号进行频域至时域的转换,得到第二视频,从而实现视频还原。In
在本申请实施例中,先将第一视频由时域信号转换为频域信号,然后通过进行滤波得到频域信号中的与表情动作相关的第一信号,对该第一信号进行放大处理。在放大第一信号之后,基于放大后的目标信号进行视频还原。由此,实现了对第一视频中的表情动作进行放大处理,这样就可以更加准确地识别出用户的表情动作,从而对用户表情动作进行更加精准地对焦。In this embodiment of the present application, the first video is first converted from a time domain signal to a frequency domain signal, and then a first signal related to an expression in the frequency domain signal is obtained by filtering, and the first signal is amplified. After amplifying the first signal, video restoration is performed based on the amplified target signal. In this way, the enlargement processing of the facial expression in the first video is realized, so that the facial expression of the user can be more accurately recognized, and the facial expression of the user can be more accurately focused.
在本申请的一个或多个实施例中,利用目标滤波器,对第一视频的信号进行滤波,得到第一视频的与表情动作相关的第一信号之前,拍摄对焦方法还包括:In one or more embodiments of the present application, before using the target filter to filter the signal of the first video to obtain the first signal related to the facial expression of the first video, the method for shooting and focusing further includes:
在拍摄预览界面上显示至少一个标识信息,每个标识信息用于指示对应的表情动作,表情动作为对预定时间段内在拍摄预览界面上显示的多帧历史预览画面进行放大处理得到,其中,预定时间段为在第一视频的时间段之前的时间段;At least one piece of identification information is displayed on the shooting preview interface, and each identification information is used to indicate a corresponding facial expression, and the facial expression is obtained by enlarging the multi-frame historical preview images displayed on the shooting preview interface within a predetermined period of time, wherein the predetermined The time period is the time period before the time period of the first video;
接收用户对至少一个标识信息中的目标标识信息的第一输入,其中,目标标识信息用于指示目标表情动作;receiving a first input from a user to target identification information in at least one identification information, wherein the target identification information is used to indicate a target facial expression;
其中,利用目标滤波器,对第一视频的信号进行滤波,得到第一视频的与表情动作相关的第一信号,包括:Wherein, using the target filter, the signal of the first video is filtered to obtain the first signal related to the facial expression of the first video, including:
响应于第一输入,利用与目标表情动作对应的目标滤波器,对第一视频的信号进行滤波,得到第一视频的与目标表情动作相关的第一信号。In response to the first input, a target filter corresponding to the target facial expression is used to filter the signal of the first video to obtain a first signal of the first video related to the target facial expression.
下面结合图3说明本申请实施例。The embodiment of the present application will be described below with reference to FIG. 3 .
如图3所示,在拍摄预览界面上显示多个表情动作,在接收到用户选择中间眨眼动作的第一输入的情况下,利用眨眼动作对应的目标滤波器,对第一视频的信号进行滤波,得到与眨眼动作相关的第一信号。然后对第一信号进行放大处理,并进行视频还原,得到第二视频。那么,第二视频中的眨眼动作相比于第一视频而言更加明显。由此,根据第二视频可以更加准确地识别出用户做出了眨眼动作。As shown in FIG. 3 , a plurality of facial expressions are displayed on the shooting preview interface, and in the case of receiving the first input that the user selects the middle blinking action, the signal of the first video is filtered by using the target filter corresponding to the blinking action , get the first signal related to the blinking action. Then, the first signal is amplified, and the video is restored to obtain the second video. Then, the blinking action in the second video is more obvious than that in the first video. In this way, according to the second video, it can be more accurately recognized that the user has made a blinking action.
在本申请实施例中,用户可以根据自己的需求选择需要对焦的表情动作,如此,拍摄对焦装置可以对拍摄预览界面上用户选择的表情动作进行对焦,从而使得对焦的区域满足用户的拍摄需求。In this embodiment of the present application, the user can select the facial expression action that needs to be focused according to his own needs. In this way, the photographing focusing device can focus on the facial expression action selected by the user on the photographing preview interface, so that the focused area meets the user's photographing needs.
下面通过一个具体的例子说明本申请实施例。The embodiments of the present application are described below by using a specific example.
在开启相机之后,缓存在拍摄预览界面上显示的预览画面。在已经缓存有5秒的预览画面的情况下,根据这5秒的预览画面,生成一段视频。对该视频的目标拍摄对象的表情动作进行放大处理。其中,此处的放大处理方式与上述对第一视频的放大处理方式类似,在此不再重复赘述。需要说明的是,对由上述5秒的预览画面生成的视频进行放大处理所使用的滤波器可以是预先设定的滤波器。After the camera is turned on, the preview image displayed on the shooting preview interface is cached. In the case where a preview image of 5 seconds has been cached, a video is generated according to the preview image of 5 seconds. The facial expressions of the target shooting subject of the video are enlarged. The enlargement processing method here is similar to the above-mentioned enlargement processing method for the first video, and details are not repeated here. It should be noted that the filter used for the enlargement process of the video generated from the 5-second preview screen may be a preset filter.
然后对放大处理后的视频中的目标拍摄对象的表情动作进行识别,并识别出3个表情动作。将这3个表情动作显示在拍摄预览界面上,以供用户在这3个表情动作中选择目标表情动作。Then, the facial expressions of the target shooting object in the enlarged video are recognized, and three facial expressions are identified. The three facial expressions are displayed on the shooting preview interface, so that the user can select a target facial expression among the three facial expressions.
在用户选择目标表情动作之后,在已缓存的历史预览画面中重新获取最近5秒内显示在拍摄预览界面上的预览画面,由该预览画面形成第一视频。然后,利用目标表情动作对应的目标滤波器,对第一视频的信号进行滤波。然后进行信号放大、视频还原、识别表情区域以及对焦,由于上述已经对这些步骤进行了说明,在此不再赘述。After the user selects the target facial expression, the preview image displayed on the shooting preview interface in the last 5 seconds is re-acquired from the cached historical preview image, and the first video is formed from the preview image. Then, the signal of the first video is filtered by using the target filter corresponding to the target facial expression. Then, perform signal amplification, video restoration, recognition of expression areas, and focusing. Since these steps have been described above, they will not be repeated here.
在本申请实施例中,在拍摄预览界面上显示经过视频放大处理后识别出的一系列表情动作,使得用户可以从中选择不同的表情动作作为对焦的对象,从而使得对焦的区域满足用户的拍摄需求。In the embodiment of the present application, a series of facial expressions recognized after the video magnification process is displayed on the shooting preview interface, so that the user can select different facial expressions as the focus object, so that the focused area can meet the user's shooting needs .
在本申请的一个或多个实施例中,获取目标拍摄对象的多个表情动作,包括:利用人脸识别,识别拍摄预览界面上的目标拍摄对象的多个表情动作。In one or more embodiments of the present application, acquiring multiple facial expressions of the target photographing subject includes: using face recognition to identify the multiple facial expressions of the target photographing subject on the photographing preview interface.
在本申请的一个或多个实施例中,按照预定放大倍数,对第一信号进行放大处理,得到目标信号之前,拍摄对焦方法还包括:In one or more embodiments of the present application, the first signal is amplified according to a predetermined magnification, and before the target signal is obtained, the photographing and focusing method further includes:
在拍摄预览界面上显示灵敏度调节控件的情况下,接收用户对灵敏度调节控件的第二输入;Under the condition that the sensitivity adjustment control is displayed on the shooting preview interface, receive a second input from the user to the sensitivity adjustment control;
响应于第二输入,获取与第二输入相关的目标灵敏度值;in response to the second input, obtaining a target sensitivity value associated with the second input;
根据预设的灵敏度值与放大倍数之间的关联关系,确定目标灵敏度值关联的目标放大倍数。According to the relationship between the preset sensitivity value and the magnification, the target magnification associated with the target sensitivity value is determined.
比如,参考图4,在拍摄预览界面上显示灵敏度调节控件302,用户可以在灵敏度调节控件302上进行滑动,从而调节目标灵敏度值。For example, referring to FIG. 4 , a
其中,目标灵敏度值越高,目标放大倍数越大,这样第二视频中的表情动作越明显。由此,即使用户做出微小的表情动作,也可以识别出具有该表情动作的表情区域,并对拍摄预览界面上的表情区域进行对焦。相反地,目标灵敏度值越低,目标放大倍数越小,用户需要做出较大幅度的表情动作,以便识别出具有该表情动作的表情区域。Wherein, the higher the target sensitivity value is, the larger the target magnification is, so that the facial expressions in the second video are more obvious. Thus, even if the user makes a slight facial movement, the facial expression area with the facial expression can be identified, and the facial expression area on the shooting preview interface can be focused. Conversely, the lower the target sensitivity value is, the smaller the target magnification is, and the user needs to make a larger expressive action in order to identify the expressive region with the expressive action.
在本申请实施例中,用户可以根据自己需求调节目标灵敏度值,从而调节目标放大倍数,可以满足用户本人的拍摄对焦的需求。其中,用户可以将灵敏度调节至合适的数值,可以防止出现误对焦的情况。In the embodiment of the present application, the user can adjust the target sensitivity value according to his own needs, thereby adjusting the target magnification, which can meet the user's own needs for shooting and focusing. Among them, the user can adjust the sensitivity to an appropriate value, which can prevent misfocus.
在本申请的一个或多个实施例中,识别第二视频中的目标拍摄对象的表情区域之后,且对拍摄预览界面上的表情区域进行对焦之前,拍摄对焦方法还包括:In one or more embodiments of the present application, after recognizing the facial expression area of the target shooting object in the second video and before focusing the facial expression area on the photographing preview interface, the photographing focusing method further includes:
在表情区域包括至少一个表情区域的情况下,在拍摄预览界面上显示至少一个表情区域;In the case that the expression area includes at least one expression area, displaying the at least one expression area on the shooting preview interface;
接收用户对至少一个表情区域中的目标表情区域的第三输入;receiving a third input from the user to the target expression area in the at least one expression area;
对拍摄预览界面上的表情区域进行对焦,包括:Focus on the expression area on the shot preview interface, including:
响应于第三输入,对拍摄预览界面上的目标表情区域进行对焦。In response to the third input, the target expression area on the shooting preview interface is focused.
比如,在对人物A进行拍照的情况下,附近的人物B乱入到拍摄预览界面中。在此情况下,识别出第二视频中的人物A的微笑表情区域以及人物B的眨眼表情区域。然后,在拍摄预览界面上显示微笑表情区域和眨眼表情区域。在用户选择微笑表情区域的情况下,对拍摄预览界面上的微笑表情区域进行对焦。由此,实现了对人物A的表情进行对焦。For example, in the case of taking a picture of person A, nearby person B randomly enters the shooting preview interface. In this case, the smiling expression area of the person A and the winking expression area of the person B in the second video are recognized. Then, the smiling expression area and the winking expression area are displayed on the shooting preview interface. When the user selects the smile expression area, focus on the smile expression area on the shooting preview interface. Thereby, focusing on the expression of the person A is achieved.
在本申请实施例中,在拍摄预览界面上显示识别到的至少一个表情区域,由用户选择对目标表情区域进行对焦,使得对焦结果满足用户需求。In the embodiment of the present application, at least one recognized expression area is displayed on the shooting preview interface, and the user selects to focus on the target expression area, so that the focusing result meets the user's requirement.
在本申请的一个或多个实施例中,对拍摄预览界面上的表情区域进行对焦之后,拍摄对焦方法还包括:In one or more embodiments of the present application, after focusing the expression area on the shooting preview interface, the shooting focusing method further includes:
在表情区域内的表情动作为预定表情动作的情况下,进行拍摄,得到目标拍摄图像。When the facial expression in the facial expression area is a predetermined facial expression, photographing is performed to obtain a target photographed image.
可选地,在识别第二视频中的目标拍摄对象的表情区域之后,获取第二视频中的上述表情区域内的表情动作。然后在表情区域内的表情动作为预定表情动作的情况下,拍摄照片或拍摄视频,得到目标拍摄图像。该目标拍摄图像可以为照片或者视频中的帧图像。Optionally, after identifying the facial expression area of the target shooting object in the second video, the facial expressions in the above facial expression area in the second video are acquired. Then, if the facial expression in the facial expression area is a predetermined facial expression, take a photo or a video to obtain the target photographed image. The target captured image may be a frame image in a photo or a video.
下面以预定表情动作为微笑动作为例进行说明。In the following, the predetermined facial expression is taken as an example of the smiling action for description.
比如,识别出第二视频中的用户A的表情区域,并识别出该表情区域内的表情动作为微笑动作。基于此,对拍摄预览界面上的用户A的微笑动作的区域进行对焦,在对焦之后自动进行拍摄,得到用户A的照片或者视频。For example, the facial expression area of user A in the second video is identified, and the facial expression in the facial expression area is identified as a smiling action. Based on this, focus on the area where user A's smiling action is captured on the preview interface, and automatically shoot after focusing to obtain a photo or video of user A.
在本申请的实施例中,在表情区域内的表情动作为预定表情动作的情况下,自动进行拍摄,不需要用户手动点击拍摄按钮,从而在拍摄时避免用户手动触发拍摄指令,比如,不需要用户点击拍摄按钮。由此,方便用户进行拍摄。In the embodiment of the present application, when the facial expression in the facial expression area is a predetermined facial expression, the photographing is performed automatically, and the user does not need to manually click the photographing button, thereby avoiding the user's manual triggering of photographing instructions during photographing. The user clicks the capture button. Thereby, it is convenient for the user to photograph.
需要说明的是,上述实施例中以执行主体为拍摄对焦装置为例说明执行拍摄对焦方法。但是,本申请实施例提供的拍摄对焦方法的执行主体不限于拍摄对焦装置,也可以为该拍摄对焦装置中的用于执行加载拍摄对焦方法的控制模块。It should be noted that, in the above-mentioned embodiments, the executing subject is the photographing focusing device as an example to describe the executing photographing focusing method. However, the executing subject of the photographing focusing method provided by the embodiments of the present application is not limited to the photographing focusing device, and may also be a control module in the photographing focusing device for executing the loading photographing focusing method.
与本申请实施例提供的拍摄对焦方法相应地,本申请实施例提供一种拍摄对焦装置。图5是本申请提供的一个实施例的拍摄对焦装置的结构示意图。如图5所示,拍摄对焦装置包括:Corresponding to the photographing and focusing method provided by the embodiment of the present application, the embodiment of the present application provides a photographing and focusing device. FIG. 5 is a schematic structural diagram of a photographing and focusing device according to an embodiment of the present application. As shown in Figure 5, the photographing focusing device includes:
视频获取模块402,用于在显示拍摄预览界面的情况下,获取包括目标拍摄对象的第一视频,第一视频由第一预定时间段内在拍摄预览界面上显示的多帧历史预览画面形成;The
放大处理模块404,用于对第一视频中的目标拍摄对象的表情动作进行放大处理,得到第二视频;an
表情区域识别模块406,用于识别第二视频中的目标拍摄对象的表情区域;Expression
区域对焦模块408,用于对拍摄预览界面上的表情区域进行对焦。The
在本申请实施例中,在显示拍摄预览界面的情况下,获取由多帧历史预览画面形成的第一视频。然后对第一视频中的目标拍摄对象的表情动作进行放大处理,得到第二视频。再识别第二视频中的目标拍摄对象的表情区域,对拍摄预览界面上的表情区域进行对焦。由于对第一视频中的表情动作进行放大处理,从而将第一视频中的不明显的表情动作变得更加明显,由此可以更加准确地识别出目标拍摄对象的表情区域。然后,基于表情区域进行对焦,可以保证对焦区域的准确性。另外,本申请实施例可以自动对焦,不需要用户手动操作对焦,从而方便用户进行拍摄。In the embodiment of the present application, in the case where the shooting preview interface is displayed, a first video formed by multiple frames of historical preview images is acquired. Then, the facial expressions of the target shooting object in the first video are enlarged to obtain a second video. Then, the facial expression area of the target shooting object in the second video is identified, and the facial expression area on the photographing preview interface is focused. Since the facial expressions in the first video are enlarged, the inconspicuous facial expressions in the first video become more obvious, so that the facial expression area of the target object can be more accurately identified. Then, focusing based on the expression area can ensure the accuracy of the focusing area. In addition, the embodiment of the present application can automatically focus, and does not require the user to manually operate the focus, thereby facilitating the user to shoot.
在本申请的一个或多个实施例中,放大处理模块404包括:In one or more embodiments of the present application, the
信号滤波模块,用于利用目标滤波器,对第一视频的信号进行滤波,得到第一视频的与表情动作相关的第一信号;a signal filtering module, used for using the target filter to filter the signal of the first video to obtain the first signal related to the facial expression of the first video;
信号放大模块,用于按照目标放大倍数,对第一信号进行放大处理,得到目标信号;The signal amplification module is used for amplifying the first signal according to the target amplification factor to obtain the target signal;
视频还原模块,用于根据目标信号,生成第二视频。The video restoration module is used for generating the second video according to the target signal.
在本申请实施例中,先利用目标滤波器对第一视频的信号进行滤波,可以得到与表情动作相关的第一信号,并滤除掉与表情动作无关的第二信号。然后,按照目标放大倍数对与表情动作相关的第一信号进行放大处理,得到表情动作放大后的目标信号。再根据表情动作放大后的目标信号以及滤波时滤除掉的与表情动作无关的第二信号,进行视频还原,得到第二视频。相比于第一视频,第二视频中的目标拍摄对象的表情动作更加明显,由此,可以利用第二视频更加准确地识别出目标拍摄对象的表情区域。In the embodiment of the present application, the target filter is used to filter the signal of the first video first, so as to obtain the first signal related to the facial expression, and filter out the second signal not related to the facial expression. Then, amplify the first signal related to the facial expression according to the target magnification, so as to obtain an amplified target signal of the facial expression. Then, the video is restored according to the amplified target signal of the facial expression and the second signal unrelated to the facial expression that is filtered out during filtering to obtain a second video. Compared with the first video, the facial expressions of the target photographing subject in the second video are more obvious, and thus, the facial expression area of the target photographing subject can be more accurately identified by using the second video.
在本申请的一个或多个实施例中,拍摄对焦装置还包括:In one or more embodiments of the present application, the photographing and focusing device further includes:
信号转换模块,用于将第一视频的时域信号转换为多个频段的频域信号;a signal conversion module for converting the time domain signal of the first video into frequency domain signals of multiple frequency bands;
其中,信号滤波模块,具体用于利用目标滤波器,对频域信号进行滤波,得到频域信号中的与表情动作相关的第一信号;Wherein, the signal filtering module is specifically configured to use the target filter to filter the frequency domain signal to obtain the first signal related to the facial expression in the frequency domain signal;
视频还原模块,具体用于对目标信号进行频域至时域的转换,得到第二视频。The video restoration module is specifically used for converting the target signal from the frequency domain to the time domain to obtain the second video.
在本申请实施例中,先将第一视频由时域信号转换为频域信号,然后通过进行滤波得到频域信号中的与表情动作相关的第一信号,对该第一信号进行放大处理。在放大第一信号之后,基于放大后的目标信号进行视频还原。由此,实现了对第一视频中的表情动作进行放大处理,这样就可以更加准确地识别出用户的表情动作,从而对用户表情动作进行更加精准地对焦。In this embodiment of the present application, the first video is first converted from a time domain signal to a frequency domain signal, and then a first signal related to an expression in the frequency domain signal is obtained by filtering, and the first signal is amplified. After amplifying the first signal, video restoration is performed based on the amplified target signal. In this way, the enlargement processing of the facial expression in the first video is realized, so that the facial expression of the user can be more accurately recognized, and the facial expression of the user can be more accurately focused.
在本申请的一个或多个实施例中,拍摄对焦装置还包括:In one or more embodiments of the present application, the photographing and focusing device further includes:
表情动作显示模块,用于在拍摄预览界面上显示至少一个标识信息,每个标识信息用于指示对应的表情动作,表情动作为对预定时间段内在拍摄预览界面上显示的多帧历史预览画面进行放大处理得到,其中,预定时间段为在第一视频的时间段之前的时间段;The expression action display module is used to display at least one identification information on the shooting preview interface, and each identification information is used to indicate the corresponding expression action, and the expression action is to perform multi-frame historical preview pictures displayed on the shooting preview interface within a predetermined period of time. Enlarged to obtain, wherein, the predetermined time period is a time period before the time period of the first video;
第一输入接收模块,用于接收用户对至少一个标识信息中的目标标识信息的第一输入,其中,目标标识信息用于指示目标表情动作;a first input receiving module, configured to receive a first input from a user to target identification information in at least one identification information, wherein the target identification information is used to indicate a target facial expression;
其中,信号滤波模块,具体用于响应于第一输入,利用与目标表情动作对应的目标滤波器,对第一视频的信号进行滤波,得到第一视频的与目标表情动作相关的第一信号。The signal filtering module is specifically configured to, in response to the first input, use a target filter corresponding to the target expression to filter the signal of the first video to obtain a first signal of the first video related to the target expression.
在本申请实施例中,用户可以根据自己的需求选择需要对焦的表情动作,如此,拍摄对焦装置可以对拍摄预览界面上用户选择的表情动作进行对焦,从而使得对焦的区域满足用户的拍摄需求。In this embodiment of the present application, the user can select the facial expression action that needs to be focused according to his own needs. In this way, the photographing focusing device can focus on the facial expression action selected by the user on the photographing preview interface, so that the focused area meets the user's photographing needs.
在本申请的一个或多个实施例中,拍摄对焦装置还包括:In one or more embodiments of the present application, the photographing and focusing device further includes:
第二输入接收模块,用于在拍摄预览界面上显示灵敏度调节控件的情况下,接收用户对灵敏度调节控件的第二输入;a second input receiving module, configured to receive a second input from the user on the sensitivity adjustment control when the sensitivity adjustment control is displayed on the shooting preview interface;
第二输入响应模块,用于响应于第二输入,获取与第二输入相关的目标灵敏度值;a second input response module, configured to acquire a target sensitivity value related to the second input in response to the second input;
放大倍数确定模块,用于根据预设的灵敏度值与放大倍数之间的关联关系,确定目标灵敏度值关联的目标放大倍数。The magnification determination module is configured to determine the target magnification associated with the target sensitivity value according to the relationship between the preset sensitivity value and the magnification.
在本申请实施例中,用户可以根据自己需求调节目标灵敏度值,从而调节目标放大倍数,可以满足用户本人的拍摄对焦的需求。其中,用户可以将灵敏度调节至合适的数值,可以防止出现误对焦的情况。In the embodiment of the present application, the user can adjust the target sensitivity value according to his own needs, thereby adjusting the target magnification, which can meet the user's own needs for shooting and focusing. Among them, the user can adjust the sensitivity to an appropriate value, which can prevent misfocus.
在本申请的一个或多个实施例中,拍摄对焦装置还包括:In one or more embodiments of the present application, the photographing and focusing device further includes:
表情区域显示模块,用于在表情区域包括至少一个表情区域的情况下,在拍摄预览界面上显示至少一个表情区域;an expression area display module, configured to display at least one expression area on the shooting preview interface when the expression area includes at least one expression area;
第二输入接收模块,用于接收用户对至少一个表情区域中的目标表情区域的第二输入;a second input receiving module, configured to receive a second input from the user to the target expression area in the at least one expression area;
区域对焦模块408,具体用于响应于第二输入,对拍摄预览界面上的目标表情区域进行对焦。The
在本申请实施例中,在拍摄预览界面上显示识别到的至少一个表情区域,由用户选择对目标表情区域进行对焦,使得对焦结果满足用户需求。In the embodiment of the present application, at least one recognized expression area is displayed on the shooting preview interface, and the user selects to focus on the target expression area, so that the focusing result meets the user's requirement.
在本申请的一个或多个实施例中,拍摄对焦装置还包括:In one or more embodiments of the present application, the photographing and focusing device further includes:
拍摄模块,用于在表情区域内的表情动作为预定表情动作的情况下,进行拍摄,得到目标拍摄图像。The photographing module is used for photographing to obtain a target photographed image when the facial expression in the facial expression area is a predetermined facial expression.
在本申请的实施例中,在表情区域内的表情动作为预定表情动作的情况下,自动进行拍摄,不需要用户手动点击拍摄按钮,从而在拍摄时避免用户手动触发拍摄指令,比如,不需要用户点击拍摄按钮。由此,方便用户进行拍摄。In the embodiment of the present application, when the facial expression in the facial expression area is a predetermined facial expression, the photographing is performed automatically, and the user does not need to manually click the photographing button, thereby avoiding the user's manual triggering of photographing instructions during photographing. The user clicks the capture button. Thereby, it is convenient for the user to photograph.
本申请实施例中的拍摄对焦装置可以是装置,也可以是装置中的部件、集成电路、或芯片。该装置可以是移动电子设备,也可以为非移动电子设备。示例性的,移动电子设备可以为手机、平板电脑、笔记本电脑、掌上电脑、车载电子设备、可穿戴设备、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本或者个人数字助理(personaldigital assistant,PDA)等,非移动电子设备可以为服务器、网络附属存储器(NetworkAttached Storage,NAS)、个人计算机(personal computer,PC)、电视机(television,TV)、柜员机或者自助机等,本申请实施例不作具体限定。The photographing and focusing device in the embodiments of the present application may be a device, or may be a component, an integrated circuit, or a chip in the device. The apparatus may be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palmtop computer, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (personal digital assistant). , PDA), etc., the non-mobile electronic device may be a server, a network attached storage (NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc. The embodiments of the present application There is no specific limitation.
本申请实施例中的拍摄对焦装置可以为具有操作系统的装置。该操作系统可以为安卓(Android)操作系统,可以为ios操作系统,还可以为其他可能的操作系统,本申请实施例不作具体限定。The photographing and focusing device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, which are not specifically limited in the embodiments of the present application.
本申请实施例提供的拍摄对焦装置能够实现图1或图2的方法实施例中拍摄对焦装置实现的各个过程,为避免重复,这里不再赘述。The photographing and focusing device provided by the embodiment of the present application can implement each process implemented by the photographing and focusing device in the method embodiment of FIG. 1 or FIG. 2 , and to avoid repetition, details are not repeated here.
可选的,本申请实施例还提供一种电子设备,包括处理器,存储器,存储在存储器上并可在处理器上运行的程序或指令,该程序或指令被处理器执行时实现上述拍摄对焦方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Optionally, an embodiment of the present application further provides an electronic device, including a processor, a memory, a program or instruction stored in the memory and executable on the processor, the program or instruction being executed by the processor to realize the above-mentioned shooting focus. Each process of the method embodiment can achieve the same technical effect, and in order to avoid repetition, it will not be repeated here.
需要注意的是,本申请实施例中的电子设备包括上述的移动电子设备和非移动电子设备。It should be noted that the electronic devices in the embodiments of the present application include the aforementioned mobile electronic devices and non-mobile electronic devices.
图6为实现本申请实施例的一种电子设备的硬件结构示意图。FIG. 6 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
该电子设备500包括但不限于:射频单元501、网络模块502、音频输出单元503、输入单元504、传感器505、显示单元506、用户输入单元507、接口单元508、存储器509、以及处理器510等部件。The
其中,输入单元504可以包括图形处理器5041和麦克风5042。显示单元506包括可以显示面板5061。用户输入单元507可以包括触控面板5071和其他输入设备5072。存储器509可以包括应用程序和操作系统。The
本领域技术人员可以理解,电子设备500还可以包括给各个部件供电的电源(比如电池),电源可以通过电源管理系统与处理器510逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。图5中示出的电子设备结构并不构成对电子设备的限定,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置,在此不再赘述。Those skilled in the art can understand that the
其中,处理器510,用于在显示单元506显示拍摄预览界面的情况下,获取包括目标拍摄对象的第一视频,第一视频由第一预定时间段内在拍摄预览界面上显示的多帧历史预览画面形成;The
处理器510,还用于对第一视频中的目标拍摄对象的表情动作进行放大处理,得到第二视频;The
处理器510,还用于识别第二视频中的目标拍摄对象的表情区域;The
处理器510,还用于对拍摄预览界面上的表情区域进行对焦。The
在本申请实施例中,在显示拍摄预览界面的情况下,获取由多帧历史预览画面形成的第一视频。然后对第一视频中的目标拍摄对象的表情动作进行放大处理,得到第二视频。再识别第二视频中的目标拍摄对象的表情区域,对拍摄预览界面上的表情区域进行对焦。由于对第一视频中的表情动作进行放大处理,从而将第一视频中的不明显的表情动作变得更加明显,由此可以更加准确地识别出目标拍摄对象的表情区域。然后,基于表情区域进行对焦,可以保证对焦区域的准确性。另外,本申请实施例可以自动对焦,不需要用户手动操作对焦,从而方便用户进行拍摄。In the embodiment of the present application, in the case where the shooting preview interface is displayed, a first video formed by multiple frames of historical preview images is acquired. Then, the facial expressions of the target shooting object in the first video are enlarged to obtain a second video. Then, the facial expression area of the target shooting object in the second video is identified, and the facial expression area on the photographing preview interface is focused. Since the facial expressions in the first video are enlarged, the inconspicuous facial expressions in the first video become more obvious, so that the facial expression area of the target object can be more accurately identified. Then, focusing based on the expression area can ensure the accuracy of the focusing area. In addition, the embodiment of the present application can automatically focus, and does not require the user to manually operate the focus, thereby facilitating the user to shoot.
在本申请的一个或多个实施例中,处理器510,具体用于利用目标滤波器,对第一视频的信号进行滤波,得到第一视频的与表情动作相关的第一信号;按照目标放大倍数,对第一信号进行放大处理,得到目标信号;根据目标信号,生成第二视频。In one or more embodiments of the present application, the
在本申请实施例中,先利用目标滤波器对第一视频的信号进行滤波,可以得到与表情动作相关的第一信号,并滤除掉与表情动作无关的第二信号。然后,按照目标放大倍数对与表情动作相关的第一信号进行放大处理,得到表情动作放大后的目标信号。再根据表情动作放大后的目标信号以及滤波时滤除掉的与表情动作无关的第二信号,进行视频还原,得到第二视频。相比于第一视频,第二视频中的目标拍摄对象的表情动作更加明显,由此,可以利用第二视频更加准确地识别出目标拍摄对象的表情区域。In the embodiment of the present application, the target filter is used to filter the signal of the first video first, so as to obtain the first signal related to the facial expression, and filter out the second signal not related to the facial expression. Then, amplify the first signal related to the facial expression according to the target magnification, so as to obtain an amplified target signal of the facial expression. Then, the video is restored according to the amplified target signal of the facial expression and the second signal unrelated to the facial expression that is filtered out during filtering to obtain a second video. Compared with the first video, the facial expressions of the target photographing subject in the second video are more obvious, and thus, the facial expression area of the target photographing subject can be more accurately identified by using the second video.
在本申请的一个或多个实施例中,处理器510,还用于将第一视频的时域信号转换为多个频段的频域信号;In one or more embodiments of the present application, the
处理器510,具体用于利用目标滤波器,对频域信号进行滤波,得到频域信号中的与表情动作相关的第一信号;The
处理器510,具体用于对目标信号进行频域至时域的转换,得到第二视频。The
在本申请实施例中,先将第一视频由时域信号转换为频域信号,然后通过进行滤波得到频域信号中的与表情动作相关的第一信号,对该第一信号进行放大处理。在放大第一信号之后,基于放大后的目标信号进行视频还原。由此,实现了对第一视频中的表情动作进行放大处理,这样就可以更加准确地识别出用户的表情动作,从而对用户表情动作进行更加精准地对焦。In this embodiment of the present application, the first video is first converted from a time domain signal to a frequency domain signal, and then a first signal related to an expression in the frequency domain signal is obtained by filtering, and the first signal is amplified. After amplifying the first signal, video restoration is performed based on the amplified target signal. In this way, the enlargement processing of the facial expression in the first video is realized, so that the facial expression of the user can be more accurately recognized, and the facial expression of the user can be more accurately focused.
在本申请的一个或多个实施例中,处理器510,还用于获取目标拍摄对象的多个表情动作;In one or more embodiments of the present application, the
显示单元506,用于在拍摄预览界面上显示至少一个标识信息,每个标识信息用于指示对应的表情动作,表情动作为对预定时间段内在拍摄预览界面上显示的多帧历史预览画面进行放大处理得到,其中,预定时间段为在第一视频的时间段之前的时间段;The
用户输入单元507,用于接收用户对至少一个标识信息中的目标标识信息的第一输入,其中,目标标识信息用于指示目标表情动作;a
处理器510,具体用于响应于第一输入,利用与目标表情动作对应的目标滤波器,对第一视频的信号进行滤波,得到第一视频的与目标表情动作相关的第一信号。The
在本申请实施例中,用户可以根据自己的需求选择用于指示目标表情动作的目标标识信息,如此,拍摄对焦装置可以对拍摄预览界面上的目标表情动作进行对焦,从而使得对焦的区域满足用户的拍摄需求。In this embodiment of the present application, the user can select target identification information for indicating the target facial expression according to his own needs. In this way, the photographing focusing device can focus on the target facial expression on the photographing preview interface, so that the focused area satisfies the user's needs. shooting needs.
在本申请的一个或多个实施例中,用户输入单元507,还用于在拍摄预览界面上显示灵敏度调节控件的情况下,接收用户对灵敏度调节控件的第二输入;In one or more embodiments of the present application, the
处理器510,还用于响应于第二输入,获取与第二输入相关的目标灵敏度值;根据预设的灵敏度值与放大倍数之间的关联关系,确定目标灵敏度值关联的目标放大倍数。The
在本申请实施例中,用户可以根据自己需求调节目标灵敏度值,从而调节目标放大倍数,可以满足用户本人的拍摄对焦的需求。其中,用户可以将灵敏度调节至合适的数值,可以防止出现误对焦的情况。In the embodiment of the present application, the user can adjust the target sensitivity value according to his own needs, thereby adjusting the target magnification, which can meet the user's own needs for shooting and focusing. Among them, the user can adjust the sensitivity to an appropriate value, which can prevent misfocus.
在本申请的一个或多个实施例中,显示单元506,用于在表情区域包括至少一个表情区域的情况下,在拍摄预览界面上显示至少一个表情区域;In one or more embodiments of the present application, the
用户输入单元507,用于接收用户对至少一个表情区域中的目标表情区域的第三输入;a
处理器510,具体用于响应于第三输入,对拍摄预览界面上的目标表情区域进行对焦。The
在本申请实施例中,在拍摄预览界面上显示识别到的至少一个表情区域,由用户选择对目标表情区域进行对焦,使得对焦结果满足用户需求。In the embodiment of the present application, at least one recognized expression area is displayed on the shooting preview interface, and the user selects to focus on the target expression area, so that the focusing result meets the user's requirement.
在本申请的一个或多个实施例中,处理器510,还用于在表情区域内的表情动作为预定表情动作的情况下,进行拍摄,得到目标拍摄图像。In one or more embodiments of the present application, the
在本申请的实施例中,在表情区域内的表情动作为预定表情动作的情况下,自动进行拍摄,不需要用户手动点击拍摄按钮,从而在拍摄时避免用户手动触发拍摄指令,比如,不需要用户点击拍摄按钮。由此,方便用户进行拍摄。In the embodiment of the present application, when the facial expression in the facial expression area is a predetermined facial expression, the photographing is performed automatically, and the user does not need to manually click the photographing button, thereby avoiding the user's manual triggering of photographing instructions during photographing. The user clicks the capture button. Thereby, it is convenient for the user to photograph.
本申请实施例还提供一种可读存储介质,可读存储介质上存储有程序或指令,该程序或指令被处理器执行时实现上述拍摄对焦方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Embodiments of the present application further provide a readable storage medium, where a program or an instruction is stored on the readable storage medium. When the program or instruction is executed by a processor, each process of the above-mentioned embodiments of the shooting and focusing method can be realized, and the same technology can be achieved. The effect, in order to avoid repetition, is not repeated here.
其中,处理器为上述实施例中的电子设备中的处理器。可读存储介质,包括计算机可读存储介质,如计算机只读存储器(Read-Only Memory,ROM)、随机存取存储器(RandomAccess Memory,RAM)、磁碟或者光盘等。The processor is the processor in the electronic device in the above embodiment. The readable storage medium includes a computer-readable storage medium, such as a computer read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, and the like.
本申请实施例另提供了一种芯片,芯片包括处理器和通信接口,通信接口和处理器耦合,处理器用于运行程序或指令,实现上述拍摄对焦方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。An embodiment of the present application further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is used to run a program or an instruction to implement each process of the above-mentioned embodiments of the shooting and focusing method, and can achieve the same The technical effect, in order to avoid repetition, will not be repeated here.
应理解,本申请实施例提到的芯片还可以称为系统级芯片、系统芯片、芯片系统或片上系统芯片等。It should be understood that the chip mentioned in the embodiments of the present application may also be referred to as a system-on-chip, a system-on-chip, a system-on-a-chip, or a system-on-a-chip, or the like.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。此外,需要指出的是,本申请实施方式中的方法和装置的范围不限按示出或讨论的顺序来执行功能,还可包括根据所涉及的功能按基本同时的方式或按相反的顺序来执行功能,例如,可以按不同于所描述的次序来执行所描述的方法,并且还可以添加、省去、或组合各种步骤。另外,参照某些示例所描述的特征可在其他示例中被组合。It should be noted that, herein, the terms "comprising", "comprising" or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements, It also includes other elements not expressly listed or inherent to such a process, method, article or apparatus. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in a process, method, article or apparatus that includes the element. In addition, it should be noted that the scope of the methods and apparatus in the embodiments of the present application is not limited to performing the functions in the order shown or discussed, but may also include performing the functions in a substantially simultaneous manner or in the reverse order depending on the functions involved. To perform functions, for example, the described methods may be performed in an order different from that described, and various steps may also be added, omitted, or combined. Additionally, features described with reference to some examples may be combined in other examples.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。From the description of the above embodiments, those skilled in the art can clearly understand that the method of the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is better implementation. Based on this understanding, the technical solutions of the present application can be embodied in the form of software products in essence or the parts that make contributions to the prior art, and the computer software products are stored in a storage medium (such as ROM/RAM, magnetic disk, CD-ROM), including several instructions to make a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) execute the methods described in the various embodiments of this application.
上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。The embodiments of the present application have been described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific embodiments, which are merely illustrative rather than restrictive. Under the inspiration of this application, without departing from the scope of protection of the purpose of this application and the claims, many forms can be made, which all fall within the protection of this application.
Claims (9)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010465750.1A CN111654622B (en) | 2020-05-28 | 2020-05-28 | Shooting focusing method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010465750.1A CN111654622B (en) | 2020-05-28 | 2020-05-28 | Shooting focusing method and device, electronic equipment and storage medium |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN111654622A CN111654622A (en) | 2020-09-11 |
| CN111654622B true CN111654622B (en) | 2022-10-14 |
Family
ID=72344764
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202010465750.1A Active CN111654622B (en) | 2020-05-28 | 2020-05-28 | Shooting focusing method and device, electronic equipment and storage medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN111654622B (en) |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112511748A (en) * | 2020-11-30 | 2021-03-16 | 努比亚技术有限公司 | Lens target intensified display method and device, mobile terminal and storage medium |
| CN112714253B (en) * | 2020-12-28 | 2022-08-26 | 维沃移动通信有限公司 | Video recording method and device, electronic equipment and readable storage medium |
| CN113810599A (en) * | 2021-08-12 | 2021-12-17 | 惠州Tcl云创科技有限公司 | Method for focusing on designated area by AI action recognition, mobile terminal and storage medium |
| CN114677620A (en) * | 2022-03-02 | 2022-06-28 | 北京极感科技有限公司 | Focusing method, electronic device and computer readable medium |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102244807A (en) * | 2010-06-02 | 2011-11-16 | 微软公司 | Microsoft Corporation |
| WO2019071440A1 (en) * | 2017-10-10 | 2019-04-18 | 深圳传音通讯有限公司 | Photographing focusing method and device |
Family Cites Families (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7986458B2 (en) * | 2007-12-26 | 2011-07-26 | Sony Corporation | Zoom lens and image pickup apparatus |
| CN102594990A (en) * | 2012-02-10 | 2012-07-18 | 中兴通讯股份有限公司 | Smart mobile phone base, mobile phone and implementation methods thereof |
| CN103780826A (en) * | 2012-10-19 | 2014-05-07 | 爱国者数码科技有限公司 | Digital image capturing device for reminding image shooting picture composition effect |
| KR102146858B1 (en) * | 2014-06-03 | 2020-08-21 | 삼성전자주식회사 | Photographing apparatus and method for making a video |
| WO2016103962A1 (en) * | 2014-12-26 | 2016-06-30 | 富士フイルム株式会社 | Focus control device, imaging device, focus control method, and focus control program |
| CN106888354A (en) * | 2017-03-30 | 2017-06-23 | 维沃移动通信有限公司 | A kind of singlehanded photographic method and mobile terminal |
| CN107680071B (en) * | 2017-10-23 | 2020-08-07 | 深圳市云之梦科技有限公司 | Method and system for fusion processing of human face and human body |
-
2020
- 2020-05-28 CN CN202010465750.1A patent/CN111654622B/en active Active
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102244807A (en) * | 2010-06-02 | 2011-11-16 | 微软公司 | Microsoft Corporation |
| WO2019071440A1 (en) * | 2017-10-10 | 2019-04-18 | 深圳传音通讯有限公司 | Photographing focusing method and device |
Also Published As
| Publication number | Publication date |
|---|---|
| CN111654622A (en) | 2020-09-11 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN111654622B (en) | Shooting focusing method and device, electronic equipment and storage medium | |
| CN111698553B (en) | Video processing method and device, electronic equipment and readable storage medium | |
| CN107945133B (en) | Image processing method and device | |
| CN106295499B (en) | Age estimation method and device | |
| CN110569822A (en) | Image processing method and device, electronic device and storage medium | |
| CN105809704A (en) | Method and device for identifying image definition | |
| CN107133576A (en) | Age of user recognition methods and device | |
| CN106355549A (en) | Photographing method and equipment | |
| CN111340691B (en) | Image processing method, device, electronic device and storage medium | |
| WO2021047069A1 (en) | Face recognition method and electronic terminal device | |
| EP3328062A1 (en) | Photo synthesizing method and device | |
| CN108898591A (en) | Methods of marking and device, electronic equipment, the readable storage medium storing program for executing of picture quality | |
| CN108108671A (en) | Description of product information acquisition method and device | |
| WO2022121577A1 (en) | Image processing method and apparatus | |
| CN107527024A (en) | Face face value appraisal procedure and device | |
| CN111953907A (en) | Composition method, device and electronic device | |
| CN113873165A (en) | Photographing method and device and electronic equipment | |
| CN110245607A (en) | Eye tracking methods and related products | |
| CN110491384B (en) | Voice data processing method and device | |
| CN110931028A (en) | Voice processing method and device and electronic equipment | |
| CN114663901A (en) | Image processing method, image recognition device, electronic apparatus, and medium | |
| CN109376674B (en) | Face detection method, device and storage medium | |
| CN110297929A (en) | Image matching method, device, electronic equipment and storage medium | |
| CN111416936B (en) | Image processing method, image processing device, electronic equipment and storage medium | |
| CN113891002B (en) | Shooting method and device |
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 |