CN116074624B - A focusing method and device - Google Patents
A focusing method and device Download PDFInfo
- Publication number
- CN116074624B CN116074624B CN202210866534.7A CN202210866534A CN116074624B CN 116074624 B CN116074624 B CN 116074624B CN 202210866534 A CN202210866534 A CN 202210866534A CN 116074624 B CN116074624 B CN 116074624B
- Authority
- CN
- China
- Prior art keywords
- current
- depth
- picture
- electronic device
- field scene
- 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
Landscapes
- Studio Devices (AREA)
Abstract
本申请实施例提供一种对焦方法和装置,涉及终端领域,能够更准确更合理地进行对焦,使画面重点更为突出,提高用户体验。其方法为:显示当前取景画面,判断当前取景画面是否属于多景深场景;若确定当前取景画面属于多景深场景,根据当前取景画面中的目标人脸的注意力位置进行对焦,当前取景画面属于多景深场景表示当前取景画面中的多个拍摄对象处于不同的深度位置;若确定当前取景画面不属于多景深场景,检测拍摄者的注意力位置,根据拍摄者的注意力位置进行对焦,当前取景画面不属于多景深场景表示当前取景画面中的多个拍摄对象处于相同或相似的深度位置。
Embodiments of the present application provide a focusing method and device, which relate to the field of terminals and can focus more accurately and reasonably, making the focus of the picture more prominent and improving user experience. The method is: display the current viewfinding picture and determine whether the current viewfinder picture belongs to a multi-depth-of-field scene; if it is determined that the current viewfinder picture belongs to a multi-depth-of-field scene, focus according to the attention position of the target face in the current viewfinder picture. The current viewfinder picture belongs to a multi-depth-of-field scene. A depth-of-field scene indicates that multiple subjects in the current viewfinder are at different depth positions; if it is determined that the current viewfinder does not belong to a multi-depth-of-field scene, the photographer's attention position is detected, and the focus is performed based on the photographer's attention position. Not belonging to a multi-depth-of-field scene means that multiple subjects in the current viewfinder are at the same or similar depth positions.
Description
技术领域Technical field
本申请涉及终端领域,尤其涉及一种对焦方法和装置。The present application relates to the field of terminals, and in particular, to a focusing method and device.
背景技术Background technique
传统的对焦系统是基于画面的中心区域进行对焦的,当感兴趣主体偏离画面的中心区域时,往往会产生失焦问题。例如,如图1所示,在实际拍摄时,如果对焦框在画面中心,感兴趣主体(花朵)就会失焦。为了解决这个问题,出现了基于主体物体检测的智能对焦系统。The traditional focusing system focuses based on the central area of the picture. When the subject of interest deviates from the central area of the picture, out-of-focus problems often occur. For example, as shown in Figure 1, during actual shooting, if the focus frame is in the center of the screen, the subject of interest (flowers) will be out of focus. In order to solve this problem, an intelligent focusing system based on subject object detection has emerged.
基于主体物体检测的智能对焦系统的实现原理为:检测出取景画面中的主体(如:花朵、人脸),然后将主体物体框下发给对焦系统进行对焦,由于主体可以在图像中的不同位置,因此对焦区域也是变化的。The implementation principle of the intelligent focus system based on subject object detection is: detect the subject in the viewfinder (such as flowers, faces), and then send the subject object frame to the focusing system for focusing. Since the subject can be in different positions in the image The position and therefore the focus area also changes.
但是对于内容丰富的场景,取景画面中可能存在多个主体物体框,如何对焦成为新的问题。However, for content-rich scenes, there may be multiple subject object frames in the viewfinder, and how to focus becomes a new problem.
发明内容Contents of the invention
本申请实施例提供一种对焦方法和装置,能够更准确更合理地进行对焦,使画面重点更为突出,提高用户体验。Embodiments of the present application provide a focusing method and device, which can focus more accurately and reasonably, making the focus of the picture more prominent and improving user experience.
第一方面,本申请实施例提供一种对焦方法,应用于电子设备,包括:显示当前取景画面,判断当前取景画面是否属于多景深场景;若确定当前取景画面属于多景深场景,根据当前取景画面中的目标人脸的注意力位置进行对焦,当前取景画面属于多景深场景表示当前取景画面中的多个拍摄对象处于不同的深度位置;若确定当前取景画面不属于多景深场景,检测拍摄者的注意力位置,根据拍摄者的注意力位置进行对焦,当前取景画面不属于多景深场景表示当前取景画面中的多个拍摄对象处于相同或相似的深度位置。In the first aspect, embodiments of the present application provide a focusing method, which is applied to electronic devices, including: displaying the current viewfinding picture, and determining whether the current viewfinding picture belongs to a multi-depth-of-field scene; if it is determined that the current viewfinder picture belongs to a multi-depth-of-field scene, based on the current viewfinder picture Focus on the target face's attention position in the scene. If the current viewfinder picture belongs to a multi-depth-of-field scene, it means that multiple subjects in the current viewfinder picture are at different depth positions; if it is determined that the current viewfinder picture does not belong to a multi-depth-of-field scene, detect the photographer's Attention position, focus is performed based on the photographer's attention position. The current viewfinder does not belong to a multi-depth scene, which means that multiple subjects in the current viewfinder are at the same or similar depth positions.
基于本申请实施例提供的对焦方法,可以根据当前取景画面是否为多景深场景采取不同的对焦方案。例如当前取景画面属于多景深场景时,可以以画面中人物(目标人脸)注意力方向作为对焦方向。由于多景深场景内容复杂,画面中的对象(例如,人或物)的景深不同,人不容易理解复杂场景,难以迅速找出画面中的重点,此时以拍摄者注意力位置作为对焦位置不够准确和快速。因此可以基于画面中人物(目标人脸)注意力方向作为对焦方向,更加准确和合理,可以使画面重点更为突出,更加符合镜头语言的表达,可以提高用户体验。反之,当前取景画面不属于多景深场景(即为非多景深场景)时,可以基于拍摄者的注意力位置进行对焦。由于非多景深场景内容简单,画面中的对象(例如,人或物)所处深度相似或相近,人更加容易理解简单场景,也就更容易找出画面中的重点,此时可以基于拍摄者的注意力位置进行对焦,可以使画面重点更为突出,更加符合镜头语言的表达,可以提高用户体验。Based on the focusing method provided by the embodiment of the present application, different focusing schemes can be adopted according to whether the current viewing image is a multi-depth-of-field scene. For example, when the current viewing image belongs to a multi-depth-of-field scene, the direction of attention of the person (target face) in the image can be used as the focus direction. Due to the complex content of multi-depth scenes, objects in the picture (for example, people or objects) have different depths of field. It is difficult for people to understand complex scenes and quickly find the key points in the picture. In this case, it is not enough to use the photographer's attention position as the focus position. Accurate and fast. Therefore, the focus direction can be based on the attention direction of the person (target face) in the picture, which is more accurate and reasonable, can make the focus of the picture more prominent, be more in line with the expression of the lens language, and improve the user experience. On the contrary, when the current view frame does not belong to a multi-depth-of-field scene (that is, a non-multi-depth-of-field scene), focusing can be performed based on the photographer's attention position. Since the content of the non-multi-depth-of-field scene is simple and the objects (for example, people or objects) in the picture are at similar or similar depths, it is easier for people to understand simple scenes, and it is easier to find the key points in the picture. In this case, based on the photographer Focusing on the focus position can make the focus of the picture more prominent, more consistent with the expression of the lens language, and improve the user experience.
在一种可能的实现方式中,若无法检测到拍摄者的注意力位置,根据当前取景画面中的目标人脸进行对焦,或者根据当前取景画面中的中心区域进行对焦。In a possible implementation, if the photographer's attention position cannot be detected, focusing is performed based on the target face in the current viewfinder, or focusing is performed based on the central area in the current viewfinder.
在一种可能的实现方式中,若目标人脸的注意力位置不在当前取景画面内,根据目标人脸所在的区域进行对焦。即当取景画面中的目标人脸的视线方向的汇聚区域超出取景画面时,可以采用人脸对焦的方案,即基于目标人脸进行对焦。目标人脸可以是取景画面中面积占比最大的人脸。若目标人脸的注意力位置不在当前取景画面内,则目标人脸很可能是用户较为感兴趣的对象,因此根据目标人脸所在的区域进行对焦是合理和准确的。In one possible implementation, if the attention position of the target face is not within the current viewing frame, focus is performed based on the area where the target face is located. That is, when the convergence area of the sight direction of the target face in the viewfinder exceeds the viewfinder, a face focusing solution can be used, that is, focusing based on the target face. The target face can be the face with the largest area in the viewfinder. If the target face's attention position is not within the current viewing frame, the target face is likely to be an object of greater interest to the user, so it is reasonable and accurate to focus based on the area where the target face is located.
在一种可能的实现方式中,判断当前取景画面是否属于多景深场景包括:获取当前取景画面的相位差序列;确定相位差序列中的最大值和最小值;判断最大值和最小值的差值的绝对值与预设阈值的大小;若差值的绝对值大于预设阈值,确定当前取景画面属于多景深场景,若差值的绝对值小于或等于预设阈值,确定当前取景画面不属于多景深场景。由于目前大部分摄像头都配置有相位检测像素,可以支持相位检测对焦(phase detectionautofocus,PDAF)技术。即摄像头拍摄的图像通过PDAF算法的处理可以得到相位差(phasedifference,PD)序列,根据相位差序列可以进行对焦。并且,采用PDAF技术进行对焦的成像效果好,相较于激光成像成本低,不受距离限制。因此,基于PDAF技术得到的相位差序列来判断图像是否为多景深图像的适配度高,可以适配市面大部分厂商的摄像头或摄像产品。In a possible implementation, determining whether the current view frame belongs to a multi-depth scene includes: obtaining the phase difference sequence of the current view frame; determining the maximum value and minimum value in the phase difference sequence; and determining the difference between the maximum value and the minimum value. The absolute value of the difference is greater than the preset threshold; if the absolute value of the difference is greater than the preset threshold, it is determined that the current viewing image belongs to a multi-depth scene; if the absolute value of the difference is less than or equal to the preset threshold, it is determined that the current viewing image does not belong to a multi-depth scene. Depth of field scene. Since most current cameras are equipped with phase detection pixels, they can support phase detection autofocus (PDAF) technology. That is, the image captured by the camera can be processed by the PDAF algorithm to obtain a phase difference (PD) sequence, and focusing can be performed based on the phase difference sequence. Moreover, the imaging effect using PDAF technology for focusing is good, the cost is lower than laser imaging, and it is not limited by distance. Therefore, judging whether an image is a multi-depth-of-field image based on the phase difference sequence obtained by PDAF technology has a high degree of adaptability and can be adapted to cameras or imaging products from most manufacturers on the market.
在一种可能的实现方式中,获取当前取景画面的相位差序列包括:从摄像头获取当前取景画面对应的相位差原始(PD raw)图;将PD raw图输入相位检测库PDLIB中;PDLIB通过增益图为PD raw图对应的多个相位差PD像素提升增益;根据提升增益后的多个PD像素计算得到多个PD值,多个PD值组成相位差序列。In a possible implementation, obtaining the phase difference sequence of the current viewing image includes: obtaining the phase difference original (PD raw) image corresponding to the current viewing image from the camera; inputting the PD raw image into the phase detection library PDLIB; PDLIB through the gain The picture shows the multiple phase difference PD pixels corresponding to the PD raw image to increase the gain; multiple PD values are calculated based on the multiple PD pixels after the gain is increased, and the multiple PD values form a phase difference sequence.
在一种可能的实现方式中,目标人脸是根据当前取景画面中的人脸框大小、人脸与中心位置的权重比例以及人脸与镜头的距离远近中的至少一种确定的。In a possible implementation, the target face is determined based on at least one of the size of the face frame in the current viewing frame, the weight ratio of the face to the center position, and the distance between the face and the camera.
在一种可能的实现方式中,若当前取景画面中包括多个人脸,目标人脸为当前取景画面中面积占比最大的人脸。In a possible implementation, if the current viewfinder includes multiple faces, the target face is the face with the largest area in the current viewfinder.
第二方面,本申请提供一种芯片系统,该芯片系统包括一个或多个接口电路和一个或多个处理器。该接口电路和处理器通过线路互联。上述芯片系统可以应用于包括通信模块和存储器的电子设备。该接口电路用于从电子设备的存储器接收信号,并向处理器发送接收到的信号,该信号包括存储器中存储的计算机指令。当处理器执行该计算机指令时,电子设备可以执行如第一方面及其任一种可能的设计方式所述的方法。In a second aspect, the present application provides a chip system, which includes one or more interface circuits and one or more processors. The interface circuit and the processor are interconnected through lines. The above chip system can be applied to electronic devices including communication modules and memories. The interface circuit is configured to receive signals from the memory of the electronic device and send the received signals to the processor, the signals including computer instructions stored in the memory. When the processor executes the computer instructions, the electronic device can perform the method described in the first aspect and any possible design manner thereof.
第三方面,本申请提供一种计算机可读存储介质,该计算机可读存储介质包括计算机指令。当计算机指令在电子设备(如手机)上运行时,使得该电子设备执行如第一方面及其任一种可能的设计方式所述的方法。In a third aspect, the present application provides a computer-readable storage medium that includes computer instructions. When the computer instructions are run on an electronic device (such as a mobile phone), the electronic device is caused to execute the method described in the first aspect and any possible design manner thereof.
第四方面,本申请实施例提供了一种对焦装置,包括处理器,处理器和存储器耦合,存储器存储有程序指令,当存储器存储的程序指令被处理器执行时使得所述装置实现上述第一方面及其任一种可能的设计方式所述的方法。所述装置可以为电子设备;或可以为电子设备中的一个组成部分,如芯片。In a fourth aspect, embodiments of the present application provide a focusing device, including a processor. The processor is coupled to a memory. The memory stores program instructions. When the program instructions stored in the memory are executed by the processor, the device achieves the first step described above. Aspects and methods described in any possible design method. The device may be an electronic device; or may be a component of the electronic device, such as a chip.
第五方面,本申请实施例提供了一种对焦装置,所述装置可以按照功能划分为不同的逻辑单元或模块,各单元或模块执行不同的功能,以使得所述装置执行上述第一方面及其任一种可能的设计方式所述的方法。In the fifth aspect, embodiments of the present application provide a focusing device. The device can be divided into different logical units or modules according to functions, and each unit or module performs different functions, so that the device performs the above first aspect and any possible design method.
第六方面,本申请提供一种计算机程序产品,当所述计算机程序产品在计算机上运行时,使得所述计算机执行如第一方面及其任一种可能的设计方式所述的方法。In a sixth aspect, the present application provides a computer program product, which when the computer program product is run on a computer, causes the computer to execute the method described in the first aspect and any possible design manner thereof.
可以理解地,上述提供的第二方面所述的芯片系统,第三方面所述的计算机可读存储介质,第四方面、第五方面所述的装置以及第六方面所述的计算机程序产品所能达到的有益效果,可参考如第一方面及其任一种可能的设计方式中的有益效果,此处不再赘述。It can be understood that the chip system described in the second aspect, the computer-readable storage medium described in the third aspect, the devices described in the fourth and fifth aspects, and the computer program product described in the sixth aspect are provided above. The beneficial effects that can be achieved can be referred to the beneficial effects in the first aspect and any possible design method thereof, which will not be described again here.
附图说明Description of the drawings
图1为本申请实施例提供的一种中心对焦的示意图;Figure 1 is a schematic diagram of a center focusing provided by an embodiment of the present application;
图2为本申请实施例提供的一种景深的示意图;Figure 2 is a schematic diagram of a depth of field provided by an embodiment of the present application;
图3为本申请实施例提供的一种非多景深场景的示意图;Figure 3 is a schematic diagram of a non-multi-depth-of-field scene provided by an embodiment of the present application;
图4为本申请实施例提供的一种多景深场景的示意图;Figure 4 is a schematic diagram of a multi-depth-of-field scene provided by an embodiment of the present application;
图5为本申请实施例提供的一种相位检测对焦的像素示意图;Figure 5 is a pixel diagram of phase detection focusing provided by an embodiment of the present application;
图6A为本申请实施例提供的一种电子设备的硬件结构示意图;Figure 6A is a schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present application;
图6B为本申请实施例提供的一种电子设备的软件架构示意图;Figure 6B is a schematic diagram of the software architecture of an electronic device provided by an embodiment of the present application;
图6C为本申请实施例提供的一种对焦方法的流程示意图;Figure 6C is a schematic flowchart of a focusing method provided by an embodiment of the present application;
图7为本申请实施例提供的一种显示示意图;Figure 7 is a schematic display diagram provided by an embodiment of the present application;
图8为本申请实施例提供的一种计算PD值的流程示意图;Figure 8 is a schematic flowchart of calculating a PD value provided by an embodiment of the present application;
图9为本申请实施例提供的一种人脸对焦的示意图;Figure 9 is a schematic diagram of face focusing provided by an embodiment of the present application;
图10为本申请实施例提供的一种以画面中人物注意力位置进行对焦的示意图;Figure 10 is a schematic diagram of focusing based on the attention position of a character in the picture provided by an embodiment of the present application;
图11为本申请实施例提供的一种以拍摄者注意力位置进行对焦的示意图;Figure 11 is a schematic diagram of focusing based on the photographer's attention position provided by an embodiment of the present application;
图12为本申请实施例提供的一种芯片系统的结构示意图。Figure 12 is a schematic structural diagram of a chip system provided by an embodiment of the present application.
具体实施方式Detailed ways
为了下述各实施例的描述清楚简洁,首先给出相关概念或技术的简要介绍:In order to describe the following embodiments clearly and concisely, a brief introduction to related concepts or technologies is first given:
景深(depth of field,DOF):是指在摄影机镜头或其他成像器前沿能够取得清晰图像的成像所测定的被摄物体前后距离范围。Depth of field (DOF): refers to the distance range in front and behind the subject measured by imaging that can obtain a clear image at the front edge of the camera lens or other imager.
例如,当相机对物体A对焦,拍照后,不仅物体A清晰,在物体A前(物体A和相机之间)若干距离(b)的物体B也清晰,在物体A后若干距离(c)的物体C也是清晰的,可以将b+c称为景深。For example, when the camera focuses on object A and takes a picture, not only object A is clear, but also object B which is some distance (b) in front of object A (between object A and the camera) is also clear, and which is some distance (c) behind object A. Object C is also clear, and b+c can be called depth of field.
如图2中的(1)所示,拍摄设备(例如,手机)在拍摄电视机(被拍摄物体),画面中清晰的部分是景深(清晰的部分(例如,电视机)用实线表示,不清晰的部分(例如,床和音箱)用虚线表示)。其中,镜头最前端镜片与拍摄物体的距离为对焦距离。如图2中的(2)所示,拍摄设备(例如,手机)在拍摄电视机(被拍摄物体),画面中清晰的部分是景深。图2中的(1)中的景深相比如图2中的(2)中的景深更浅(更小)。As shown in (1) in Figure 2, the shooting device (for example, a mobile phone) is shooting a television (the object being photographed). The clear part in the picture is the depth of field (the clear part (for example, the television) is represented by a solid line. Unclear parts (e.g., bed and speakers) are indicated by dotted lines). Among them, the distance between the front lens of the lens and the photographed object is the focusing distance. As shown in (2) in Figure 2, the shooting device (for example, a mobile phone) is shooting the TV (the object being photographed), and the clear part of the picture is the depth of field. The depth of field in (1) in Figure 2 is shallower (smaller) than the depth of field in (2) in Figure 2 .
非多景深场景(简单场景):在景深范围内,画面中的对象(例如,人或物)所处深度相近或相同。例如,如图3所示,画面中的对象(例如,人)基本处于画面中同一深度位置,深度单一。Non-multi-depth-of-field scene (simple scene): Within the depth-of-field range, the objects (for example, people or objects) in the picture are at similar or the same depth. For example, as shown in Figure 3, objects (for example, people) in the picture are basically at the same depth position in the picture, and the depth is single.
多景深场景(复杂场景):在景深范围内,画面中的对象(例如,人或物)处于不同深度位置,深度分布不均匀。例如,如图4所示,画面中人物处于画面中一前一后的深度位置,深度分布不均匀。Multiple depth of field scenes (complex scenes): Within the depth of field range, objects (for example, people or objects) in the picture are at different depth positions, and the depth distribution is uneven. For example, as shown in Figure 4, the characters in the picture are at depth positions one behind the other in the picture, and the depth distribution is uneven.
PDAF:用于将感光芯片采集到的相位差作为对焦的依据。摄像模组里面感应图像的部分为感光芯片,感光芯片的每个像素点都在感应图像。如图5所示,可以将间隔一段距离的对称的两个像素点,分别遮盖像素点的左半边和右半边(这样,被遮住左边一半的像素(left-half-shield pixel)就只能接受右边来的光,被遮住右边一半的像素(right-half-shield pixel)就只能接受左边来的光),这样对称的两个像素点相当于“人的左右两只眼睛”。PDAF的“左右眼睛”在“看”同一个物体的时候,会产生一定的视觉差异,即相位差PD(值),根据PD值可以计算对焦是否准确。PDAF: used to use the phase difference collected by the photosensitive chip as the basis for focusing. The part of the camera module that senses images is a photosensitive chip, and each pixel of the photosensitive chip senses an image. As shown in Figure 5, two symmetrical pixels separated by a certain distance can be covered with the left half and the right half of the pixel respectively (in this way, the left half-shielded pixel (left-half-shield pixel) can only be Accept the light from the right, and the right-half-shield pixel that is blocked can only accept the light from the left). In this way, the two symmetrical pixels are equivalent to "the left and right eyes of a person". When the "left and right eyes" of PDAF "see" the same object, there will be a certain visual difference, that is, the phase difference PD (value). Based on the PD value, whether the focus is accurate can be calculated.
目前的对焦系统可以基于取景画面中的主体自动对焦。但是,当取景画面中存在多个主体物体框时,如何更准确更合理地对焦成为新的问题。Current focus systems can automatically focus based on the subject in the viewfinder. However, when there are multiple subject object frames in the viewfinder, how to focus more accurately and reasonably becomes a new problem.
在一种可能的设计中,可以根据拍摄者注意力方向对焦,或者可以根据画面中人物注意力方向进行对焦。什么情况下采取哪种注意力对焦方案更加合理是一个亟待解决的问题。In one possible design, the focus can be based on the direction of the photographer's attention, or the focus can be based on the direction of the attention of the person in the picture. Under what circumstances which attention focusing scheme is more reasonable is an issue that needs to be solved urgently.
本申请实施例提供一种对焦方法,可以根据当前取景画面是否为多景深场景采取不同的注意力对焦方案,能够更准确更合理地进行对焦,使画面重点更为突出,提高用户体验。Embodiments of the present application provide a focusing method that can adopt different attention focusing solutions according to whether the current viewfinder is a multi-depth scene, and can focus more accurately and reasonably, making the focus of the picture more prominent and improving the user experience.
由于非多景深场景内容简单,画面中的对象(例如,人或物)所处深度相近或相同,人更加容易理解简单场景,也就更容易找出画面中的重点,此时可以基于拍摄者的注意力位置进行对焦,可以使画面重点更为突出,提高用户体验。反之,多景深场景内容复杂,画面中的对象(例如,人或物)的景深不同,人不容易理解复杂场景,难以迅速找出画面中的重点,此时以拍摄者注意力位置作为对焦位置不够准确,可以基于画面中人物注意力方向作为对焦方向,更加准确和合理,可以使画面重点更为突出,提高用户体验。Since the content of the non-multi-depth-of-field scene is simple and the objects (for example, people or objects) in the picture are at similar or the same depth, it is easier for people to understand simple scenes, and it is easier to find the key points in the picture. In this case, based on the photographer Focusing on the attention position can make the focus of the picture more prominent and improve the user experience. On the contrary, the content of the scene with multiple depths of field is complex, and the objects in the picture (for example, people or objects) have different depths of field. It is difficult for people to understand the complex scene and find the key points in the picture quickly. In this case, the focus position is taken as the focus position of the photographer. If it is not accurate enough, the focus direction can be based on the direction of attention of the characters in the picture. It is more accurate and reasonable, which can make the focus of the picture more prominent and improve the user experience.
本申请实施例提供的对焦方法可以应用于电子设备,电子设备例如可以为手机、平板电脑、相机,摄影机(摄像机)、台式机(桌面型电脑)、手持计算机、笔记本电脑(膝上型电脑)、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、个人数字助理(personal digital assistant,PDA)、增强现实(augmented reality,AR)\虚拟现实(virtual reality,VR)设备等,本申请实施例对电子设备的具体形态不作特殊限制。The focusing method provided by the embodiments of the present application can be applied to electronic devices. Electronic devices can be, for example, mobile phones, tablet computers, cameras, video cameras (video cameras), desktop computers (desktop computers), handheld computers, and notebook computers (laptop computers). , ultra-mobile personal computer (UMPC), netbook, personal digital assistant (PDA), augmented reality (AR)\virtual reality (VR) equipment, etc., this application The embodiment does not place any special restrictions on the specific form of the electronic device.
图6A为本申请实施例提供的一种电子设备100的结构示意图。如图6A所示,电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universalserial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。FIG. 6A is a schematic structural diagram of an electronic device 100 provided by an embodiment of the present application. As shown in Figure 6A, the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, and a battery 142. Antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone interface 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, Display 194, and subscriber identification module (subscriber identification module, SIM) card interface 195, etc.
其中,传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。Among them, the sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and an environment. Light sensor 180L, bone conduction sensor 180M, etc.
可以理解的是,本实施例示意的结构并不构成对电子设备100的具体限定。在另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device 100 . In other embodiments, the electronic device 100 may include more or fewer components than illustrated, some components may be combined, some components may be separated, or components may be arranged differently. The components illustrated may be implemented in hardware, software, or a combination of software and hardware.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processingunit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (GPU), an image signal processor ( image signal processor (ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU), etc. . Among them, different processing units can be independent devices or integrated in one or more processors.
控制器可以是电子设备100的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The controller may be the nerve center and command center of the electronic device 100 . The controller can generate operation control signals based on the instruction operation code and timing signals to complete the control of fetching and executing instructions.
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in processor 110 is cache memory. This memory may hold instructions or data that have been recently used or recycled by processor 110 . If the processor 110 needs to use the instructions or data again, it can be called directly from the memory. Repeated access is avoided and the waiting time of the processor 110 is reduced, thus improving the efficiency of the system.
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuitsound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purposeinput/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。In some embodiments, processor 110 may include one or more interfaces. The interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuitsound, I2S) interface, a pulse code modulation (PCM) interface, and a universal asynchronous receiver (universal asynchronous receiver) /transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (subscriber identity module, SIM) interface, and/or Universal serial bus (USB) interface, etc.
可以理解的是,本实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It can be understood that the interface connection relationships between the modules illustrated in this embodiment are only schematic illustrations and do not constitute a structural limitation of the electronic device 100 . In other embodiments, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
充电管理模块140用于从充电器接收充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备供电。The charging management module 140 is used to receive charging input from the charger. While the charging management module 140 charges the battery 142, it can also provide power to the electronic device through the power management module 141.
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,外部存储器,显示屏194,摄像头193,和无线通信模块160等供电。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charging management module 140, and supplies power to the processor 110, internal memory 121, external memory, display screen 194, camera 193, wireless communication module 160, etc. In some other embodiments, the power management module 141 may also be provided in the processor 110 . In other embodiments, the power management module 141 and the charging management module 140 may also be provided in the same device.
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 may be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example: Antenna 1 can be reused as a diversity antenna for a wireless LAN.
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。The mobile communication module 150 can provide solutions for wireless communication including 2G/3G/4G/5G applied on the electronic device 100 . The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves through the antenna 1, perform filtering, amplification and other processing on the received electromagnetic waves, and transmit them to the modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves through the antenna 1 for radiation.
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。A modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs sound signals through audio devices (not limited to speaker 170A, receiver 170B, etc.), or displays images or videos through display screen 194.
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wirelesslocal area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。The wireless communication module 160 can provide applications on the electronic device 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), Bluetooth (bluetooth, BT), and global navigation satellite system. (global navigation satellite system, GNSS), frequency modulation (FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 . The wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves through the antenna 2 for radiation.
在一些实施例中,电子设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备100可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(codedivision multiple access,CDMA),宽带码分多址(wideband code division multipleaccess,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidounavigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellitesystem,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (codedivision multiple access, CDMA), broadband code Wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM , and/or IR technology, etc. The GNSS may include global positioning system (GPS), global navigation satellite system (GLONASS), Beidou satellite navigation system (beidounavigation satellite system, BDS), quasi-zenith satellite system (quasi- zenith satellitesystem (QZSS) and/or satellite based augmentation systems (SBAS).
电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The electronic device 100 implements display functions through a GPU, a display screen 194, an application processor, and the like. The GPU is an image processing microprocessor and is connected to the display screen 194 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
显示屏194用于显示图像,视频等。该显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),发光二极管(light-emitting diode,LED),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can use a liquid crystal display (LCD), a light-emitting diode (LED), an organic light-emitting diode (OLED), an active matrix organic light-emitting diode or an active matrix Organic light-emitting diode (active-matrix organic light emitting diode, AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light emitting diode (QLED) )wait.
电子设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。ISP用于处理摄像头193反馈的数据。摄像头193用于捕获静态图像或视频。数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。视频编解码器用于对数字视频压缩或解压缩。电子设备100可以支持一种或多种视频编解码器。这样,电子设备100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。The electronic device 100 can implement the shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like. The ISP is used to process the data fed back by the camera 193. Camera 193 is used to capture still images or video. Digital signal processors are used to process digital signals. In addition to digital image signals, they can also process other digital signals. Video codecs are used to compress or decompress digital video. Electronic device 100 may support one or more video codecs. In this way, the electronic device 100 can play or record videos in multiple encoding formats, such as moving picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
摄像头193可以包括1~N个。本申请实施例中,至少一个摄像头中配置有PD像素,包括left shielded pixel和right shielded pixel。基于left shielded pixel和rightshielded pixel输出的图像的相位差可以快速进行对焦。The cameras 193 may include 1 to N cameras. In this embodiment of the present application, at least one camera is configured with PD pixels, including left shielded pixels and right shielded pixels. Focusing can be quickly performed based on the phase difference of the images output by left shielded pixel and right shielded pixel.
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备100的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can continuously learn by itself. Intelligent cognitive applications of the electronic device 100 can be implemented through the NPU, such as image recognition, face recognition, speech recognition, text understanding, etc.
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,从而执行电子设备100的各种功能应用以及数据处理。例如,在本申请实施例中,处理器110可以通过执行存储在内部存储器121中的指令,内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100 . The external memory card communicates with the processor 110 through the external memory interface 120 to implement the data storage function. Such as saving music, videos, etc. files in external memory card. Internal memory 121 may be used to store computer executable program code, which includes instructions. The processor 110 executes instructions stored in the internal memory 121 to execute various functional applications and data processing of the electronic device 100 . For example, in the embodiment of the present application, the processor 110 can execute instructions stored in the internal memory 121, and the internal memory 121 can include a program storage area and a data storage area. Among them, the stored program area can store an operating system, at least one application program required for a function (such as a sound playback function, an image playback function, etc.). The storage data area may store data created during use of the electronic device 100 (such as audio data, phone book, etc.). In addition, the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (UFS), etc.
电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。The electronic device 100 can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor. Such as music playback, recording, etc.
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。耳机接口170D用于连接有线耳机。The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. Audio module 170 may also be used to encode and decode audio signals. Speaker 170A, also called "speaker", is used to convert audio electrical signals into sound signals. Receiver 170B, also called "earpiece", is used to convert audio electrical signals into sound signals. Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. The headphone interface 170D is used to connect wired headphones.
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备100可以接收按键输入,产生与电子设备100的用户设置以及功能控制有关的键信号输入。马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和电子设备100的接触和分离。电子设备100可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口195可以支持Nano SIM卡,Micro SIM卡,SIM卡等。The buttons 190 include a power button, a volume button, etc. Key 190 may be a mechanical key. It can also be a touch button. The electronic device 100 may receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 100 . The motor 191 can generate vibration prompts. The motor 191 can be used for vibration prompts for incoming calls and can also be used for touch vibration feedback. The indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, or may be used to indicate messages, missed calls, notifications, etc. The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to or separated from the electronic device 100 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195 . The electronic device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. SIM card interface 195 can support Nano SIM card, Micro SIM card, SIM card, etc.
以下实施例中的方法均可以在具有上述硬件结构的电子设备100中实现。The methods in the following embodiments can all be implemented in the electronic device 100 with the above hardware structure.
上述电子设备100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本发明实施例以分层架构的Android系统为例,示例性说明电子设备100的软件结构。The software system of the above-mentioned electronic device 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. This embodiment of the present invention takes the Android system with a layered architecture as an example to illustrate the software structure of the electronic device 100 .
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过接口通信。在一些实施例中,Android系统可以包括应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,硬件抽象层(hardware abstraction layer,HAL)以及内核层。需要说明的是,本申请实施例以Android系统举例来说明,在其他操作系统中(例如鸿蒙系统,IOS系统等),只要各个功能模块实现的功能和本申请的实施例类似也能实现本申请的方案。The layered architecture divides the software into several layers, and each layer has clear roles and division of labor. The layers communicate through interfaces. In some embodiments, the Android system may include an application layer, an application framework layer, an Android runtime and system libraries, a hardware abstraction layer (HAL), and a kernel layer. It should be noted that the embodiments of the present application are illustrated by taking the Android system as an example. In other operating systems (such as Hongmeng system, IOS system, etc.), as long as the functions implemented by each functional module are similar to those of the embodiments of the present application, the present application can also be implemented. plan.
其中,应用程序层可以包括一系列应用程序包。Among them, the application layer can include a series of application packages.
如图6B所示,Android系统可以包括应用程序层(可以简称为应用层),应用程序框架层(可以简称为框架层)以及内核层。另外,Android系统还可以包括Android runtime和系统库,本申请不做限定。As shown in Figure 6B, the Android system may include an application layer (which may be referred to as an application layer), an application framework layer (which may be referred to as a framework layer), and a kernel layer. In addition, the Android system can also include Android runtime and system libraries, which are not limited in this application.
其中,应用程序层可以包括例如相机,图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,短信息等应用程序,本申请实施例对此不做任何限制。The application layer may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, etc. This embodiment of the present application does not impose any restrictions on this.
应用程序框架层为应用程序层的应用程序提供应用编程接口(applicationprogramming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。The application framework layer provides an application programming interface (API) and programming framework for applications in the application layer. The application framework layer includes some predefined functions.
应用程序框架层可以包括活动管理器、窗口管理器,内容提供器,视图系统,资源管理器,通知管理器等,本申请实施例对此不做任何限制。The application framework layer may include an activity manager, a window manager, a content provider, a view system, a resource manager, a notification manager, etc. This embodiment of the present application does not impose any restrictions on this.
内核层是硬件和软件之间的层。内核层可以包括显示驱动,Wi-Fi驱动,摄像头驱动,音频驱动,传感器驱动等。The kernel layer is the layer between hardware and software. The kernel layer can include display drivers, Wi-Fi drivers, camera drivers, audio drivers, sensor drivers, etc.
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。其中,在本申请的描述中,除非另有说明,“至少一个”是指一个或多个,“多个”是指两个或多于两个。另外,为了便于清楚描述本申请实施例的技术方案,在本申请的实施例中,采用了“第一”、“第二”等字样对功能和作用基本相同的相同项或相似项进行区分。本领域技术人员可以理解“第一”、“第二”等字样并不对数量和执行次序进行限定,并且“第一”、“第二”等字样也并不限定一定不同。The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. Among them, in the description of this application, unless otherwise specified, "at least one" refers to one or more, and "plurality" refers to two or more than two. In addition, in order to facilitate a clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as “first” and “second” are used to distinguish identical or similar items with basically the same functions and effects. Those skilled in the art can understand that words such as "first" and "second" do not limit the number and execution order, and words such as "first" and "second" do not limit the number and execution order.
为了便于理解,以下结合附图对本申请实施例提供的对焦方法进行具体介绍。For ease of understanding, the focusing method provided by the embodiment of the present application will be introduced in detail below with reference to the accompanying drawings.
如图6C所示,本申请实施例提供一种对焦方法,包括:As shown in Figure 6C, this embodiment of the present application provides a focusing method, including:
601、判断当前取景画面是否属于多景深场景。601. Determine whether the current viewfinder belongs to a multi-depth-of-field scene.
当用户使用终端设备进行拍摄(拍照或摄像)时,终端设备的显示屏可以显示当前取景画面。例如,如图7中的(a)所示,响应于用户在终端设备的主界面701打开相机应用的操作(例如,点击操作),如图7中的(b)所示,终端设备的显示屏可以显示当前时刻的画面703(即当前取景画面)。When a user uses a terminal device to take pictures (photograph or video), the display screen of the terminal device can display the current viewfinder image. For example, as shown in (a) of Figure 7 , in response to the user's operation (for example, a click operation) of opening the camera application on the main interface 701 of the terminal device, as shown in (b) of Figure 7 , the display of the terminal device The screen can display the picture 703 at the current moment (that is, the current viewfinder picture).
判断当前取景画面是否属于多景深场景时,首先可以计算当前取景画面的相位差序列。示例性的,如图8所示,从摄像头获取取景画面对应的PD raw图,PD raw图包括leftPD raw图和right PD raw图。其中,RAW图可以理解为“未经加工和未经压缩的图像数据”。然后,将PD raw图输入相位检测库(PDLIB)计算PD值。其中,PDLIB可以通过增益图(gainmap)为PD raw图对应的PD像素提升增益(gain)。然后,根据提升增益后的PD像素计算PD值。多个PD值可以组成PD序列。When determining whether the current viewing image belongs to a multi-depth-of-field scene, the phase difference sequence of the current viewing image can be calculated first. For example, as shown in Figure 8, the PD raw image corresponding to the viewfinder is obtained from the camera, and the PD raw image includes the left PD raw image and the right PD raw image. Among them, RAW images can be understood as "unprocessed and uncompressed image data". Then, the PD raw image is input into the phase detection library (PDLIB) to calculate the PD value. Among them, PDLIB can increase the gain (gain) for the PD pixels corresponding to the PD raw image through the gain map. Then, the PD value is calculated based on the PD pixels after the gain is increased. Multiple PD values can form a PD sequence.
然后,根据相位差序列(PD序列)和预设阈值判断取景画面是否属于多景深场景。确定相位差序列中的最大值和最小值,判断该最大值和最小值的差值的绝对值与预设阈值的大小,若差值的绝对值大于预设阈值,判断该场景为多景深场景,若差值的绝对值小于预设阈值,判断该场景为非多景深场景。其中,预设阈值的取值例如可以是80。Then, based on the phase difference sequence (PD sequence) and the preset threshold, it is determined whether the viewing image belongs to a multi-depth scene. Determine the maximum value and minimum value in the phase difference sequence, and determine the absolute value of the difference between the maximum value and the minimum value and the preset threshold. If the absolute value of the difference is greater than the preset threshold, the scene is determined to be a multi-depth scene. , if the absolute value of the difference is less than the preset threshold, the scene is judged to be a non-multi-depth-of-field scene. The value of the preset threshold may be 80, for example.
示例性的,假设pd值序列为{pd1,pd2,pd3,pd4,…,pdn},多景深判断阈值(即预设阈值)为multidepth_thr,在pd序列{pd1,pd2,pd3,pd4,…,pdn}中选取最大pd值max_pd和最小pd值min_pd;当|max_pd-min_pd|>multidepth_thr时,判断该场景为多景深场景。当|max_pd-min_pd|<multidepth_thr时,判断该场景为非多景深场景。For example, assuming that the pd value sequence is {pd1, pd2, pd3, pd4,..., pdn}, the multi-depth judgment threshold (ie, the preset threshold) is multidepth_thr, in the pd sequence {pd1, pd2, pd3, pd4,..., pdn}, select the maximum pd value max_pd and the minimum pd value min_pd; when |max_pd-min_pd|>multidepth_thr, the scene is judged to be a multi-depth scene. When |max_pd-min_pd|<multidepth_thr, the scene is judged to be a non-multidepth scene.
需要说明的是,目前大部分摄像头都配置有PD像素,具有PDAF功能(支持PDAF技术)。即摄像头拍摄的图像通过PDAF算法的处理可以得到相位差序列,根据相位差序列可以进行对焦。并且,采用PDAF技术进行对焦的成像效果好,相较于激光成像成本低,不受距离限制。因此,基于PDAF技术得到的相位差序列来判断图像是否为多景深图像的适配度高,可以适配市面大部分厂商的摄像头或摄像产品。It should be noted that most current cameras are equipped with PD pixels and have PDAF function (support PDAF technology). That is, the image captured by the camera can be processed by the PDAF algorithm to obtain a phase difference sequence, and focusing can be performed based on the phase difference sequence. Moreover, the imaging effect using PDAF technology for focusing is good, the cost is lower than laser imaging, and it is not limited by distance. Therefore, judging whether an image is a multi-depth-of-field image based on the phase difference sequence obtained by PDAF technology has a high degree of adaptability and can be adapted to cameras or imaging products from most manufacturers on the market.
602、若当前取景画面为多景深场景,判断当前取景画面中是否有人物。602. If the current viewfinder is a multi-depth-of-field scene, determine whether there are people in the current viewfinder.
可以基于人脸识别算法或者人体识别算法判断当前取景画面中是否有人物(即是否存在人脸或人体)。根据人脸识别算法进行人脸识别的过程,和基于人体识别算法识别人体的过程可以参考现有技术,在此不做赘述。Whether there is a person in the current view frame (that is, whether there is a face or a human body) can be determined based on the face recognition algorithm or the human body recognition algorithm. The process of face recognition based on the face recognition algorithm and the process of identifying the human body based on the human body recognition algorithm can refer to the existing technology and will not be described in detail here.
603、若当前取景画面中有人物,判断当前取景画面中的目标人脸的注意力位置是否在取景画面内。603. If there is a person in the current viewfinder, determine whether the attention position of the target face in the current viewfinder is within the viewfinder.
若取景画面中包括一个人物,目标人脸即该人物的人脸,判断该人物的人脸的注意力位置是否在取景画面内。其中,人脸的注意力位置是人眼的视线方向的汇聚区域(汇聚点)。If the viewfinder includes a character, the target face is the face of the character, and it is determined whether the attention position of the character's face is within the viewfinder. Among them, the attention position of the human face is the convergence area (convergence point) of the line of sight direction of the human eye.
若取景画面中包括多个人物,判断目标人脸的注意力位置是否在取景画面内。目标人脸可以是取景画面中面积占比最大的人脸。If the viewfinder includes multiple people, determine whether the attention position of the target face is within the viewfinder. The target face can be the face with the largest area in the viewfinder.
在一种可能的设计中,可以根据人脸框大小、人脸与中心位置的偏离程度以及人脸与镜头的距离远近等参数确定目标人脸。其中,人脸框大小、人脸与中心位置的偏离程度以及人脸与镜头的距离远近等参数的权重比例可以基于机器学习算法进行调整,以便可以更准确地确定出目标人脸。In one possible design, the target face can be determined based on parameters such as the size of the face frame, the deviation of the face from the center position, and the distance between the face and the lens. Among them, the weight ratio of parameters such as the size of the face frame, the deviation of the face from the center position, and the distance between the face and the camera can be adjusted based on the machine learning algorithm so that the target face can be determined more accurately.
604、若当前取景画面中没有人物,进行中心对焦或智能对焦。604. If there are no people in the current viewfinder, perform center focus or smart focus.
即确定当前取景画面中没有人物时,可以基于当前取景画面的中心区域进行对焦,或者可以检测出当前取景画面中的主体(如:花朵、人脸),基于主体所在的位置进行对焦。That is, when it is determined that there are no people in the current viewfinder, you can focus based on the center area of the current viewfinder, or you can detect the subject in the current viewfinder (such as flowers, faces), and focus based on the location of the subject.
605、若当前取景画面中的目标人脸的注意力位置在画面外,进行人脸对焦。605. If the attention position of the target face in the current viewfinder is outside the frame, focus on the face.
即当取景画面中的目标人脸的视线方向的汇聚区域超出取景画面时,可以采用人脸对焦的方案,即基于目标人脸进行对焦。目标人脸可以是取景画面中面积占比最大的人脸。That is, when the convergence area of the sight direction of the target face in the viewfinder exceeds the viewfinder, a face focusing solution can be used, that is, focusing based on the target face. The target face can be the face with the largest area in the viewfinder.
如图9所示,取景画面903中的人物901的注意力位置902在取景画面903外,可以采取人脸对焦的方案,例如选择人物901的人脸进行对焦。As shown in FIG. 9 , the attention position 902 of the character 901 in the viewfinder 903 is outside the viewfinder 903 , and a face focusing solution can be adopted, for example, the face of the character 901 is selected for focus.
606、若当前取景画面中的目标人脸的注意力位置在取景画面内,以当前取景画面中的目标人脸的注意力位置进行对焦。606. If the attention position of the target face in the current viewfinder is within the viewfinder, focus is performed based on the attention position of the target face in the current viewfinder.
即当取景画面中的人物的人眼视线方向的汇聚区域在取景画面中时,以取景画面中人物的注意力位置为对焦位置进行对焦。That is, when the convergence area of the human eyesight direction of the characters in the framing picture is in the framing picture, focusing is performed with the attention position of the characters in the framing picture as the focus position.
如图10所示,取景画面1003中的人物1001的注意力位置1002在取景画面1003内,可以基于注意力位置1002进行对焦。即可以将注意力位置1002作为对焦位置。As shown in FIG. 10 , the attention position 1002 of the character 1001 in the viewfinder 1003 is within the viewfinder 1003 , and focusing can be performed based on the attention position 1002 . That is, the attention position 1002 can be used as the focus position.
607、若取景画面为非多景深场景,判断是否检测到拍摄者。607. If the viewfinder is a non-multi-depth-of-field scene, determine whether the photographer is detected.
电子设备可以通过前置摄像头检测是否有拍摄者。例如,若用户通过手持电子设备进行拍摄时,可以检测到拍摄者。若用户通过拍照杆等设备支撑该电子设备进行拍摄时,或者,用于将电子设备置于桌面,草地等位置进行拍摄时,可能检测不到拍摄者。The electronic device can detect whether there is a photographer through the front-facing camera. For example, if a user takes a photo with a handheld electronic device, the photographer can be detected. If the user uses a camera stick or other equipment to support the electronic device for shooting, or if the electronic device is placed on a table, grass, etc. for shooting, the photographer may not be detected.
608、若检测到拍摄者,判断是否能够检测出拍摄者的注意力位置。608. If the photographer is detected, determine whether the photographer's attention position can be detected.
若检测到拍摄者,可以通过LED灯发光照射眼角膜,感应器检测角膜的红外反射光来识别用户的瞳孔的视线位置,从而确定拍摄者的注意力位置。If the photographer is detected, the LED light can be used to illuminate the cornea, and the sensor detects the infrared reflected light of the cornea to identify the sight position of the user's pupils, thereby determining the photographer's attention position.
609、若未检测到拍摄者,进行中心对焦或智能对焦。609. If the photographer is not detected, perform center focus or smart focus.
即确定当前取景画面中没有人物时,可以基于当前取景画面的中心区域进行对焦,或者可以检测出当前取景画面中的主体(如:花朵、人脸),基于主体所在的位置进行对焦。That is, when it is determined that there are no people in the current viewfinder, you can focus based on the center area of the current viewfinder, or you can detect the subject in the current viewfinder (such as flowers, faces), and focus based on the location of the subject.
610、若能够检测出拍摄者的注意力位置,根据拍摄者注意力位置进行对焦。610. If the photographer's attention position can be detected, focus will be performed based on the photographer's attention position.
即可以通过拍摄者的眼睛(眼球)来对焦,通过拍摄者的眼睛的转动可以控制对焦区域的变化。That is, the photographer's eyes (eyeballs) can be used to focus, and the changes in the focus area can be controlled by the movement of the photographer's eyes.
如图11所示,前置注意力检测系统可以检测拍摄者的眼睛在当前取景画面中的视线位置,之后,可以将该视线位置的坐标下发给后置对焦算法,后置对焦算法根据瞳孔的视线位置生成对焦窗1101,再根据对焦窗1101中的像素的相位差信息驱动马达完成对焦。As shown in Figure 11, the front attention detection system can detect the gaze position of the photographer's eyes in the current viewfinder. Afterwards, the coordinates of the gaze position can be sent to the post-focus algorithm. The post-focus algorithm determines the position of the gaze according to the pupil. The focus window 1101 is generated based on the line of sight position, and then the motor is driven to complete focusing based on the phase difference information of the pixels in the focus window 1101.
611、若不能检测出拍摄者的注意力位置,进行人脸对焦。611. If the photographer's attention position cannot be detected, focus on the face.
即当检测出拍摄者的注意力位置时,可以采用人脸对焦的方案。例如,可以选择当前取景画面中面积占比最大的人脸进行对焦。That is, when the photographer's attention position is detected, the face focusing solution can be used. For example, you can select the face with the largest area in the current viewfinder to focus.
在一种可能的设计中,可以根据人脸框大小、人脸与中心位置的权重比例以及人脸与镜头的距离远近等参数获取最终对焦的人脸。例如,可以选择最靠近画面中心位置的人脸对焦,或者可以选择距离镜头最近的人脸进行对焦,或者可以是以取景画面中的正脸(离镜头最近的人脸不是正脸)进行对焦。In one possible design, the final focused face can be obtained based on parameters such as the size of the face frame, the weight ratio of the face to the center position, and the distance between the face and the lens. For example, you can select the face closest to the center of the frame to focus, or you can select the face closest to the lens to focus, or you can focus on the front face in the viewfinder (the face closest to the lens is not the front face).
基于本申请实施例提供的对焦方法,可以根据当前取景画面是否为多景深场景采取不同的注意力对焦方案。例如当前取景画面为非多景深场景时,可以基于拍摄者的注意力位置进行对焦。由于非多景深场景内容简单,画面中的对象(例如,人或物)所处深度相似或相近,人更加容易理解简单场景,也就更容易找出画面中的重点,此时可以基于拍摄者的注意力位置进行对焦,可以使画面重点更为突出,提高用户体验。反之,当前取景画面为多景深场景时,可以以画面中人物(目标人脸)注意力方向作为对焦方向。由于多景深场景内容复杂,画面中的对象(例如,人或物)所处深度不同,人不容易快速理解复杂场景,难以迅速找出画面中的重点,此时以拍摄者注意力位置作为对焦位置不够准确和快速,可以基于画面中人物(目标人脸)注意力方向作为对焦方向,更加准确和合理,可以使画面重点更为突出,更加符合镜头语言的表达,提高用户体验。Based on the focusing method provided by the embodiment of the present application, different attention focusing solutions can be adopted according to whether the current viewing frame is a multi-depth-of-field scene. For example, when the current viewfinder is a non-multi-depth-of-field scene, focusing can be based on the photographer's attention position. Since the content of the non-multi-depth-of-field scene is simple and the objects (for example, people or objects) in the picture are at similar or similar depths, it is easier for people to understand simple scenes, and it is easier to find the key points in the picture. In this case, based on the photographer Focusing on the attention position can make the focus of the picture more prominent and improve the user experience. On the contrary, when the current viewing frame is a scene with multiple depths of field, the direction of attention of the person (target face) in the frame can be used as the focus direction. Due to the complex content of multi-depth scenes, objects in the picture (for example, people or objects) are at different depths. It is difficult for people to quickly understand complex scenes and find the key points in the picture. At this time, the focus is based on the photographer's attention position. If the position is not accurate and fast enough, the focus direction can be based on the attention direction of the person in the picture (target face), which is more accurate and reasonable. It can make the focus of the picture more prominent, more consistent with the expression of the lens language, and improve the user experience.
本申请一些实施例提供了一种电子设备,该电子设备可以包括:触摸屏、存储器和一个或多个处理器。该触摸屏、存储器和处理器耦合。该存储器用于存储计算机程序代码,该计算机程序代码包括计算机指令。当处理器执行计算机指令时,电子设备可执行上述方法实施例中电子设备执行的各个功能或者步骤。该电子设备的结构可以参考图6A所示的电子设备100的结构。Some embodiments of the present application provide an electronic device, which may include a touch screen, a memory, and one or more processors. The touch screen, memory and processor are coupled. The memory is used to store computer program code, which includes computer instructions. When the processor executes computer instructions, the electronic device may perform various functions or steps performed by the electronic device in the above method embodiments. The structure of the electronic device may refer to the structure of the electronic device 100 shown in FIG. 6A.
本申请实施例还提供一种芯片系统(例如,片上系统(system on a chip,SoC)),如图12所示,该芯片系统包括至少一个处理器1201和至少一个接口电路1202。处理器1201和接口电路1202可通过线路互联。例如,接口电路1202可用于从其它装置(例如电子设备的存储器)接收信号。又例如,接口电路1202可用于向其它装置(例如处理器1201或者电子设备的触摸屏)发送信号。示例性的,接口电路1202可读取存储器中存储的指令,并将该指令发送给处理器1201。当所述指令被处理器1201执行时,可使得电子设备执行上述实施例中的各个步骤。当然,该芯片系统还可以包含其他分立器件,本申请实施例对此不作具体限定。An embodiment of the present application also provides a chip system (for example, a system on a chip (SoC)). As shown in FIG. 12 , the chip system includes at least one processor 1201 and at least one interface circuit 1202 . The processor 1201 and the interface circuit 1202 may be interconnected by wires. For example, interface circuit 1202 may be used to receive signals from other devices, such as memory of an electronic device. As another example, the interface circuit 1202 may be used to send signals to other devices, such as the processor 1201 or a touch screen of an electronic device. For example, the interface circuit 1202 can read instructions stored in the memory and send the instructions to the processor 1201. When the instructions are executed by the processor 1201, the electronic device can be caused to perform various steps in the above embodiments. Of course, the chip system may also include other discrete devices, which are not specifically limited in the embodiments of this application.
本申请实施例还提供一种计算机可读存储介质,该计算机可读存储介质包括计算机指令,当所述计算机指令在上述电子设备上运行时,使得该电子设备执行上述方法实施例中电子设备执行的各个功能或者步骤。Embodiments of the present application also provide a computer-readable storage medium. The computer-readable storage medium includes computer instructions. When the computer instructions are run on the above-mentioned electronic device, the electronic device causes the electronic device to execute the execution of the above-mentioned method embodiment. Each function or step.
本申请实施例还提供一种计算机程序产品,当所述计算机程序产品在电子设备上运行时,使得所述电子设备执行上述方法实施例中电子设备执行的各个功能或者步骤。An embodiment of the present application also provides a computer program product. When the computer program product is run on an electronic device, it causes the electronic device to perform each function or step performed by the electronic device in the above method embodiment.
通过以上实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。Through the description of the above embodiments, those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above functional modules is used as an example. In practical applications, the above functions can be allocated according to needs. Different functional modules are completed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods, for example, multiple units or components may be The combination can either be integrated into another device, or some features can be omitted, or not implemented. On the other hand, the coupling or direct coupling or communication connection between each other shown or discussed may be through some interfaces, and the indirect coupling or communication connection of the devices or units may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同地方。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated. The components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place, or they may be distributed to multiple different places. . Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application can be integrated into one processing unit, each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated units can be implemented in the form of hardware or software functional units.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该软件产品存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of the present application are essentially or contribute to the existing technology, or all or part of the technical solution can be embodied in the form of a software product, and the software product is stored in a storage medium , including several instructions to cause a device (which can be a microcontroller, a chip, etc.) or a processor to execute all or part of the steps of the methods described in various embodiments of this application. The aforementioned storage media include: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program codes.
以上内容,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above contents are only specific implementation modes of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application shall be covered by the protection scope of the present application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210866534.7A CN116074624B (en) | 2022-07-22 | 2022-07-22 | A focusing method and device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210866534.7A CN116074624B (en) | 2022-07-22 | 2022-07-22 | A focusing method and device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN116074624A CN116074624A (en) | 2023-05-05 |
| CN116074624B true CN116074624B (en) | 2023-11-10 |
Family
ID=86173730
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202210866534.7A Active CN116074624B (en) | 2022-07-22 | 2022-07-22 | A focusing method and device |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN116074624B (en) |
Citations (21)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2005326506A (en) * | 2004-05-12 | 2005-11-24 | Olympus Corp | Focus detection device and focus detection method |
| CN1713016A (en) * | 2004-06-15 | 2005-12-28 | 佳能株式会社 | photography device |
| JP2009290255A (en) * | 2008-05-27 | 2009-12-10 | Sony Corp | Imaging apparatus, imaging apparatus control method and computer program |
| CN101764925A (en) * | 2008-12-25 | 2010-06-30 | 华晶科技股份有限公司 | Shallow depth of field simulation method for digital image |
| JP2012124555A (en) * | 2010-12-06 | 2012-06-28 | Canon Inc | Imaging apparatus |
| CN103400366A (en) * | 2013-07-03 | 2013-11-20 | 西安电子科技大学 | Method for acquiring dynamic scene depth based on fringe structure light |
| JP2015197896A (en) * | 2014-04-03 | 2015-11-09 | シャープ株式会社 | Image processing device |
| CN105827928A (en) * | 2015-01-05 | 2016-08-03 | 中兴通讯股份有限公司 | Focusing area selection method and focusing area selection device |
| CN107439005A (en) * | 2016-03-29 | 2017-12-05 | 华为技术有限公司 | A kind of method, apparatus and equipment for determining focusing window |
| CN110149482A (en) * | 2019-06-28 | 2019-08-20 | Oppo广东移动通信有限公司 | Focusing method, focusing device, electronic equipment and computer readable storage medium |
| CN110191287A (en) * | 2019-06-28 | 2019-08-30 | Oppo广东移动通信有限公司 | Focusing method and device, electronic equipment and computer readable storage medium |
| CN111010506A (en) * | 2019-11-15 | 2020-04-14 | 华为技术有限公司 | A shooting method and electronic device |
| CN112822402A (en) * | 2021-01-08 | 2021-05-18 | 重庆创通联智物联网有限公司 | Image shooting method and device, electronic equipment and readable storage medium |
| WO2021136050A1 (en) * | 2019-12-31 | 2021-07-08 | 华为技术有限公司 | Image photographing method and related apparatus |
| CN113382154A (en) * | 2020-02-25 | 2021-09-10 | 荣耀终端有限公司 | Human body image beautifying method based on depth and electronic equipment |
| WO2021179186A1 (en) * | 2020-03-10 | 2021-09-16 | 华为技术有限公司 | Focusing method and apparatus, and electronic device |
| CN113572956A (en) * | 2021-06-25 | 2021-10-29 | 荣耀终端有限公司 | Focusing method and related equipment |
| CN114079726A (en) * | 2020-08-13 | 2022-02-22 | 华为技术有限公司 | Shooting method and equipment |
| CN114359406A (en) * | 2021-12-30 | 2022-04-15 | 像工场(深圳)科技有限公司 | Calibration of auto-focusing binocular camera, 3D vision and depth point cloud calculation method |
| WO2022126430A1 (en) * | 2020-12-16 | 2022-06-23 | 深圳市大疆创新科技有限公司 | Auxiliary focusing method, apparatus and system |
| CN114677620A (en) * | 2022-03-02 | 2022-06-28 | 北京极感科技有限公司 | Focusing method, electronic device and computer readable medium |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US9277111B2 (en) * | 2012-05-18 | 2016-03-01 | Canon Kabushiki Kaisha | Image capture apparatus and control method therefor |
| US10057566B2 (en) * | 2014-04-04 | 2018-08-21 | Tektronix, Inc. | Depth of field indication using focus-peaking picture markers |
-
2022
- 2022-07-22 CN CN202210866534.7A patent/CN116074624B/en active Active
Patent Citations (21)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2005326506A (en) * | 2004-05-12 | 2005-11-24 | Olympus Corp | Focus detection device and focus detection method |
| CN1713016A (en) * | 2004-06-15 | 2005-12-28 | 佳能株式会社 | photography device |
| JP2009290255A (en) * | 2008-05-27 | 2009-12-10 | Sony Corp | Imaging apparatus, imaging apparatus control method and computer program |
| CN101764925A (en) * | 2008-12-25 | 2010-06-30 | 华晶科技股份有限公司 | Shallow depth of field simulation method for digital image |
| JP2012124555A (en) * | 2010-12-06 | 2012-06-28 | Canon Inc | Imaging apparatus |
| CN103400366A (en) * | 2013-07-03 | 2013-11-20 | 西安电子科技大学 | Method for acquiring dynamic scene depth based on fringe structure light |
| JP2015197896A (en) * | 2014-04-03 | 2015-11-09 | シャープ株式会社 | Image processing device |
| CN105827928A (en) * | 2015-01-05 | 2016-08-03 | 中兴通讯股份有限公司 | Focusing area selection method and focusing area selection device |
| CN107439005A (en) * | 2016-03-29 | 2017-12-05 | 华为技术有限公司 | A kind of method, apparatus and equipment for determining focusing window |
| CN110191287A (en) * | 2019-06-28 | 2019-08-30 | Oppo广东移动通信有限公司 | Focusing method and device, electronic equipment and computer readable storage medium |
| CN110149482A (en) * | 2019-06-28 | 2019-08-20 | Oppo广东移动通信有限公司 | Focusing method, focusing device, electronic equipment and computer readable storage medium |
| CN111010506A (en) * | 2019-11-15 | 2020-04-14 | 华为技术有限公司 | A shooting method and electronic device |
| WO2021136050A1 (en) * | 2019-12-31 | 2021-07-08 | 华为技术有限公司 | Image photographing method and related apparatus |
| CN113382154A (en) * | 2020-02-25 | 2021-09-10 | 荣耀终端有限公司 | Human body image beautifying method based on depth and electronic equipment |
| WO2021179186A1 (en) * | 2020-03-10 | 2021-09-16 | 华为技术有限公司 | Focusing method and apparatus, and electronic device |
| CN114079726A (en) * | 2020-08-13 | 2022-02-22 | 华为技术有限公司 | Shooting method and equipment |
| WO2022126430A1 (en) * | 2020-12-16 | 2022-06-23 | 深圳市大疆创新科技有限公司 | Auxiliary focusing method, apparatus and system |
| CN112822402A (en) * | 2021-01-08 | 2021-05-18 | 重庆创通联智物联网有限公司 | Image shooting method and device, electronic equipment and readable storage medium |
| CN113572956A (en) * | 2021-06-25 | 2021-10-29 | 荣耀终端有限公司 | Focusing method and related equipment |
| CN114359406A (en) * | 2021-12-30 | 2022-04-15 | 像工场(深圳)科技有限公司 | Calibration of auto-focusing binocular camera, 3D vision and depth point cloud calculation method |
| CN114677620A (en) * | 2022-03-02 | 2022-06-28 | 北京极感科技有限公司 | Focusing method, electronic device and computer readable medium |
Also Published As
| Publication number | Publication date |
|---|---|
| CN116074624A (en) | 2023-05-05 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11785329B2 (en) | Camera switching method for terminal, and terminal | |
| CN113132620B (en) | Image shooting method and related device | |
| EP4024168A1 (en) | Hand gesture interaction method and apparatus, and terminal device | |
| WO2021129198A1 (en) | Method for photography in long-focal-length scenario, and terminal | |
| CN115967851B (en) | Fast photographing method, electronic device and computer-readable storage medium | |
| WO2020015144A1 (en) | Photographing method and electronic device | |
| CN113741681B (en) | Image correction method and electronic device | |
| CN113810601A (en) | Terminal image processing method and device and terminal equipment | |
| CN114079725B (en) | Video anti-shake method, terminal device, and computer-readable storage medium | |
| WO2022267464A1 (en) | Focusing method and related device | |
| WO2021013132A1 (en) | Input method and electronic device | |
| CN114880251B (en) | Storage unit access method, access device and terminal equipment | |
| CN115484383B (en) | Shooting method and related device | |
| CN112085647A (en) | Face correction method and electronic equipment | |
| CN114726950A (en) | Opening method and device of camera module | |
| CN114257737B (en) | Shooting mode switching method and related equipment | |
| WO2022062985A1 (en) | Method and apparatus for adding special effect in video, and terminal device | |
| CN113747056A (en) | Photographing method and device and electronic equipment | |
| CN114302063A (en) | Shooting method and equipment | |
| CN116055859B (en) | Image processing method and electronic device | |
| CN116074624B (en) | A focusing method and device | |
| CN116582743A (en) | A shooting method, electronic device and medium | |
| CN117593236A (en) | Image display method, device and terminal equipment | |
| WO2021197014A1 (en) | Picture transmission method and apparatus | |
| CN114579900A (en) | Cross-device page switching method, electronic device and storage medium |
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 | ||
| CP03 | Change of name, title or address | ||
| CP03 | Change of name, title or address |
Address after: Unit 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong 518040 Patentee after: Honor Terminal Co.,Ltd. Country or region after: China Address before: 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong Patentee before: Honor Device Co.,Ltd. Country or region before: China |