Patent Description:
With the rapid development of electronic technology and image processing technology, a photographing function of a terminal has become increasingly stronger. During a photographing process, in order to photograph a high-resolution image, there is a need to perform focusing according to a target object to be photographed, that is, a position of the lens is adjusted according to the target object so as to acquire a clear and focused image.

An infrared laser sensor may be provided near a rear camera of the terminal. When a user needs to photograph a clear image of the target object, the camera may be turned on and the terminal may be moved continuously until the image of the target object locates at the center of a camera preview collected by the camera of the terminal. By this time, the infrared laser sensor sends a low-power infrared laser along a center axis of the camera. The terminal may determine a distance between the target object and the camera by receiving a reflected infrared laser formed by the target object reflecting the infrared laser, and then adjust the position of the lens in the camera according to the distance, such that the camera focuses on the target object, thus photographing the clear image of the target object. Focusing technology is described in <CIT>.

The invention defined by claim provides a method for focusing, applied to a terminal.

The invention defined by claim provides an apparatus for focusing.

The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate aspects consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

Reference will now be made in detail to exemplary aspects, examples of which are illustrated in the accompanying drawings.

The technical solution in aspects of the present disclosure relates to a terminal. The terminal may be a phone, a table computer, a personal computer and other devices having a photographing function, which is not limited in aspects of the present disclosure. In the related art, a distance between a target object to be focused and a camera module of the terminal is detected by using an infrared laser sensor. In this case, the terminal needs to be moved such that an image of the target object to be focused can locate at a center of a camera preview image photographed by the lens, so as to be detected, thus causing an inflexible focusing photographing and a poor practicability. In addition, there is a short focusing distance when the infrared laser sensor detects the distance between the target object and the camera module of the terminal. When the target object is far away from the camera module of the terminal, a focusing photographing of the target object may not be performed, causing a poor experience for the user. In the technical solution in aspects of the present disclosure, the ranging radar provided in the terminal may determine the reference distance between the target object and the camera module quickly and accurately, such that the terminal may employ the reference distance to perform focus adjustment, thus improving accuracy and efficiency of the focus adjustment. At the same time, the ranging radar may measure a reference distance between the camera module and any object within a viewing angle range of the camera module. Therefore, the terminal may perform focusing on any object within the viewing angle range, thus improving flexibility and practicability of focusing.

Aspects of the present disclosure provide a terminal <NUM>. As illustrated in <FIG>, the terminal <NUM> includes a camera module <NUM> and a ranging radar <NUM>. An antenna radiation angle R of the ranging radar <NUM> covers a viewing angle Q of the camera module <NUM>.

The ranging radar <NUM> is configured to obtain a reference distance between a target object to be focused and the camera module.

The camera module <NUM> is configured to adjust a photographing focus of the camera module to a position where the target object locates according to the reference distance.

For example, when disposing the ranging radar <NUM>, it may be determined whether the antenna radiation angle R of the ranging radar <NUM> covers the viewing angle Q of the camera module <NUM> firstly according to a position and a shape of an antenna of the ranging radar <NUM>. When the antenna radiation angle R of the ranging radar <NUM> does not entirely cover the viewing angle Q of the camera module <NUM>, the position and the shape of the antenna of the ranging radar <NUM> may be adjusted unitil the antenna radiation angle R of the ranging radar <NUM> entirely convers the viewing angle Q of the camera module <NUM>.

Alternatively, in order to ensure that the antenna radiation angle R of the ranging radar <NUM> convers the viewing angle Q of the camera module <NUM>, the ranging radar <NUM> may be arranged nearby the camera module <NUM>, that is, a distance between the ranging radar <NUM> and the camera module <NUM> is lower than or equal to a preset distance threshold. The preset distance threshold may be determined according to the viewing angle Q of the camera module <NUM>, which is not limited in aspects of the present disclosure. In detail, when there is one camera module <NUM> provided in the terminal <NUM>, as illustrated in <FIG>, the ranging radar <NUM> may be arranged at the position A, the position B, the position C or the position D illustrated in <FIG>. When there are a plurality of camera modules <NUM> provided in the terminal <NUM>, the ranging radar <NUM> may be arranged at a symmetric center of the plurality of camera modules <NUM>. Taking two camera modules <NUM> provided in the terminal <NUM> as an example, as illustrated in <FIG>, the ranging radar <NUM> may be arranged between the two camera modules <NUM>, that is, at the position E illustrated in <FIG>.

Alternatively, the ranging radar <NUM> may be a millimeter wave radar, and the millimeter wave radar sends a radar signal in a frequency modulation continuous wave. The frequency of the radar signal may be greater than or equal to <NUM>, and lower than or equal to <NUM>. Employing the above milimeter wave radar to detect the reference distance between the target object and the camera module <NUM> may decrease a detection error to ± <NUM> when the reference distance is in a range of <NUM> to <NUM> meters, and the detection may be with sub-millimetre precision when the reference distance is in a range of <NUM> to <NUM> meters.

In the technical solution in aspects of the present disclosure, the ranging radar <NUM> provided in the terminal <NUM> may determine the reference distance between the target object and the camera module <NUM> fast and accurately, such that the terminal may use the reference distance to perform focus adjustment, thus improving accuracy and efficiency of the focus adjustment. At the same time, the ranging radar <NUM> may measure a reference distance between the camera module <NUM> and any object within a viewing angle range of the camera module. Therefore, the terminal <NUM> may perform focusing on any object within the viewing angle range, thus improving flexibility and practicability of focusing.

<FIG> illustrates a flow chart of a focusing method according to an exemplary aspect of the present disclosure. The method is applied to the terminal <NUM> according to any of the above aspects. As illustrated in <FIG>, the focusing method includes acts in blocks <NUM> to <NUM> as described in the following.

At block <NUM>, a reference distance between a target object to be focused and a camera module provided in the terminal is detected by employing a ranging radar provided in the terminal.

For example, the terminal may firstly determine the target object to be focused in a camera preview image displayed by the terminal, and then the reference distance between the target object and the camera module provided in the terminal may be detected by employing the ranging radar according to a position of the target object in the camera preview image.

In detail, when the user needs to perform focusing photographing on the target object, the camera module in the terminal is firstly instructed to be turned on. At the same time, the terminal displays an image collected by the camera module, that is, the camera preview image is displayed. Then the user moves the terminal such that the target object enters in the viewing angle range of the camera module in the teminal, that is, an image of the target object is displayed in the camera preview image. After that, the user may instruct the target object to be focused in the camera preview image. Alternatively, when the terminal displays the camera preview image, it may be detected in real time whether a click operation is received. The user may touch or click at the position displaying the target object image in the camera preview image after moving the terminal such that the image of the target object moves to an expectation position in the camera preview image. When the terminal detects the click, it is determined that the click operation is obtained, and an object at a click position corresponding to the click operation in the camera preview image is determined as the target object. Then, the terminal may determine an azimuthal angle of the target object relative to the camera module according to the position where the target object locates in the camera preview image, such that the reference distance between the target object and the camera module is detected by employing the ranging radar according to the azimuthal angle of the target object relative to the camera module.

For example, as illustrated in <FIG>, after a target object Z is determined according to the received click operation, the terminal may firstly establish a coordinate system with a center of the camera module in the terminal. Coordinate axis of the coordinate system is illustrated as axis X and axis Y in <FIG>. A coordinate (x1, y1) that the image of the target object Z is in the coordinate system is determined. Then, height H and width W of a real scene corresponding to the camera preview image are determined. As illustrated in <FIG>, a viewing angle F of the camera along the axis X and a viewing angle G of the camera along the axis Y are determined by nature of the camera module itself, that is, the viewing angle F of the camera along the axis X and the viewing angle G of the camera along the axis Y are known angles in all cases. Therefore, it is assumed that a distance between an image plane where the target object Z locates and the terminal is P, thus <MAT>. It may be deduced that <MAT>. A line connecting the target object Z and a center of the camera module is marked as S. The line S is respectively mapped to plane X and plane Y. Thus, an angle between the plane X and a line mapped to the plane Y from the line S is an azimuthal angle α of the target object Z relative to the plane X, and an angle between the plane Y and a line mapped to the plane X from the line S may be an azimuthal angle β of the target object Z relative to the plane Y. The plane X may be formed by the axis X and a central axis of the camera module. The plane Y may be formed by the axis Y and the central axis of the camera module. It may be known from <FIG> that tan <MAT>. Since <MAT>, it may be deduced that <MAT>. Based on the same deduction, since <MAT>, it may be deduced that <MAT>. As illustrated in <FIG>, <MAT>, it may be deduced that <MAT> <NUM>)y<NUM>/X. Based on the above deduction, the azimuthal angle α of the target object Z relative to the plane X and the azimuthal angle β of the target object Z relative to the plane Y may be determined. After the two azimuthal angles are determined, the terminal may start up the ranging radar, and send the azimuthal angle α and the azimuthal angle β to the ranging radar. The ranging radar may send the radar signal to the entire area covered by an antenna radiation angle according to an instruction of the terminal, the radar signal reflected from the area defined by the azimuthal angle α and the azimuthal angle β may be received at a fixed point, and the reference distance between the target object Z and the terminal may be determined according to a transmission time of the radar signal and a receiving time of the radar signal reflected from the area defined by the azimuthal angle α and the azimuthal angle β.

At block <NUM>, a photographing focus of the camera module is adjusted to a position where the target object locates according to the reference distance.

For example, after the reference distance between the target object and the terminal is determined, the terminal may instruct the camera module to perform zooming, that is, to adjust the photographing focus, such that the photographing focus is adjusted to the position where the target object locates.

In the technical solution in aspects of the present disclosure, the ranging radar provided in the terminal may determine the reference distance between the target object and the camera module quickly and accurately, such that the terminal may employ the reference distance to perform the focus adjustment, thus improving accuracy and efficiency of the focus adjustment. At the same time, the ranging radar may measure a reference distance between the camera module and any object within a viewing angle range of the camera module. Therefore, the terminal may perform focusing on any object within the viewing angle range, thus improving flexibility and practicability of focusing.

<FIG> illustrates a flow chart of a focusing method according to an exemplary aspect of the present disclosure, an execution subject of which is a terminal. As illustrated in <FIG>, the method includes acts in blocks <NUM>-<NUM> as described in followings.

At block <NUM>, it is detected whether a click operation is received in real time in response to displaying the camera preview image.

At block <NUM>, an object corresponding to a click position of the click operation in the camera preview image is determined as the target object to be focused in response to receiving the click operation.

At block <NUM>, an azimuthal angle of the target object relative to the camera module is determined according to the position where the target object locates in the camera preview image.

At block <NUM>, the reference distance between the target object and the camera module is detected by employing the ranging radar according to the azimuthal angle of the target object relative to the camera module.

With the focusing method in aspects of the present disclosure, the ranging radar provided in the terminal may determine the reference distance between the target object and the camera module fast and accurately, such that the terminal may employ the reference distance to perform the focus adjustment, thus improving accuracy and efficiency of the focus adjustment. At the same time, the ranging radar may measure a reference distance between the camera module and any object within a viewing angle range of the camera module. Therefore, the terminal may perform focusing on any object within the viewing angle range, thus improving flexibility and practicability of focusing.

Aspects of an apparatus of the present disclosure are described below, which may be configured to execute the aspects of the method of the present disclosure.

<FIG> illustrates a block diagram of a focusing apparatus <NUM> according to an exemplary aspect of the present disclosure. The apparatus <NUM> may be implemented as a part or all of an electronic device in a form of software, hardware or a combination thereof. As illustrated in <FIG>, the focusing apparatus <NUM> includes a detection module <NUM> and a focus module <NUM>.

The detection module <NUM> is configured to detect a reference distance between a target object to be focused and a camera module provided in the terminal by employing a ranging radar provided in the terminal.

The focus module <NUM> is configured to adjust a photographing focus of the camera module to a position where the target object locates according to the reference distance.

In an aspect, as illustrated in <FIG>, the detection module <NUM> includes: a determining sub-module <NUM> and a detection sub-module <NUM>.

The determining sub-module <NUM> is configured to determine the target object in a camera preview image displayed in the terminal.

The detection sub-module <NUM> is configured to detect the reference distance between the target object and the camera module by employing the ranging radar according to a position where the target object locates in the camera preview image.

In an aspect, as illustrated in <FIG>, the determining sub-module <NUM> includes: a first detection unit 4011a and a first determining unit 4011b.

The first detection unit 4011a is configured to detect whether a click operation is received in response to displaying the camera preview image.

The first determining unit 4011b is configured to determine an object corresponding to a click position of the click operation in the camera preview image as the target object in response to receiving the click operation.

In an aspect, as illustrated in <FIG>, the detection sub-module <NUM> includes: a second determining unit 4012a and a second detection unit 4012b.

The second determining unit 4012a is configured to determine an azimuthal angle of the target object relative to the camera module according to the position where the target object locates in the camera preview image.

The second detection unit 4012b is configured to detect the reference distance between the target object and the camera module by employing the ranging radar according to the azimuthal angle of the target object relative to the camera module.

With the focusing apparatus in aspects of the present disclosure, the ranging radar provided in the terminal may determine the reference distance between the target object and the camera module quickly and accurately, such that the terminal may employ the reference distance to perform the focus adjustment, thus improving accuracy and efficiency of the focus adjustment. At the same time, the ranging radar may measure a reference distance between the camera module and any object within a viewing angle range of the camera module. Therefore, the terminal may perform focusing on any object within the viewing angle range, thus improving flexibility and practicability of focusing.

Aspects of the present disclosure provide a focusing apparatus. The focusing apparatus includes a processor and a memory configured to store processor executable instructions.

The processor is configured to detect a reference distance between a target object to be focused and a camera module provided in the terminal by employing a ranging radar provided in the terminal; and to adjust a photographing focus of the camera module to a position where the target object locates according to the reference distance.

In an aspect, the above processor may also be configured to: determine the target object in a camera preview image displayed in the terminal; and detect the reference distance between the target object and the camera module by employing the ranging radar according to a position where the target object locates in the camera preview image.

In an aspect, the above processor may also be configured to: detect whether a click operation is received in response to displaying the camera preview image; and determine an object corresponding to a click position of the click operation in the camera preview image as the target object in response to receiving the click operation.

In an aspect, the above processor may also be configured to: determine an azimuthal angle of the target object relative to the camera module according to the position where the target object locates in the camera preview image; and detect the reference distance between the target object and the camera module by employing the ranging radar according to the azimuthal angle of the target object relative to the camera module.

With the focusing apparatus in aspects of the present disclosure, the ranging radar provided by the terminal may determine the reference distance between the target object and the camera module fast and accurately, such that the terminal may employ the reference distance to perform the focus adjustment, thus improving accuracy and efficiency of the focus adjustment. At the same time, the ranging radar may measure a reference distance between any object within a viewing angle range of the camera module and the camera module. Therefore, the terminal may perform focusing on any object within the viewing angle range, thus improving flexibility and practicability of focusing.

<FIG> is a block diagram illustrating a focusing apparatus <NUM> according to an exemplary aspect of the present disclosure. The apparatus <NUM> may be applied to a terminal. For example, the apparatus <NUM> may be a mobile phone, a computer, a digital broadcasting terminal, message sending and receiving equipment, a game controller, a tablet device, a medical device, fitness equipment, a personal digital assistant or the like.

The apparatus <NUM> may include one or more of the following components: a processing component <NUM>, a memory <NUM>, a power component <NUM>, a multimedia component <NUM>, an audio component <NUM>, an input/output (I/O) interface <NUM>, a sensor component <NUM>, and a communication component <NUM>.

The processing component <NUM> generally controls overall operations of the apparatus <NUM>, such as the operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component <NUM> may include one or more processors <NUM> to execute instructions to perform all or part of the operations in the above described methods.

The memory <NUM> is configured to store various types of data to support the operation of the apparatus <NUM>. Examples of such data include instructions for any applications or methods operated on the apparatus <NUM>, contacting data, phonebook data, messages, pictures, video, etc. The memory <NUM> may be implemented using any type of volatile or non-volatile memory devices, or a combination thereof, such as a static random access memory (SRAM), an electrically erasable programmable read-only memory (EEPROM), an erasable programmable read-only memory (EPROM), a programmable read-only memory (PROM), a read-only memory (ROM), a magnetic memory, a flash memory, a magnetic or optical disk.

The multimedia component <NUM> includes a screen providing an output interface between the apparatus <NUM> and the user. In some aspects, the screen may include a liquid crystal display (LCD) and a touch panel (TP). In some aspects, the multimedia component <NUM> includes a front camera and/or a rear camera. The front camera and the rear camera may receive an external multimedia datum while the apparatus <NUM> is in an operation mode, such as a photographing mode or a video mode.

The audio component <NUM> is configured to output and/or input audio signals. For example, the audio component <NUM> includes a microphone ("MIC") configured to receive an external audio signal when the apparatus <NUM> is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal may be further stored in the memory <NUM> or transmitted via the communication component <NUM>. In some aspects, the audio component <NUM> further includes a speaker to output audio signals.

The sensor component <NUM> includes one or more sensors to provide status assessments of various aspects of the apparatus <NUM>. For instance, the sensor component <NUM> may detect an open/closed status of the apparatus <NUM>, relative positioning of components, e.g., the display and the keypad of the apparatus <NUM>, a change in position of the apparatus <NUM> or a component of the apparatus <NUM>, a presence or absence of user contacting with the apparatus <NUM>, an orientation or an acceleration/deceleration of the apparatus <NUM>, and a change in temperature of the apparatus <NUM>. In some aspects, the sensor component <NUM> may also include an accelerometer sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

The communication component <NUM> is configured to facilitate communication, wired or wirelessly, between the apparatus <NUM> and other devices. The apparatus <NUM> can access a wireless network based on a communication standard, such as Wi-Fi, <NUM>, or <NUM>, or a combination thereof. In one exemplary aspect, the communication component <NUM> receives a broadcast signal or broadcast associated information from an external broadcast management system via a broadcast channel. In one exemplary aspect, the communication component <NUM> further includes a near field communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on a radio frequency identification (RFID) technology, an infrared data association (IrDA) technology, an ultra-wideband (UWB) technology, a Bluetooth (BT) technology, and other technologies.

In one or more exemplary aspects, the apparatus <NUM> may be implemented with one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, micro-controllers, microprocessors, or other electronic components, for performing the above described methods.

In one or more exemplary aspects, there is also provided a non-transitory computer-readable storage medium including instructions, such as the memory <NUM> including instructions. The above instructions may be executed by the processor <NUM> in the apparatus <NUM> to perform the above methods. For example, the non-transitory computer-readable storage medium may be a ROM, a RAM, a CD-ROM, a magnetic tape, a floppy disc, an optical data storage device, and the like.

Aspects of the present disclosure provide a non-transitory computer-readable storage medium. When instructions in the storage medium are executed by a processor in the apparatus <NUM>, the apparatus <NUM> is caused to execute the above focusing method. The method includes: detecting a reference distance between a target object to be focused and a camera module provided in the terminal by employing a ranging radar provided in the terminal; and adjusting a photographing focus of the camera module to a position where the target object locates according to the reference distance.

In an aspect, detecting the reference distance between the target object to be focused and the camera module provided in the terminal by employing the ranging radar provided in the terminal includes: determining the target object in a camera preview image displayed in the terminal; and detecting the reference distance between the target object and the camera module by employing the ranging radar according to a position where the target object locates in the camera preview image.

In an aspect, determining the target object in the camera preview image displayed in the terminal includes: detecting whether a click operation is received in response to displaying the camera preview image; and determining an object corresponding to a click position of the click operation in the camera preview image as the target object in response to receiving the click operation.

In an aspect, detecting the reference distance between the target object and the camera module by employing the ranging radar according to the position where the target object locates in the camera preview image, includes: determining an azimuthal angle of the target object relative to the camera module according to the position where the target object locates in the camera preview image; and detecting the reference distance between the target object and the camera module by employing the ranging radar according to the azimuthal angle of the target object relative to the camera module.

Claim 1:
A method for focusing, applied to a terminal (<NUM>), the method comprising:
detecting (<NUM>) a reference distance between a target object to be focused and a camera module (<NUM>) provided in the terminal by employing a ranging radar (<NUM>) provided in the terminal, and
adjusting (<NUM> , <NUM>) a photographing focus of the camera module to a position where the target object is located based on the reference distance;
characterized in that said detecting the reference distance comprises:
determining the target object in a camera preview image displayed in the terminal; and
detecting the reference distance between the target object and the camera module by employing the ranging radar based on a position where the target object is located in the camera preview image;
wherein determining the target object in the camera preview image comprises:
detecting (<NUM>) whether a click operation is received in response to displaying the camera preview image; and
determining (<NUM>) an object corresponding to a click position of the click operation in the camera preview image as the target object in response to receiving the click operation;
wherein detecting the reference distance comprises:
determining (<NUM>) an azimuthal angle of the target object relative to the camera module based on the position where the target object is located in the camera preview image; and
detecting (<NUM>) the reference distance between the target object and the camera module by employing the ranging radar based on the azimuthal angle of the target object relative to the camera module.