Camera focusing method and electronic device

By users wearing a Bluetooth device and using Bluetooth positioning technology to determine the focus point, the problem of smartphones being unable to focus accurately in complex environments is solved, achieving higher focusing success rate and image clarity.

CN115209027BActive Publication Date: 2024-09-06HUAWEI TECH CO LTD
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202110322579.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-25
Publication Date
2024-09-06
Estimated Expiration
2041-03-25

AI Technical Summary

Technical Problem

Smartphones cannot quickly and accurately identify the location of faces in environments with many faces, specific faces that are partially blocked, or poor lighting conditions, resulting in the inability to determine a stable focus point and causing the camera to be unable to focus accurately.

Method used

The user wears the Bluetooth device, uses Bluetooth positioning technology to determine the focus point of the camera, uses at least two antennas to receive Bluetooth signals to determine the position information of the second electronic device relative to the first electronic device, and focuses the camera based on this information.

Benefits of technology

When the face is partially or completely blocked and the lighting conditions are poor, it can determine a stable focus point, improve the success rate of focus, and obtain clearer images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115209027B
    Figure CN115209027B
Patent Text Reader

Abstract

The embodiment of the present application discloses a method for focusing a camera and an electronic device, wherein a user wears a second electronic device (such as a Bluetooth headset), and the second electronic device sends a Bluetooth signal to a first electronic device. When the user opens a camera program to take a photo of a person, the first electronic device can determine the position information of the second electronic device relative to the first electronic device based on the received Bluetooth signal, and then focus the camera based on the position information. In this way, no matter the face is partially or completely blocked, the light conditions are poor, or the face cannot be recognized by the face recognizer, the first electronic device can always determine a stable focus point based on the above position information, and then focus the camera based on the focus point.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of mobile terminal technology, and in particular to a camera focusing method and electronic device. Background Art

[0002] Nowadays, smartphone users have an increasing demand for taking photos and videos with their phones, and they also have higher requirements for shooting experience. In order to make the specific scene captured clearer, the specific scene can be used as a focus point, and the focus module of the smartphone can be used to complete the focus based on the focus point.

[0003] Among them, there are roughly three types of implementation schemes for smartphone autofocus technology, namely contrast autofocus (CDAF), phase autofocus (PDAF) and laser-assisted focus. Among them, the principle of contrast autofocus is to assume that the contrast between adjacent pixels is the largest after the focus is successful. Based on this assumption, a focus point is determined during the focusing process, and then the contrast between the focus point and the adjacent pixels is judged. After repeatedly moving the focus motor, a local gradient maximum is obtained to determine the focus is successful; the principle of phase autofocus is to reserve some masked pixels on the photosensitive element for phase detection, determine a focus point during the focusing process, and determine the focus offset value by the distance between pixels and its changes to achieve focusing; the principle of laser-assisted focus is to determine a focus point during the focusing process, send a group of infrared lasers from the camera to the point, and calculate the distance based on the time it takes to receive the return laser. From the above description, it can be seen that determining the focus point in autofocus technology is a problem that all autofocus solutions need to solve.

[0004] However, due to the limitations of software and hardware capabilities on current mobile phones, the above technology cannot accurately determine the focus point in some scenarios.

[0005] For example, when users use smartphones to take photos or videos, people are one of the most frequently photographed contents. Accurately focusing on faces in different environments is a basic requirement for taking photos and creating videos using smartphone cameras. A commonly used technical solution is to first detect a face through the face detection function in the camera system of the mobile phone, and use the face as a focus point. The position of the focus point can be determined as a position depicted by key points in the facial features, and the position of the focus point is further transmitted to the focus module of the camera system of the mobile phone, and the focus module completes the focus on the face.

[0006] However, in shooting environments with many faces, environments where specific faces are partially or completely blocked, or shooting environments with poor lighting conditions, due to the limitations of the software and hardware capabilities on current mobile phones, the above-mentioned technologies are often unable to quickly and accurately identify the position of specific faces, and thus are unable to determine a stable focus point, resulting in the problem of inaccurate focus of the camera. Summary of the invention

[0007] The embodiment of the present application discloses a camera focusing method and an electronic device. When a user wears a Bluetooth device, the user uses the electronic device to take a photo. The electronic device can determine the position of the Bluetooth device worn by the user through Bluetooth positioning, and then focus the camera according to the position. In this way, the problem that the electronic device cannot accurately focus the camera due to the inability to determine a stable focus point is solved.

[0008] In a first aspect, an embodiment of the present application provides a camera focusing method, which is applied to a first electronic device, the first electronic device comprising a camera and at least two antennas, the method comprising: receiving a Bluetooth signal sent by a second electronic device through the at least two antennas; when the camera is turned on, in response to a user operation input to a Bluetooth positioning control, determining position information of the second electronic device relative to the first electronic device according to the Bluetooth signals received by the at least two antennas; and focusing the camera based on the position information.

[0009] In the above method, the first electronic device determines the position information of the second electronic device relative to the first electronic device by calculating the Bluetooth signal from the second electronic device, and further focuses the camera according to the position information. In this way, no matter the user's face is partially or completely blocked, the light conditions are poor, or the face cannot be recognized by the face recognizer, the first electronic device can always determine a stable focus point according to the above position information, and then focus the camera according to the focus point, thereby improving the success rate of focusing.

[0010] In combination with the first aspect, in some embodiments, the position information of the second electronic device relative to the first electronic device includes the distance of the second electronic device from the plane where the camera is located and the orientation information of the second electronic device relative to the first electronic device; an implementation method of focusing the camera based on the position information may be: the first electronic device corrects the distance according to the orientation information of the second electronic device relative to the first electronic device; and the first electronic device focuses the camera using the corrected distance.

[0011] The user wears the second electronic device, and the position of the second electronic device is close to the position of the user's face. The position of the user's face can be approximated as the position of the second electronic device, so the first electronic device can focus the camera according to the position information of the second electronic device relative to the first electronic device. Since the focal plane of the camera is a curved surface, compared with focusing the camera according to the distance from the second electronic device to the plane where the camera is located, the first electronic device will get a better focusing result by focusing the camera according to the corrected distance, thereby obtaining a clearer and more clear image at the position of the second electronic device.

[0012] In combination with the first aspect, in some embodiments, an implementation method of correcting the distance based on the orientation information of the second electronic device relative to the first electronic device may be: the first electronic device determines that the distance between the second electronic device and the first electronic device is the corrected distance based on the distance and the orientation information of the second electronic device relative to the first electronic device.

[0013] Since the first electronic device can acquire a clearer image of the second electronic device by focusing according to the distance between the second electronic device and the first electronic device, the first electronic device can determine the distance between the second electronic device and the first electronic device in this way.

[0014] In combination with the first aspect, in some embodiments, the location information includes the distance between the second electronic device and the plane where the camera is located and the orientation information of the second electronic device relative to the first electronic device, and the method may also include: the first electronic device displays the preview image in real time when the camera is turned on;

[0015] An implementation method for focusing the camera based on the position information may be: the first electronic device determines the position of the second electronic device on the preview image according to the orientation information of the second electronic device relative to the first electronic device; determines a face frame on the preview image according to the position of the second electronic device on the preview image; and focuses the camera based on the position of the face frame and the distance of a target face from the plane where the camera is located, the position of the face frame being the position of the geometric center of the face frame on the preview image, the target face being the face within the face frame in the preview image, and the distance of the target face from the plane where the camera is located being the distance between the second electronic device and the plane where the camera is located.

[0016] The user wears the second electronic device, and the position of the second electronic device is close to the position of the user's face. The first electronic device can determine the face frame according to the position of the second electronic device on the preview image. Further, the camera is focused according to the position of the face frame and the distance between the target face and the plane where the camera is located. In this way, the camera can be focused more accurately, thereby obtaining a clear image at the user's face position, thereby improving the user experience.

[0017] In combination with the first aspect, in some embodiments, the method may further include: the first electronic device displays the face frame at the face position of the preview image.

[0018] Displaying the face frame on the preview image allows the user to see the focus position in the image more intuitively. In some embodiments, the first electronic device can also adjust the position of the face frame based on the user's input operation on the face frame, such as touching the position on the preview image that needs to be focused.

[0019] In combination with the first aspect, in some embodiments, an implementation method for determining the face frame on the preview image according to the position of the second electronic device on the preview image may be: the first electronic device determines the size of the face frame according to the distance of the target face from the plane where the camera is located and the size of the face model, and the size of the face frame is inversely proportional to the distance of the target face from the plane where the camera is located; the first electronic device determines the position of the face frame on the preview image according to the position of the second electronic device on the preview image and the size of the face frame.

[0020] The first electronic device can determine the position and size of the face frame on the preview image according to the size of the face model and the distance between the user's target face and the plane where the camera is located. The accurate position can enable the first electronic device to determine the accurate distance, so that it can focus accurately; the first electronic device can also determine the focus range according to the size of the face frame, so as to obtain a clearer image at the face position.

[0021] In combination with the first aspect, in some embodiments, after determining the face frame on the preview image, the method may further include: the first electronic device inputs the image in the face frame into a face recognizer, and when the face recognizer recognizes facial features, outputs a recognition result as a face; the first electronic device adjusts the size of the face frame to the size of the face, and the position of the face frame to the position of the face.

[0022] Because different users have different face sizes, combining the face recognition results can make the position and size of the determined face frame more accurate.

[0023] In combination with the first aspect, in some embodiments, the second electronic device is a pair of Bluetooth headsets, the pair of Bluetooth headsets includes a left headset and a right headset, and the position information of the second electronic device relative to the first electronic device includes the distances from the left headset and the right headset to the camera plane, and the orientation information of the left headset and the right headset relative to the first electronic device;

[0024] An implementation method for focusing the camera based on the position information may be: the first electronic device determines that the distance between the target face and the plane where the camera is located is the average value of the distances from the left earphone and the right earphone to the camera plane respectively, and the target face is the face of a person wearing the left earphone and the right earphone; the first electronic device determines the position of the left earphone on the preview image based on the orientation information of the left earphone relative to the first electronic device; the first electronic device determines the position of the right earphone on the preview image based on the orientation information of the right earphone relative to the first electronic device; the first electronic device determines a face frame with the position of the left earphone on the preview image and the position of the right earphone on the preview image as boundaries; the first electronic device focuses the camera based on the position of the face frame and the distance between the target face and the plane where the camera is located.

[0025] By using the position information of the left and right earphones, the first electronic device can more quickly determine the position of the face frame, further improving the focusing speed of the camera of the first electronic device.

[0026] In combination with the first aspect, in some embodiments, an implementation method for focusing the camera based on the position of the face frame and the distance of the target face from the plane where the camera is located may be: the first electronic device determines the distance between the camera and the target face based on the position of the face frame and the distance of the target face from the plane where the camera is located; and the first electronic device focuses the camera based on the distance between the camera and the target face.

[0027] Since the focal plane of the camera of the first electronic device is a curved surface, compared with focusing the camera based on the distance between the target face and the plane where the camera is located, focusing based on the distance between the camera and the target face can obtain a clearer image of the target face.

[0028] In combination with the first aspect, in some embodiments, an implementation method for determining the location information of the second electronic device relative to the first electronic device based on the Bluetooth signal received by the at least two antennas may be: the first electronic device determines the arrival angle of the Bluetooth signal reaching each antenna based on the wavelength of the Bluetooth signal, the phase difference of the Bluetooth signal received by each two antennas of the at least two antennas, and the position of each antenna on the first electronic device; the first electronic device determines the location information of the second electronic device relative to the first electronic device based on the arrival angle of the Bluetooth signal reaching each antenna and the position of each antenna on the first electronic device.

[0029] The first electronic device can determine the position information of the second electronic device relative to the first electronic device in real time through the positioning method of the arrival angle of the Bluetooth signal, and can determine a stable focus point based on the position information, so that the first electronic device can focus the camera more quickly and accurately.

[0030] Applying the camera focusing method provided in the above-mentioned first aspect and the possible implementation of the first aspect, the user wears a second electronic device (such as a Bluetooth headset), and the second electronic device sends a Bluetooth signal to the first electronic device. When the user opens the camera program to take a photo of himself, the first electronic device can determine the position information of the second electronic device relative to the first electronic device based on the received Bluetooth signal, and then focus the camera based on the position information. In this way, no matter the face is partially or completely blocked, the light conditions are poor, or the face cannot be recognized by the face recognizer, the first electronic device can always determine a stable focus position, and then accurately focus the camera based on the position. Moreover, during the shooting process, the first electronic device calculates the position of the second electronic device in real time. Therefore, when the first electronic device or the second electronic device moves, the first electronic device can still quickly determine the position of the second electronic device, and then focus based on the position.

[0031] In a second aspect, an embodiment of the present application provides an electronic device, characterized in that it includes: one or more processors, one or more memories, a camera and at least two antennas, wherein the camera and the one or more memories are respectively coupled to the one or more processors; the camera is used to acquire an image; the at least two antennas are used to receive a Bluetooth signal; the one or more memories are used to store a computer program code, wherein the computer program code includes a computer instruction;

[0032] The processor is used to call the computer instructions to perform the following operations: in response to a user operation input to a Bluetooth positioning control, determine the location information of the second electronic device relative to the first electronic device based on the Bluetooth signals received by the at least two antennas; and focus the camera based on the location information.

[0033] In combination with the second aspect, in some embodiments, the position information includes the distance between the second electronic device and the plane where the camera is located and the orientation information of the second electronic device relative to the first electronic device; the processor executes the focusing of the camera based on the position information, including: correcting the distance according to the orientation information of the second electronic device relative to the first electronic device; focusing the camera using the corrected distance.

[0034] In combination with the second aspect, in some embodiments, the processor performs correction of the distance based on the orientation information of the second electronic device relative to the first electronic device, including executing: determining that the distance between the second electronic device and the first electronic device is the corrected distance based on the distance and the orientation information of the second electronic device relative to the first electronic device.

[0035] In conjunction with the second aspect, in some embodiments, the location information includes the distance of the second electronic device from the plane where the camera is located and the orientation information of the second electronic device relative to the first electronic device, and the processor further includes executing: when the camera is turned on, displaying a preview image in real time;

[0036] The processor executes focusing of the camera based on the position information, including: determining the position of the second electronic device on the preview image according to the orientation information of the second electronic device relative to the first electronic device; determining a face frame on the preview image according to the position of the second electronic device on the preview image; focusing the camera based on the position of the face frame and the distance of a target face from the plane where the camera is located, wherein the position of the face frame is the position of the geometric center of the face frame on the preview image, the target face is the face within the face frame in the preview image, and the distance of the target face from the plane where the camera is located is the distance between the second electronic device and the plane where the camera is located.

[0037] In combination with the second aspect, in some embodiments, the processing further includes executing: displaying the face frame at the face position of the preview image.

[0038] In combination with the second aspect, in some embodiments, the processor determines a face frame on the preview image according to the position of the second electronic device on the preview image, including: determining the size of the face frame according to the distance of the target face from the plane where the camera is located and the size of the face model, the size of the face frame being inversely proportional to the distance of the target face from the plane where the camera is located; determining the position of the face frame on the preview image according to the position of the second electronic device on the preview image and the size of the face frame.

[0039] In combination with the second aspect, in some embodiments, after determining the face frame on the preview image, the processor also includes executing: inputting the image in the face frame into a face recognizer, and when the face recognizer recognizes facial features, outputting the recognition result as a face; adjusting the size of the face frame to the size of the face, and the position of the face frame to the position of the face.

[0040] In conjunction with the second aspect, in some embodiments, the second electronic device is a pair of Bluetooth headsets, the pair of Bluetooth headsets includes a left headset and a right headset, and the position information of the second electronic device relative to the first electronic device includes the distances from the left headset and the right headset to the camera plane, respectively, and the orientation information of the left headset and the right headset relative to the first electronic device, respectively;

[0041] The processor executes focusing of the camera based on the position information, including: determining that the distance of a target face from the plane where the camera is located is an average of the distances from the left earphone and the right earphone to the camera plane respectively, and the target face is the face of a person wearing the left earphone and the right earphone; determining the position of the left earphone on the preview image according to the orientation information of the left earphone relative to the first electronic device; determining the position of the right earphone on the preview image according to the orientation information of the right earphone relative to the first electronic device; determining a face frame with the position of the left earphone on the preview image and the position of the right earphone on the preview image as boundaries; and focusing the camera based on the position of the face frame and the distance of the target face from the plane where the camera is located.

[0042] In combination with the second aspect, in some embodiments, the processor executes focusing of the camera based on the position of the face frame and the distance of the target face from the plane where the camera is located, including: determining the distance between the camera and the target face according to the position of the face frame and the distance of the target face from the plane where the camera is located; and focusing the camera according to the distance between the camera and the target face.

[0043] In combination with the second aspect, in some embodiments, the processor executes determining the location information of the second electronic device relative to the first electronic device based on the Bluetooth signals received by the at least two antennas, including executing: determining the angle of arrival of the Bluetooth signal at each antenna based on the wavelength of the Bluetooth signal, the phase difference of the Bluetooth signals received by each two antennas of the at least two antennas, and the position of each antenna on the first electronic device; determining the location information of the second electronic device relative to the first electronic device based on the angle of arrival of the Bluetooth signal at each antenna and the position of each antenna on the first electronic device.

[0044] In a third aspect, an embodiment of the present application provides a computer storage medium, comprising computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the camera focusing method described in the first aspect and any possible implementation of the first aspect.

[0045] In a fourth aspect, an embodiment of the present application provides a computer program product comprising instructions, which, when executed on an electronic device, enables the electronic device to execute the method described in the first aspect and any possible implementation of the first aspect.

[0046] It can be understood that the electronic device provided in the second aspect, the computer-readable storage medium provided in the third aspect, and the computer program product provided in the fourth aspect are all used to execute the method provided in the first aspect. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 is a schematic diagram of a camera focusing system provided in an embodiment of the present application;

[0048] Figure 2 is a schematic diagram of an arrival angle of a Bluetooth signal provided in an embodiment of the present application;

[0049] Figure 3 is a schematic diagram of a user interface for Bluetooth settings provided in an embodiment of the present application;

[0050] Figure 4 is a schematic diagram of a user interface of a camera program of an electronic device provided in an embodiment of the present application;

[0051] Figure 5A is a flowchart of a camera focusing method provided in an embodiment of the present application;

[0052] Figure 5B-5D is a flowchart of several camera focusing methods provided in embodiments of the present application;

[0053] Figure 6 It is a schematic diagram of the principle of a Bluetooth positioning method provided in an embodiment of the present application;

[0054] Figure 7 is a schematic diagram of determining the position of a face frame on a preview image provided by an embodiment of the present application;

[0055] Figure 8 is a schematic diagram of the principle of camera imaging provided by an embodiment of the present application;

[0056] Fig. 9 This is a schematic diagram of an interface for determining a face frame provided by an embodiment of the present application;

[0057] Fig.10 This is a schematic diagram of a distance determination principle for focusing provided in an embodiment of the present application;

[0058] Fig.11 It is a schematic diagram of a process of determining a face frame on a preview image based on two earphones provided in an embodiment of the present application;

[0059] Fig.12 It is a schematic diagram of the architecture of an electronic device provided in an embodiment of the present application;

[0060] Fig.13 It is a structural schematic diagram of another camera focusing system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0061] The terms used in the following embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to be used as limitations to the present application. As used in the specification and appended claims of the present application, the singular expressions "one", "a kind of", "said", "above", "the" and "this" are intended to also include plural expressions, unless there is a clear indication to the contrary in the context. It should also be understood that the term "and / or" used in the present application refers to and includes any or all possible combinations of one or more listed items.

[0062] The following describes the application scenarios involved in the embodiments of the present application. In photo or video recording scenarios, it is often necessary to focus to make the captured image clearer. For example, when a user turns on the camera of a smartphone and takes a photo of himself, he hopes that the focus of the camera is located on his face to capture a clearer face. At this time, the user can wear a Bluetooth device with Bluetooth function, such as a Bluetooth headset, and input an operation to the "Bluetooth Positioning" control in the camera program. The smartphone responds to the operation and calculates the position of the Bluetooth headset in real time. Further, the smartphone can focus the camera according to the position of the Bluetooth headset. Among them, since the user wears a Bluetooth headset and the Bluetooth headset is on the user's ear, the smartphone can quickly calculate the position of the face based on the position of the Bluetooth headset, and focus on the position of the face as the focus point.

[0063] Figure 1 FIG. 1 is a schematic diagram of a camera focusing system. For example, taking a photo of a person as an example, Figure 1 As shown, user 101 wears second electronic device 12, first electronic device 11 and second electronic device 12 are connected via Bluetooth, and second electronic device 12 continuously sends Bluetooth signals to first electronic device 11. User opens camera program of first electronic device 11, and when user uses camera to take a picture of himself, first electronic device may display as shown in FIG. Figure 1 The interface shown in the middle interface 10. The interface 10 includes: a preview image 106, a Bluetooth on indication 108, function selection controls such as a large aperture 102A, a video 102B, a photo 102C, a Bluetooth positioning 102D, more 102E, an album 105, a shooting control 103 and a camera switch 104, and navigation keys such as a return key 1071, a home screen key 1072, and an outgoing task history key 1073. Among them, the preview image 106 is an image captured by the first electronic device 11 in real time through the camera. It should be understood that the interface 10 may also include controls for other operations, which are not limited in the embodiments of the present application. Any control can be used to respond to a user's operation, such as a touch operation, so that the first electronic device 11 starts the function corresponding to the control.

[0064] When the user inputs an operation to the control "Bluetooth Positioning 102D", the first electronic device 11 responds to the operation on the control and calculates the Bluetooth signal from the second electronic device 12 in real time to determine the location information of the second electronic device 12. Since the user 101 wears the second electronic device 12, the position of the user's face can be inferred from the position of the second electronic device 12. The distance between the face of the user wearing the second electronic device 12 and the plane where the camera of the first electronic device 11 is located can be the distance between the second electronic device 12 and the plane where the camera of the first electronic device 11 is located. Then, based on the location information of the second electronic device 12 and the size of the face model, the position and size of the face frame are determined on the preview image 106, and the face frame is displayed. Furthermore, the first electronic device 11 focuses the camera based on the position of the face frame and the distance between the face of the user wearing the second electronic device 12 and the plane where the camera of the first electronic device 11 is located. For specific camera focusing methods, please refer to the following Figure 5A Related description.

[0065] In the above process of focusing the camera on the person, the first electronic device 11 can determine the position of the second electronic device 12 by calculating the received Bluetooth signal sent by the second electronic device 12, and use the position information of the second electronic device 12 as a stable input source of the focus point, which can avoid the problem that a stable focus point cannot be determined in a shooting environment with many faces, an environment where a specific face is partially blocked or completely blocked, and a shooting environment with poor lighting conditions, thereby causing the camera to be unable to focus accurately. Among them, since the user wears the second electronic device 12 and continuously sends a Bluetooth signal to the first electronic device 11, the first electronic device 11 can focus the camera in real time through the position of the second electronic device 12. Regardless of the movement of the user or the movement of the first electronic device 11, the first electronic device 11 can always calculate the position of the second electronic device 12 in real time. Moreover, the first electronic device 11 can quickly determine the position of the second electronic device based on the received Bluetooth signal, avoiding the problem that the camera cannot quickly determine the focus point, and improving the speed of the first electronic device focusing the camera.

[0066] The first electronic device 11 and the second electronic device 12 may be terminal devices with Bluetooth function. The first electronic device 11 is a Bluetooth device including at least two antennas. The first electronic device 11 may be a terminal device such as a smartphone with a camera, a tablet computer, a laptop computer, a smart home, etc. The second electronic device is a Bluetooth device including a single antenna. The second electronic device 12 may be a terminal device such as a Bluetooth headset, a Bluetooth speaker, a Bluetooth bracelet, a Bluetooth lamp, etc.

[0067] It should be understood that the camera focusing method provided in the embodiment of the present application can also be used to photograph other objects. In this case, it is necessary to place the second electronic device on the object to be photographed, and the position of the object to be photographed is inferred based on the position of the second electronic device. The camera focusing method provided in the embodiment of the present application can be used to clearly photograph the object.

[0068] For ease of understanding, before introducing the camera focusing method provided in the embodiment of the present application, the following introduces the relevant terms and principles involved in the embodiment of the present application.

[0069] 1. Angle of arrival (AoA) technology

[0070] The transmitter sends a constant tone extension (CTE) signal through a single antenna device. The receiver is a multi-antenna array. When receiving CTE, different receiving antennas are switched in a certain order, and the size of the Bluetooth signal arrival angle is obtained in this way.

[0071] 2. The principle of AoA orientation

[0072] like Figure 2 As shown in the figure, take the two antennas at the receiving end as an example, antenna 1 and antenna 2 receive Bluetooth signals, θ is the arrival angle of the Bluetooth signal to the antenna, λ is the wavelength of the Bluetooth signal, and d is the distance between antenna 1 and antenna 2. As can be seen from the figure, the transmission distance of the signal received by antenna 1 is d*cosθ less than the transmission distance of the signal received by antenna 2. This transmission distance difference can also be explained by the phase difference of the Bluetooth signal reaching antenna 1 and antenna 2. To calculate, so, Then θ=arccos Therefore, by sampling the phase information of the two antennas at the receiving end and calculating their phase difference The angle of arrival θ can be calculated.

[0073] The following introduces the user interface provided by the embodiments of the present application.

[0074] The user interface can be Figure 1 The user interface of the first electronic device 11 shown in FIG. Figure 3 , Figure 3 is a schematic diagram of a user interface for Bluetooth settings provided in an embodiment of the present application. For example, Figure 3(A) in the figure shows the Bluetooth setting interface 20. The Bluetooth setting interface 20 includes a Bluetooth on / off control 201, a setting entry 202 for a paired device (my headphones), and a setting entry for an available device (HUAWEI AM08). When the Bluetooth of the first electronic device is turned off, the first electronic device responds to an operation on the Bluetooth on / off control 201, turns on Bluetooth, and displays a Bluetooth on indication 203 as shown in the interface 20. The first electronic device responds to a user operation, such as a touch operation, on the setting entry 202 for "my headphones" and displays an indication 203 as shown in the interface 20. Figure 3 The setting interface 21 of the connected Bluetooth device shown in (B) in FIG. The interface 21 may include a positioning on / off control 211, a media audio on / off control 212, a call audio on / off control 213, and a Bluetooth on indication 214. The first electronic device may receive a Bluetooth signal sent by the second electronic device in response to a user operation on the positioning on / off control 211.

[0075] See also Figure 4 , Figure 4 A schematic diagram of a user interface of a camera provided in an embodiment of the present application, Figure 4 The interface 30 in the figure includes: a preview image 301, a Bluetooth on indication 306, function selection controls such as a large aperture 302A, a video recording 302B, a photo taking 302C, a Bluetooth positioning 302D, more 302E, an album 305, a shooting control 303, and a camera conversion 304. Among them, the preview image 301 is an image captured by the first electronic device in real time through the camera. It should be understood that the interface 30 may also include controls for other operations, which are not limited in the embodiments of the present application. Any control can be used to respond to a user operation, such as a touch operation, so that the first electronic device starts the function corresponding to the control. The first electronic device can respond to the user operation input for Bluetooth positioning 302D, and calculate the position information of the second electronic device relative to the first electronic device according to the received Bluetooth signal. Among them, the first electronic device can also respond to the operation input for the control to start the camera program, and calculate the position information of the second electronic device according to the received Bluetooth signal from the second electronic device.

[0076] Below through Figure 5A The camera focusing method provided in the embodiments of the present application is specifically introduced. Figure 5A A schematic diagram of a camera focusing method provided in an embodiment of the present application, the method can be performed by Figure 1 The system implementation shown is Figure 5A As shown, the method includes but is not limited to the following steps:

[0077] S01. The second electronic device sends a Bluetooth signal to the first electronic device.

[0078] The second electronic device sends a Bluetooth signal to the first electronic device via a single antenna at a dense and fixed frequency (eg, once every 6 ms or once every 10 ms).

[0079] S02. The first electronic device continuously receives a Bluetooth signal from the second electronic device.

[0080] The user opens the camera program of the first electronic device, and the first electronic device displays Figure 4 The interface 30 shown displays a preview image captured by the camera in real time. The user inputs an operation, such as a touch operation, on the Bluetooth positioning control in the interface 30, and the first electronic device executes S03.

[0081] S03, the first electronic device responds to the input operation of the "Bluetooth positioning" control, and calculates the position information of the second electronic device relative to the first electronic device according to the received Bluetooth signal. The position information includes the distance between the second electronic device and the plane where the camera of the first electronic device is located and the orientation information of the second electronic device relative to the first electronic device.

[0082] In one implementation, the first electronic device can determine the location information of the second electronic device based on the arrival angle θ of the Bluetooth signal from the second electronic device and the triangulation positioning method. Taking the first electronic device including two antennas as an example, the specific principle is as follows:

[0083] like Figure 6 As shown, taking the geometric center of the camera of the first electronic device as the origin of the coordinate system, the coordinates of antenna 1 (S1) are (X1, Y1, Z1), the coordinates of antenna 2 (S2) are (X2, Y2, Z2), the azimuth angle of the second electronic device based on antenna 1 is β1, and the elevation angle is ξ1, and the azimuth angle of the second electronic device based on antenna 2 is β2, and the elevation angle is ξ2. Assuming that the coordinates of the second electronic device T are (X, Y, Z), the coordinates of the projection T' of the second electronic device on the XY plane are (X, Y, 0). Among them, β1, ξ1, β2 and ξ2 can be determined by the arrival angle θ1 of the Bluetooth signal arriving at antenna 1 and the arrival angle θ2 of the Bluetooth signal arriving at antenna 2, Figure 6 The key angle can be expressed by the coordinates of antenna 1 and antenna 2 and the coordinates of the second electronic device as follows:

[0084]

[0085]

[0086]

[0087]

[0088] By Figure 6 It can be seen that

[0089] The distance between two base stations

[0090] In the triangle S1T'S2, the sine theorem gives: thereby

[0091] In triangle TT'S, get the distance between T and S1

[0092] Therefore, X=R′cosξ1cosβ1+X1; Y=R′cosξ1sinβ1+Y1; Z=R′sinξ1+Z1;

[0093] At this point, the coordinates (X, Y, Z) of the second electronic device can be obtained, where Z can represent the distance between the second electronic device and the plane where the camera of the first electronic device is located, and the orientation information of the second electronic device relative to the first electronic device can be represented by X, Y and Z.

[0094] In another implementation, with the geometric center of the camera of the first electronic device as the coordinate origin, the first electronic device can calculate the distance of the second electronic device from the plane where the camera of the first electronic device is located, and the angle (azimuth, pitch angle) of the second electronic device relative to the geometric center of the camera of the first electronic device based on the arrival angle of the Bluetooth signal reaching at least two antennas of the first electronic device.

[0095] It should be understood that the above two implementations are only examples, and the embodiments of the present application do not limit the method for calculating the distance between the second electronic device and the plane where the camera of the first electronic device is located and the orientation information of the second electronic device relative to the first electronic device.

[0096] S04: The first electronic device focuses a camera according to the position information of the second electronic device relative to the first electronic device.

[0097] The focusing of the camera may be to adjust the distance between the camera and the image sensor in the first electronic device so that the image formed on the image sensor is clearer. The distance between the camera and the image sensor may be determined based on the position information of the second electronic device relative to the first electronic device.

[0098] S04 can be implemented by but not limited to the following methods:

[0099] Implementation method (I): The first electronic device determines a face frame on the preview image based on the position information of the second electronic device relative to the first electronic device, and then can focus the camera based on the position of the face frame and the distance between the target face and the plane where the camera is located. The distance between the target face and the plane where the camera is located is the distance Z between the second electronic device and the plane where the camera is located, and the target face is the face of the user wearing the second electronic device.

[0100] For example, taking the second electronic device as a Bluetooth headset, one of the Bluetooth headsets may be equipped with a Bluetooth signal transmitting antenna, or both headsets may be equipped with a Bluetooth transmitting antenna. The following introduces a method for focusing the camera based on the position information of one headset and a method for focusing the camera based on the position information of two headsets, respectively.

[0101] In some embodiments, the location information of the second electronic device is location information of a headset. Exemplarily, the coordinates (X, Y, Z) of the second electronic device obtained in the first implementation in S03 are used as the location information of the second electronic device relative to the first electronic device to describe the process of focusing the camera. Figure 5B The camera focusing method shown in the figure, in which the process of the first electronic device focusing the camera based on the position information may include the following steps:

[0102] S041a: The first electronic device determines the position of the second electronic device on the preview image according to the position information of the second electronic device relative to the first electronic device.

[0103] like Figure 7 As shown, the first electronic device receives the second electronic device based on the position information of the second electronic device relative to the first electronic device and the camera imaging principle (such as Figure 8 As shown), determine the position (x, y) of the second electronic device on the preview image. Figure 8 As shown, the angle α may represent the orientation information of the second electronic device relative to the first electronic device. The angle α is the angle between the line connecting the second electronic device and the camera of the first electronic device and the Z axis. The preview image is an image received by the image sensor, and the first electronic device can calculate the position (x, y) of the second electronic device on the preview image according to the distance and angle α between the image sensor and the camera.

[0104] In some embodiments, the first electronic device can also determine the position of the second electronic device on the preview image based on a mapping relationship between the plane where the second electronic device is located (a plane parallel to the plane where the camera is located) and the image sensor of the first electronic device, and the position information (X, Y, Z) of the second electronic device relative to the first electronic device.

[0105] S041b: The first electronic device determines a face frame on the preview image according to the position of the second electronic device on the preview image and the distance between the target face and the plane where the camera is located.

[0106] In some embodiments, the process of the first electronic device determining the face frame on the preview image may be:

[0107] 1) The first electronic device determines the size of the face frame w*h according to the distance between the target face and the plane where the camera is located and the size of the face model, where w is the width of the face frame and h is the height of the face frame. The size of the face frame is inversely proportional to the distance between the target face and the plane where the camera is located. The size of the face model can be an empirical size determined based on the sizes of a large number of faces, or can be a size set by the user.

[0108] 2) The first electronic device determines the position of the face frame on the preview image according to the position of the second electronic device on the preview image and the size of the face frame.

[0109] In one implementation, the process of determining the position of the face frame may be: obtaining the position of the user wearing the second electronic device input by the user, such as the left ear or the right ear, and then determining the geometric center of the face frame according to the position of the second electronic device on the preview image. Figure 7 As shown, the position 701 of the second electronic device is (x, y). When the user wears the headset with a Bluetooth transmitting antenna on the right ear, the width of the face frame is w, and the horizontal coordinate x'=xw / 2 and the vertical coordinate y'=y of the position 702 of the face frame are determined, and the position of the face frame is determined to be the geometric center of the face frame. Similarly, when the user wears the headset with a Bluetooth transmitting antenna on the right ear, the width of the face frame is w, and the position of the face frame is determined to be (x+w / 2, y).

[0110] In some implementations, after the first electronic device determines the approximate face frame, it can also identify the face by face recognition, and further adjust the size and position of the face frame according to the identified face. The process can be: input the image in the face frame into the face recognizer, and when the face recognizer recognizes the facial features, it outputs the recognition result as a face, and determines the center position of the face and the size of the face according to the facial features. Further, the first electronic device adjusts the size of the face frame to the size of the face, and the position of the face frame to the position of the face. Among them, the face recognizer can extract the features of the input image, and then output the recognition result according to the matching degree between the extracted features and the facial features; the face recognizer can also output the recognition result according to the correlation value between the input image and the template of the facial features. Facial features can be features that do not change such as facial features (eyes, nose, mouth, etc.), skin color, contour, texture, etc. in different states.

[0111] In some embodiments, the process of the first electronic device determining the face frame on the preview image may be:

[0112] The face frame is set with the position of the second electronic device in the preview image as the center, and with twice the width (2w) of the face model and the height h of the face model. The image in the face frame is input into the face recognizer. When the face recognizer recognizes the face features, the recognition result is output as a face, and the center position and size of the face are determined according to the face features, and the size of the face frame is adjusted to the size of the recognized face, and the position of the face frame is adjusted to the center position of the recognized face.

[0113] In other embodiments, the process of the first electronic device determining the face frame on the preview image may also be: the first electronic device determines a range with the position of the second electronic device in the preview image as the center and twice the width of the face model (2w) as the radius, and inputs the image within the range in the preview image into the face recognizer. When the face recognizer recognizes the facial features, it outputs the recognition result as a face, and determines the center position and size of the face based on the facial features, and then determines the size of the face frame to be the size of the recognized face, and the position of the face frame to be the center position of the recognized face.

[0114] It should be understood that the implementation manner of determining the face frame according to the position of the first electronic device on the preview image is not limited to the above methods, and the embodiments of the present application do not limit this.

[0115] After the first electronic device determines the position of the face frame, Fig. 9 As shown, the face frame 901 can be displayed in the preview image.

[0116] S041c: The first electronic device focuses the camera based on the position of the face frame and the distance of the target face from the plane where the camera is located, the face frame position is the position of the geometric center of the face frame on the preview image, and the target face is the face within the face frame in the preview image, that is, the face of the user wearing the second electronic device.

[0117] Specifically, in one implementation, the first electronic device can determine the position of the face frame on the preview image relative to the camera direction, which can be determined by the angle between the position of the face frame and the line connecting the camera and the Z axis, and then determine the distance between the camera and the target face based on the angle and the distance between the target face and the plane where the camera is located. The first electronic device can focus the camera based on the distance between the camera and the target face. For example, the distance between the camera and the target face can be determined in the following manner, such as: Fig.10As shown, the position of the face frame on the preview image is (x', y'), the distance between the preview image and the camera (also referred to as the image sensor and the camera) is L, the position of the target face is (X', Y', Z), and the distance Z between the target face and the plane where the camera is located can be determined. The angle η between the position of the face frame and the line connecting the camera and the Z axis can be determined.

[0118]

[0119] Then, the distance Z* between the camera and the target face is determined by combining the distance Z between the target face and the plane where the camera is located. Fig.10 It can be seen that:

[0120]

[0121] In some other embodiments, the second electronic device includes a left earphone and a right earphone, and the left earphone and the right earphone each include a Bluetooth transmitting antenna, and the position information of the second electronic device relative to the first electronic device includes the distance from the left earphone and the right earphone to the plane where the camera is located, and the orientation information of the left earphone and the right earphone relative to the first electronic device. The first electronic device can focus the camera according to the position information of the left earphone and the right earphone.

[0122] See also Figure 5C , Figure 5C A camera focusing method provided in an embodiment of the present application, when the position information of the second electronic device is the position information of the left and right earphones, in the method, the process of the first electronic device focusing the camera based on the position information may include the following steps:

[0123] S042a: The first electronic device determines the distance between the target face and the plane where the camera is located according to the distances between the left earphone and the right earphone and the plane where the camera is located.

[0124] In some embodiments, the first electronic device determines that the distance between the target face and the plane where the camera is located is the average of the distances from the left earphone and the right earphone to the camera plane respectively, and the target face is the face of the person wearing the left earphone and the right earphone.

[0125] In other embodiments, the first electronic device may determine that the distance between the target face and the plane where the camera is located is one of the distance from the left earphone to the camera plane or the distance from the right earphone to the camera plane.

[0126] S042b: The first electronic device determines the position of the left earphone on the preview image according to the position information of the left earphone relative to the first electronic device. For this process, please refer to the relevant description in S041a when the first electronic device is an earphone.

[0127] S042c: The first electronic device determines the position of the right earphone on the preview image according to the position information of the right earphone relative to the first electronic device. For this process, please refer to the relevant description in S041a when the first electronic device is an earphone.

[0128] S042d: The first electronic device determines a face frame using the position of the left earphone on the preview image and the position of the right earphone on the preview image as a boundary.

[0129] For example, Fig.11 As shown in (A) in FIG. 1 , the positions of the left earphone 1101 and the right earphone 1102 obtained by the first electronic device on the preview image are respectively (x 左 ,y 左 ), (x 右 ,y 右 ), the position (x', y') of the face frame 1103 can be determined as the midpoint of the left earphone 1101 and the right earphone 1102 on the preview image, and further, the width w of the face frame 1103 is determined as x 右 -x 左 , the height h is the height h of the face model. After determining the position of the face frame on the preview image, Fig.11 As shown in (B) in FIG. 1 , the face frame 1104 is displayed on the preview image.

[0130] S042e: The first electronic device focuses the camera based on the position of the face frame and the distance between the target face and the plane where the camera is located. This process can refer to the relevant description in S041c when the first electronic device is a headset, and will not be repeated here.

[0131] In some embodiments, the first electronic device may not determine the face frame and focus the camera through implementation method (ii).

[0132] Implementation method (two): the first electronic device focuses the camera according to the position information of the second electronic device relative to the first electronic device.

[0133] For example, taking the second electronic device as a Bluetooth headset, one of the Bluetooth headsets may be equipped with a Bluetooth signal transmitting antenna, or both headsets may be equipped with a Bluetooth transmitting antenna. The following introduces a method for focusing the camera based on the position information of one headset and a method for focusing the camera based on the position information of two headsets, respectively.

[0134] In some embodiments, when the location information of the second electronic device is the location information of a headset, focusing the camera can be implemented by the following two implementations:

[0135] Implementation A: The position information of the second electronic device relative to the first electronic device includes the distance Z between the second electronic device and the plane where the camera of the first electronic device is located. The first electronic device adjusts the distance between the image sensor and the camera based on the distance Z to complete the focus of the camera.

[0136] Implementation method B: The position information of the second electronic device relative to the first electronic device includes the distance between the second electronic device and the plane where the camera of the first electronic device is located, and the orientation information of the second electronic device relative to the first electronic device. The first electronic device corrects the distance between the second electronic device and the plane where the camera is located according to the orientation information of the second electronic device relative to the first electronic device to obtain a corrected distance, and then the first electronic device adjusts the distance between the image sensor and the camera based on the corrected distance to complete the focus of the camera. The corrected distance can be the distance between the second electronic device and the first electronic device.

[0137] It should be understood that the orientation information of the second electronic device relative to the first electronic device can be the angle of the second electronic device relative to the first electronic device. Therefore, the corrected distance, that is, the distance between the second electronic device and the first electronic device can be determined by the angle and the distance between the second electronic device and the plane where the camera is located.

[0138] In some specific implementations, the distance Z* between the second electronic device and the first electronic device may be determined based on the coordinate information of the second electronic device. For example, the geometric center of the camera of the first electronic device is used as the origin of the coordinate system, the position information of the second electronic device relative to the first electronic device is the coordinates (X, Y, Z), and the distance between the second electronic device and the plane where the camera of the first electronic device is located is Z. Then, the first electronic device may determine Z* based on the coordinates as:

[0139]

[0140] In some other embodiments, the second electronic device includes a left earphone and a right earphone, and the left earphone and the right earphone each include a Bluetooth transmitting antenna, and the position information of the second electronic device relative to the first electronic device includes the distance from the left earphone and the right earphone to the camera plane, and the orientation information of the left earphone and the right earphone relative to the first electronic device. The first electronic device can focus the camera according to the position information of the left earphone and the right earphone.

[0141] The position information (X) of the left earphone of the second electronic device relative to the first electronic device 左 ,Y 左 , Z 左 ) and the position information (X) of the right earphone relative to the first electronic device 右 ,Y 右 , Z 右) as an example, the first electronic device focusing the camera can be implemented by implementation mode C and implementation mode D:

[0142] Implementation C: The first electronic device determines that the distance of the second electronic device relative to the plane where the camera of the first electronic device is located is the average of the distances from the left earphone and the right earphone to the camera plane, and then adjusts the distance between the image sensor and the camera based on the average to complete the focus of the camera. For example, the distance from the left earphone to the plane where the camera is located is Z 左 , the distance from the left earphone to the plane where the camera is located is Z 右 , then the first electronic device is based on (Z 左 +Z 右 ) / 2 to focus the camera.

[0143] Implementation Method D: Please refer to Figure 5D , Figure 5D A camera focusing method is provided, in which a process in which a first electronic device focuses a camera based on position information may include the following steps S043a-S043d:

[0144] S043a: The first electronic device may determine that the position of the second electronic device is a midpoint between the left earphone and the right earphone, wherein the position information of the second electronic device includes the positions of the left earphone and the right earphone.

[0145] S043b: The first electronic device determines the orientation information of the midpoint relative to the first electronic device and the distance from the midpoint to the plane where the camera of the first electronic device is located.

[0146] S043c: The first electronic device determines the distance between the midpoint position and the first electronic device based on the orientation information of the midpoint position relative to the first electronic device and the distance between the midpoint position and the plane where the camera of the first electronic device is located. In some specific implementations, the process of determining the distance between the midpoint position and the first electronic device can also refer to the relevant description of determining Z* in the above implementation B, which will not be repeated here.

[0147] S043d: The first electronic device adjusts the distance between the image sensor and the camera based on the distance between the midpoint position and the first electronic device to complete the focus of the camera.

[0148] After the first electronic device completes focusing the camera, S05 may be executed.

[0149] S05: The first electronic device takes a photo based on the focusing result, and determines that the preview image displayed by the first electronic device after focusing is a photographed image.

[0150] To implement the camera focusing method provided in the embodiment of the present application, the user wears a second electronic device (such as a Bluetooth headset), and the second electronic device sends a Bluetooth signal to the first electronic device. When the user opens the camera program to take a photo of himself, the first electronic device can determine the position information of the second electronic device relative to the first electronic device based on the received Bluetooth signal, and then focus the camera based on the position information. In this way, no matter the face is partially or completely blocked, the light conditions are poor, or the face cannot be recognized by the face recognizer, the first electronic device can always determine a stable focus position, and then focus the camera based on the position. Moreover, during the shooting process, the first electronic device calculates the position of the second electronic device in real time. Therefore, when the first electronic device or the second electronic device moves, the first electronic device can still quickly determine the position of the second electronic device, and then focus according to the position.

[0151] An exemplary electronic device 100 provided in an embodiment of the present application is introduced below.

[0152] Fig.12 A schematic diagram of the structure of an electronic device 100 is shown. The electronic device may be Figure 1 The first electronic device is shown in .

[0153] 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, a battery 142, an antenna A, an antenna B, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope 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, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0154] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0155] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0156] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

[0157] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0158] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0159] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple groups of I2C buses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces. For example: the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 communicates with the touch sensor 180K through the I2C bus interface, thereby realizing the touch function of the electronic device 100.

[0160] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to achieve communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 via the I2S interface to achieve the function of answering a call through a Bluetooth headset.

[0161] The PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface to realize the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.

[0162] The UART interface is a universal serial data bus for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is generally used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 through the UART interface to implement the function of playing music through a Bluetooth headset.

[0163] The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the shooting function of the electronic device 100. The processor 110 and the display screen 194 communicate via the DSI interface to implement the display function of the electronic device 100.

[0164] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.

[0165] The USB interface 130 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transfer data between the electronic device 100 and a peripheral device. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices, etc.

[0166] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0167] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. While the charging management module 140 is charging the battery 142, it may also power the electronic device through the power management module 141.

[0168] 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, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.

[0169] The wireless communication function of the electronic device 100 can be implemented through the antenna A, the antenna B, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

[0170] Antenna A and antenna B are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antennas. For example, antenna A can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0171] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves through the antenna A, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna A. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0172] The 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 a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.

[0173] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna B, 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, modulate the frequency, amplify it, and convert it into electromagnetic waves for radiation through antenna B.

[0174] In some embodiments, the antenna A of the electronic device 100 is coupled to the mobile communication module 150, and the antenna B 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 (CDMA), 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 a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS). In an embodiment of the present application, antenna B may be an antenna array including at least two antennas, which may receive a Bluetooth signal sent by a Bluetooth headset or other Bluetooth devices.

[0175] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.

[0176] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.

[0177] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.

[0178] ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.

[0179] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP for conversion into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1. In the embodiment of the present application, the camera head may also be referred to as a camera, and the plane where the camera is located is the plane where the camera head is located.

[0180] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0181] Video codecs are used to compress or decompress digital videos. The electronic device 100 may support one or more video codecs. Thus, the electronic device 100 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

[0182] 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 also continuously self-learn. Through NPU, applications such as intelligent cognition of the electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc. In some embodiments of the present application, in a shooting scene, the electronic device responds to the user operation for "Bluetooth positioning" and determines the location information of the Bluetooth headset or other Bluetooth device in real time. When the electronic device determines the approximate position and size of the face frame on the preview image according to the location information of the Bluetooth headset or other Bluetooth device, the face in the preview image can be identified by the neural network (NN) computing processor, and the size and position of the face frame can be further determined. In other embodiments, after the electronic device determines the position of the Bluetooth headset or other Bluetooth device in the preview image, a range is determined on the preview image according to the position, and the face in the image within the range can also be identified by the neural network computing processor, and the face frame can be further determined on the preview image.

[0183] 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 a data storage function, such as storing music, video and other files in the external memory card.

[0184] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0185] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0186] 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. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.

[0187] The speaker 170A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or listen to a hands-free call through the speaker 170A.

[0188] The receiver 170B, also called a "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or voice message, the voice can be received by placing the receiver 170B close to the human ear.

[0189] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to microphone 170C to input the sound signal into microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify the sound source, realize directional recording function, etc.

[0190] The earphone interface 170D is used to connect a wired earphone and can be a USB interface 130 or a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.

[0191] The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be set on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 100 detects the touch operation intensity according to the pressure sensor 180A. The electronic device 100 can also calculate the touch position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.

[0192] The gyro sensor 180B can be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., x, y, and z axes) can be determined by the gyro sensor 180B. The gyro sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyro sensor 180B detects the angle of the electronic device 100 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the electronic device 100 through reverse movement to achieve anti-shake. The gyro sensor 180B can also be used for navigation and somatosensory game scenes.

[0193] The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.

[0194] The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip leather case. In some embodiments, when the electronic device 100 is a flip phone, the electronic device 100 can detect the opening and closing of the flip cover according to the magnetic sensor 180D. Then, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, the flip cover can be automatically unlocked.

[0195] The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in all directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device and is applied to applications such as horizontal and vertical screen switching and pedometers.

[0196] The distance sensor 180F is used to measure the distance. The electronic device 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.

[0197] The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light outward through the light emitting diode. The electronic device 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that there is no object near the electronic device 100. The electronic device 100 can use the proximity light sensor 180G to detect that the user holds the electronic device 100 close to the ear to talk, so as to automatically turn off the screen to save power. The proximity light sensor 180G can also be used in leather case mode and pocket mode to automatically unlock and lock the screen.

[0198] The ambient light sensor 180L is used to sense the ambient light brightness. The electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touches.

[0199] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.

[0200] The temperature sensor 180J is used to detect temperature. In some embodiments, the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device 100 reduces the performance of a processor located near the temperature sensor 180J to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to avoid abnormal shutdown of the electronic device 100 due to low temperature. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 performs a boost on the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.

[0201] The touch sensor 180K is also called a "touch panel". The touch sensor 180K can be set on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194.

[0202] The bone conduction sensor 180M can obtain a vibration signal. In some embodiments, the bone conduction sensor 180M can obtain a vibration signal of a vibrating bone block of the vocal part of the human body. The bone conduction sensor 180M can also contact the human pulse to receive a blood pressure beat signal. In some embodiments, the bone conduction sensor 180M can also be set in an earphone and combined into a bone conduction earphone. The audio module 170 can parse out a voice signal based on the vibration signal of the vibrating bone block of the vocal part obtained by the bone conduction sensor 180M to realize a voice function. The application processor can parse the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 180M to realize a heart rate detection function.

[0203] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The electronic device 100 may receive key input and generate key signal input related to user settings and function control of the electronic device 100.

[0204] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.

[0205] The indicator 192 may be an indicator light, which may be used to indicate the charging status, power changes, messages, missed calls, notifications, etc.

[0206] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to and 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. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the electronic device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.

[0207] Please participate Fig.13 , please participate Fig.13 , Fig.13 1 is a schematic diagram of the structure of another camera focusing system provided in an embodiment of the present application. The camera focusing system includes a first electronic device 1300 and a second electronic device 1400.

[0208] like Fig.13 As shown, the first electronic device 1300 includes a Bluetooth positioning system 1301 , a focusing system 1302 and an imaging system 1303 .

[0209] The Bluetooth positioning system 1301 is used to receive Bluetooth signals and determine the location of the second electronic device 1400 using the received Bluetooth signals. The Bluetooth positioning system 1301 includes a Bluetooth signal receiver 1301A and a Bluetooth signal processing module 1301B. The Bluetooth signal receiver 1301A may be a multi-antenna array for receiving Bluetooth signals. The Bluetooth signal processing module 1301B is used to determine the location of the second electronic device 1400 using the received Bluetooth signals. The process of determining the location of the second electronic device 1400 may be specifically described in the above Figure 5A The relevant descriptions in S01-S03 will not be repeated here.

[0210] The focusing system 1302 may include a face recognition module 1302A and a focus module 1302B, which are used to focus the camera according to the position of the second electronic device 1400 determined by the Bluetooth positioning system 1301. The face recognition module 1302A can quickly determine a face frame on the preview image according to the position of the second electronic device 1400, and the focus module 1302B is used to focus according to the position of the face frame and the distance between the second electronic device 1400 and the plane where the camera is located. The focusing process can be referred to in the above Figure 5B S041a-S041c, Figure 5C S042a-S042e or Figure 5D The relevant descriptions of S043a-S043d will not be repeated here.

[0211] The imaging system 1303 is used to shoot according to the focusing result, and determines that the preview image displayed by the first electronic device after focusing is the shot image.

[0212] like Fig.13 As shown, the second electronic device 1400 may include a Bluetooth positioning system 1401 corresponding to the first electronic device 1300, and the Bluetooth module 1401 includes a Bluetooth signal transmitter 1401A. The Bluetooth signal transmitter 1401A may be a single antenna for sending Bluetooth signals.

[0213] As used in the above embodiments, the term "when..." may be interpreted to mean "if..." or "after..." or "in response to determining..." or "in response to detecting...", depending on the context. Similarly, the phrases "upon determining..." or "if (the stated condition or event) is detected" may be interpreted to mean "if determining..." or "in response to determining..." or "upon detecting (the stated condition or event)" or "in response to detecting (the stated condition or event)", depending on the context.

[0214] It is to be understood that those of ordinary skill in the art can appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the various embodiments of the present application can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0215] Those skilled in the art will appreciate that the functions described in the various illustrative logic blocks, modules, and algorithm steps disclosed in the various embodiments of the present application can be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions described in the various illustrative logic blocks, modules, and steps can be stored or transmitted as one or more instructions or codes on a computer-readable medium and executed by a hardware-based processing unit. Computer-readable media may include computer-readable storage media, which corresponds to tangible media, such as data storage media, or includes any communication media that facilitates the transfer of computer programs from one place to another (e.g., according to a communication protocol). In this way, computer-readable media can generally correspond to (1) non-temporary tangible computer-readable storage media, or (2) communication media, such as signals or carrier waves. Data storage media can be any available media that can be accessed by one or more computers or one or more processors to retrieve instructions, codes, and / or data structures for implementing the technology described in the present application. A computer program product may include computer-readable media.

[0216] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0217] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0218] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0219] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0220] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0221] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A camera focusing method, characterized in that: Applied to a first electronic device, the first electronic device includes a camera and at least two antennas, the method includes: receiving a Bluetooth signal sent by a second electronic device through the at least two antennas; When the camera is turned on, in response to a user operation input to a Bluetooth positioning control, determine the location information of the second electronic device relative to the first electronic device according to the Bluetooth signals received by the at least two antennas; the location information includes the distance of the second electronic device from the plane where the camera is located and the orientation information of the second electronic device relative to the first electronic device; Display preview image in real time; focusing the camera based on the position information; The focusing of the camera based on the position information includes: determining a face frame on the preview image according to the orientation information of the second electronic device relative to the first electronic device; focusing the camera based on the position of the face frame and the distance of a target face from the plane where the camera is located, the target face is the face within the face frame in the preview image, and the distance of the target face from the plane where the camera is located is the distance between the second electronic device and the plane where the camera is located.

2. The method according to claim 1, characterized in that The location information includes the distance between the second electronic device and the plane where the camera is located and the orientation information of the second electronic device relative to the first electronic device; The focusing the camera based on the position information further includes: Correcting the distance according to the position information of the second electronic device relative to the first electronic device; The focusing of the camera based on the position of the face frame and the distance of the target face from the plane where the camera is located includes: focusing the camera according to the position of the face frame and the corrected distance.

3. The method according to claim 2, characterized in that The correcting the distance according to the position information of the second electronic device relative to the first electronic device includes: According to the distance and the orientation information of the second electronic device relative to the first electronic device, the distance between the second electronic device and the first electronic device is determined to be the corrected distance.

4. The method according to claim 1, characterized in that The real-time display of the preview image comprises: when the camera is turned on, displaying the preview image in real time; The determining a face frame on the preview image according to the position information of the second electronic device relative to the first electronic device includes: determining a position of the second electronic device on the preview image according to the position information of the second electronic device relative to the first electronic device; The face frame is determined on the preview image according to the position of the second electronic device on the preview image; the position of the face frame is the position of the geometric center of the face frame on the preview image.

5. The method according to claim 4, characterized in that The method further includes: displaying the face frame at the position of the face in the preview image.

6. The method according to claim 1, characterized in that The step of determining the face frame on the preview image according to the position of the second electronic device on the preview image includes: Determine the size of the face frame according to the distance between the target face and the plane where the camera is located and the size of the face model, wherein the size of the face frame is inversely proportional to the distance between the target face and the plane where the camera is located; The position of the face frame is determined on the preview image according to the position of the second electronic device on the preview image and the size of the face frame.

7. The method according to claim 6, characterized in that After determining the face frame on the preview image, the method further includes: Inputting the image in the face frame into a face recognizer, and when the face recognizer recognizes facial features, outputting a recognition result as a face; The size of the face frame is adjusted to the size of the face, and the position of the face frame is adjusted to the position of the face.

8. The method according to claim 1, characterized in that The second electronic device is a pair of Bluetooth earphones, the pair of Bluetooth earphones includes a left earphone and a right earphone, and the position information of the second electronic device relative to the first electronic device includes the distances from the left earphone and the right earphone to the camera plane, and the orientation information of the left earphone and the right earphone relative to the first electronic device; Determining a face frame on the preview image according to the orientation information of the second electronic device relative to the first electronic device includes: determining that the distance of a target face from the plane where the camera is located is an average of the distances from the left earphone and the right earphone to the camera plane, respectively, and the target face is a face of a person wearing the left earphone and the right earphone; determining a position of the left earphone on the preview image according to the orientation information of the left earphone relative to the first electronic device; determining a position of the right earphone on the preview image according to the orientation information of the right earphone relative to the first electronic device; and determining a face frame with the position of the left earphone on the preview image and the position of the right earphone on the preview image as a boundary; The focusing of the camera based on the position of the face frame and the distance of the target face from the plane where the camera is located includes: focusing the camera based on the position of the face frame and the distance of the target face from the plane where the camera is located.

9. The method according to claim 8, characterized in that The focusing of the camera based on the position of the face frame and the distance between the target face and the plane where the camera is located includes: Determining the distance between the camera and the target face according to the position of the face frame and the distance between the target face and the plane where the camera is located; The camera is focused according to the distance between the camera and the target face.

10. The method according to claim 1, characterized in that The determining, according to the Bluetooth signals received by the at least two antennas, the location information of the second electronic device relative to the first electronic device comprises: determining an arrival angle of the Bluetooth signal at each antenna according to a wavelength of the Bluetooth signal, a phase difference between Bluetooth signals received by each of the at least two antennas, and a position of each antenna on the first electronic device; The position information of the second electronic device relative to the first electronic device is determined according to the arrival angle of the Bluetooth signal to each antenna and the position of each antenna on the first electronic device.

11. An electronic device, characterized in that: The electronic device is a first electronic device, and the first electronic device includes: one or more processors, one or more memories, a camera and at least two antennas, and the camera and the one or more memories are respectively coupled to the one or more processors; The camera is used to acquire images; The at least two antennas are used to receive Bluetooth signals; The one or more memories are used to store computer program code, the computer program code comprising computer instructions; The processor is used to call the computer instruction to perform the following operations: In response to a user operation input to a Bluetooth positioning control, determining location information of a second electronic device relative to the first electronic device according to the Bluetooth signals received by the at least two antennas; the location information includes a distance of the second electronic device from the plane where the camera is located and orientation information of the second electronic device relative to the first electronic device; Display preview image in real time; focusing the camera based on the position information; The focusing of the camera based on the position information includes: determining a face frame on the preview image according to the orientation information of the second electronic device relative to the first electronic device; focusing the camera based on the position of the face frame and the distance of a target face from the plane where the camera is located, the target face is the face within the face frame in the preview image, and the distance of the target face from the plane where the camera is located is the distance between the second electronic device and the plane where the camera is located.

12. The electronic device according to claim 11, characterized in that: The position information includes the distance between the second electronic device and the plane where the camera is located and the orientation information of the second electronic device relative to the first electronic device; the processor executes the focusing of the camera based on the position information, and also includes executing: Correcting the distance according to the position information of the second electronic device relative to the first electronic device; The processor executes focusing the camera based on the position of the face frame and the distance of the target face from the plane where the camera is located, including executing: focusing the camera through the position of the face frame and the corrected distance.

13. The electronic device according to claim 12, characterized in that: The processor corrects the distance according to the position information of the second electronic device relative to the first electronic device, including: According to the distance and the orientation information of the second electronic device relative to the first electronic device, the distance between the second electronic device and the first electronic device is determined to be the corrected distance.

14. The electronic device according to claim 11, characterized in that: The processor executes real-time display of the preview image, including executing: when the camera is turned on, displaying the preview image in real time; The processor determines a face frame on the preview image according to the position information of the second electronic device relative to the first electronic device, including: determining a position of the second electronic device on the preview image according to the position information of the second electronic device relative to the first electronic device; determining the face frame on the preview image according to the position of the second electronic device on the preview image; The position of the face frame is the position of the geometric center of the face frame on the preview image.

15. The electronic device according to claim 14, characterized in that: The processor further includes executing: displaying the face frame at the face position of the preview image.

16. The electronic device according to claim 11, characterized in that: The processor determines the face frame on the preview image according to the position of the second electronic device on the preview image, including: Determine the size of the face frame according to the distance between the target face and the plane where the camera is located and the size of the face model, wherein the size of the face frame is inversely proportional to the distance between the target face and the plane where the camera is located; The position of the face frame is determined on the preview image according to the position of the second electronic device on the preview image and the size of the face frame.

17. The electronic device according to claim 16, characterized in that: After determining the face frame on the preview image, the processor further comprises executing: Inputting the image in the face frame into a face recognizer, and when the face recognizer recognizes facial features, outputting a recognition result as a face; The size of the face frame is adjusted to the size of the face, and the position of the face frame is adjusted to the position of the face.

18. The electronic device according to claim 11, characterized in that: The second electronic device is a pair of Bluetooth earphones, the pair of Bluetooth earphones includes a left earphone and a right earphone, and the position information of the second electronic device relative to the first electronic device includes the distances from the left earphone and the right earphone to the camera plane, and the orientation information of the left earphone and the right earphone relative to the first electronic device; The processor determines a face frame on the preview image according to the position information of the second electronic device relative to the first electronic device, including: Determine that the distance between the target face and the plane where the camera is located is the average value of the distances from the left earphone and the right earphone to the camera plane, respectively, and the target face is the face of a person wearing the left earphone and the right earphone; determining a position of the left earphone on the preview image according to the position information of the left earphone relative to the first electronic device; determining a position of the right earphone on the preview image according to the position information of the right earphone relative to the first electronic device; Determine a face frame by taking the position of the left earphone on the preview image and the position of the right earphone on the preview image as boundaries; The processor executes the focusing of the camera based on the position of the face frame and the distance of the target face from the plane where the camera is located, including executing: focusing the camera based on the position of the face frame and the distance of the target face from the plane where the camera is located.

19. The electronic device according to claim 18, characterized in that: The processor performs focusing of the camera based on the position of the face frame and the distance between the target face and the plane where the camera is located, including: Determining the distance between the camera and the target face according to the position of the face frame and the distance between the target face and the plane where the camera is located; The camera is focused according to the distance between the camera and the target face.

20. The electronic device according to claim 11, characterized in that: The processor determines the location information of the second electronic device relative to the first electronic device according to the Bluetooth signals received by the at least two antennas, including: determining an arrival angle of the Bluetooth signal at each antenna according to a wavelength of the Bluetooth signal, a phase difference between Bluetooth signals received by each of the at least two antennas, and a position of each antenna on the first electronic device; The position information of the second electronic device relative to the first electronic device is determined according to the arrival angle of the Bluetooth signal to each antenna and the position of each antenna on the first electronic device.

21. A computer storage medium, characterized in that The method comprises computer instructions, and when the computer instructions are executed on an electronic device, the electronic device executes the camera focusing method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • Terminal

    CN104811612A

  • Camera focusing determining method and electronic equipment

    CN104954677A

  • Focusing plane adjusting method and electronic device

    CN105611167A

  • Shooting parameter determination method and apparatus

    CN106303256A

  • Access control system control method and access control system

    CN110868536A