Equipment focusing method and device, equipment and medium
By using a zoom lens in smart glasses for device focusing, identifying and focusing on the target of interest, the problem of smart glasses being unable to preview and focus in real time is solved, achieving high-definition shooting results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-02
- Publication Date
- 2026-03-10
AI Technical Summary
Existing smart glasses lack a display screen, making it impossible to preview photos in real time and focus the image, resulting in poor photo clarity and an inability to highlight the subject.
The device uses a zoom lens for focusing. By acquiring a panoramic image with a preset depth of field, it identifies the target of interest and controls the zoom lens to focus, thus achieving focus on the target of interest.
It improves the overall clarity of captured environmental images and highlights sub-images of the target of interest, providing better shooting results.
Smart Images

Figure CN121644992A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of image technology, and more particularly, to a device focusing method, a device focusing apparatus, a head-mounted device, and a computer readable storage medium. BACKGROUND
[0002] At present, smart glasses capable of taking photos are being used more and more widely. Such smart glasses usually do not have a display screen, i.e., do not have a display function, which leads to the fact that a user cannot preview photos taken by the smart glasses in real time, and cannot perform picture focusing like manually operating a smart phone. Therefore, such smart glasses often use a fixed-focus camera module, but this leads to the fact that photos taken by the smart glasses often have the shortcomings of poor overall picture clarity and inability to focus to highlight a subject. SUMMARY
[0003] An object of the present application is to provide a new technical solution for device focusing.
[0004] According to a first aspect of the present application, a device focusing method is provided, applied to an electronic device, a camera module of the electronic device for collecting an environment image comprising a zoom lens, the method comprising:
[0005] acquiring a preset image collected by the camera module, the preset image being a panoramic image of a preset depth of field;
[0006] according to a set of targets of interest, identifying a target of interest in the preset image, the set of targets of interest comprising at least one target of interest and a corresponding weight;
[0007] controlling the zoom lens to focus on the target of interest in the preset image.
[0008] Optionally, the acquiring of the preset image collected by the camera module comprises:
[0009] respectively acquiring a first environment image collected by the zoom lens at a first focal length and a second environment image collected by the zoom lens at a second focal length;
[0010] generating a preset image according to the first environment image and the second environment image.
[0011] Optionally, before the according to a set of targets of interest, identifying a target of interest in the preset image, the method further comprises:
[0012] acquiring a set of sample images;
[0013] generating a set of targets of interest according to the set of sample images.
[0014] Optionally, generating a target set of interest based on the sample image set includes:
[0015] For any sample image in the sample image set, determine whether there is a main subject in the sample image;
[0016] If a main object exists in the sample image, the target object in the sample image will be detected.
[0017] For sample images in the sample image set that contain a main object, the target set of interest is determined based on the target object in the sample image.
[0018] Optionally, obtaining the sample image set includes:
[0019] Acquire a first historical image stored at a set storage location in the electronic device, and / or a second historical image transmitted via the electronic device.
[0020] Optionally, the zoom lens is a T-Lens lens, and controlling the zoom lens to focus on the target of interest in the preset image includes:
[0021] Obtain the depth of field of the sub-image corresponding to the target of interest in the preset image;
[0022] Based on the depth of field, determine the target voltage applied to the zoom lens;
[0023] The target voltage is applied to the zoom lens.
[0024] Optionally, before acquiring the preset image captured by the camera module, the method further includes:
[0025] In response to a set trigger event, a preset image captured by the camera module is obtained.
[0026] According to a second aspect of this application, a device focusing apparatus is provided, applied to an electronic device, wherein the camera module of the electronic device for acquiring environmental images includes a zoom lens, and the apparatus includes:
[0027] The acquisition module is used to acquire a preset image captured by the camera module, wherein the preset image is a panoramic image with a preset depth of field;
[0028] The recognition module is used to identify targets of interest in the preset image based on a set of targets of interest, wherein the set of targets of interest includes at least one target of interest and a corresponding weight;
[0029] The control module is used to control the zoom lens to focus on the target of interest in the preset image.
[0030] According to a third aspect of this application, an electronic device is provided, the electronic device including a camera module for acquiring environmental images and a device focusing device as described in the second aspect, the camera module including a zoom lens;
[0031] Alternatively, the electronic device includes the camera module, a memory, and a processor, wherein the memory stores computer instructions, and the processor retrieves the computer instructions from the memory to perform the method as described in any one of the first aspects.
[0032] According to a fourth aspect of this application, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the method according to any one of the first aspects.
[0033] This application provides a device focusing method applied to an electronic device. The camera module of the electronic device for acquiring environmental images includes a zoom lens. The method includes: acquiring a preset image acquired by the camera module, the preset image being a panoramic image with a preset depth of field; identifying targets of interest (ROIs) in the preset image based on a set of ROIs, the ROIs set including at least one ROI and its corresponding weight; and controlling the zoom lens to focus on the ROI in the preset image. This method enables focusing on sub-images corresponding to ROIs in the preset image. Based on this, the environmental image acquired through the zoom lens has high overall clarity and highlights the sub-images corresponding to ROIs in the preset image.
[0034] Other features and advantages of this application will become clear from the following detailed description of exemplary embodiments with reference to the accompanying drawings. Attached Figure Description
[0035] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments of the present application and, together with their description, serve to explain the principles of the present application.
[0036] Figure 1 This is a hardware configuration outline of an electronic device for implementing a device focusing method according to an embodiment of this application. Figure One ;
[0037] Figure 2 This is a flowchart illustrating a method for achieving device focusing according to an embodiment of this application;
[0038] Figure 3 This is a schematic diagram of a device for achieving device focusing according to an embodiment of this application;
[0039] Figure 4 This is a hardware configuration outline of an electronic device for implementing a device focusing method according to an embodiment of this application.Figure Two . Detailed Implementation
[0040] Various exemplary embodiments of the present application will now be described in detail with reference to the accompanying drawings. It should be noted that, unless otherwise specifically stated, the relative arrangement, numerical expressions, and values of the components and steps set forth in these embodiments do not limit the scope of the present application.
[0041] The following description of at least one exemplary embodiment is merely illustrative and is in no way intended to limit the scope of this application and its application or use.
[0042] Techniques, methods, and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and equipment should be considered part of the specification.
[0043] In all the examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not as limitations. Therefore, other examples of exemplary embodiments may have different values.
[0044] It should be noted that similar labels and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be discussed further in subsequent figures.
[0045] Figure 1 This is a hardware configuration outline of an electronic device for implementing a device focusing method according to an embodiment of this application. Figure One .
[0046] Electronic device 1000 can be a terminal capable of taking photos or a server. Furthermore, the terminal can be a head-mounted device (such as an AR device, MR device, or VR device), a portable computer, a tablet computer, a PDA, etc. The server can be a cloud server, etc. Specifically, a head-mounted device can be head-mounted glasses or a helmet.
[0047] Electronic device 1000 may include a processor 1100, a memory 1200, an interface device 1300, a communication device 1400, a display device 1500, an input device 1600, a speaker 1700, a microphone 1800, and a camera module 1900, etc. The processor 1100 may be a central processing unit (CPU), a microprocessor (MCU), etc. The memory 1200 may include, for example, ROM (Read-Only Memory), RAM (Random Access Memory), or non-volatile memory such as a hard disk. The interface device 1300 may include, for example, a USB interface, a headphone jack, etc. The communication device 1400 may be capable of wired or wireless communication. The display device 1500 may be, for example, an LCD screen, a touch screen, etc. The input device 1600 may include, for example, a touch screen, a keyboard, etc. Users can input / output voice information through the speaker 1700 and the microphone 1800. The camera module 1900 is used to capture environmental images.
[0048] Despite Figure 1 The electronic device 1000 shows multiple devices, but this application may only involve some of them. For example, the electronic device 1000 may only involve the camera module 1900, the memory 1200 and the processor 1100.
[0049] In the embodiments applied in this application, the memory 1200 of the electronic device 1000 is used to store instructions for controlling the processor 1100 to execute the device focusing method provided in the embodiments of this application.
[0050] In the above description, those skilled in the art can design instructions based on the scheme disclosed in this application. How the instructions control the processor to operate is well known in the art, and therefore will not be described in detail here.
[0051] The device focusing method provided in this application is applicable to, for example... Figure 1 The illustrated electronic device includes a camera module for capturing environmental images, and this camera module includes a zoom lens. In this application, focusing of the camera module is achieved by controlling the zoom lens. That is to say, the electronic device involved in this application employs a camera module with adjustable focal length, which provides the hardware basis for the device focusing method provided in this application.
[0052] like Figure 2 As shown, the device focusing method provided in this application includes the following steps S2100 to S2300.
[0053] Step S2100: Acquire a preset image captured by the camera module.
[0054] The preset image is a panoramic image with a preset depth of field.
[0055] In this embodiment, the preset depth of field is a large depth of field in the conventional sense, which can be set based on experience. That is to say, the panoramic image with the preset depth of field obtained through the above step S2100 is specifically a panoramic image with a large depth of field relative to the surrounding environment. Based on this, the preset image can include as much clear environmental information as possible.
[0056] In one embodiment of this application, step S2100 can also be implemented by steps S2110 and S2111.
[0057] Step S2110: Acquire the first environmental image captured by the zoom lens at the first focal length and the second environmental image captured at the second focal length.
[0058] In this embodiment, the first focal length is a conventional close-up focal length. The second focal length is a conventional long-range focal length. The first and second focal lengths can be set empirically. Based on this, the specific implementation of step S2110 can be as follows: control the focal length of the zoom lens to the first focal length, and based on this, control the zoom lens to acquire an environmental image to obtain a first environmental image; control the focal length of the zoom lens to the second focal length, and based on this, control the zoom lens to acquire an environmental image to obtain a second environmental image.
[0059] Step S2111: Generate a preset image based on the first environmental image and the second environmental image.
[0060] In this embodiment, the preset image can be obtained by combining the first environmental image and the second environmental image.
[0061] Based on the above steps S2110 and S2111, a method for automatically and quickly generating preset images is provided.
[0062] Step S2200: Identify the target of interest in the preset image based on the target of interest set.
[0063] The set of targets of interest includes at least one target of interest and its corresponding weight. It should be noted that the targets of interest and their corresponding weights in the set of targets of interest are specifically for the user of the electronic device.
[0064] Furthermore, the target of interest in the target of interest set refers to the category information of an object, not a specific object. In an example, the target of interest could be: people, animals, flowers, etc.
[0065] Furthermore, in this embodiment, there is no limitation on whether the sum of the weights corresponding to the target of interest is 0; the weights corresponding to the target of interest are only used to represent the user's relative degree of interest.
[0066] In this embodiment of the application, before performing step S2200, a step of obtaining a set of targets of interest is included. In one embodiment of the application, the step of obtaining a set of targets of interest may be: the user manually inputs a set of targets of interest into the electronic device according to their own needs. For example, the electronic device displays multiple candidate targets of interest, the user selects a candidate target of interest that meets their own needs from these multiple candidate targets of interest, the electronic device responds to the user's operation of selecting a candidate target of interest to determine the targets of interest in the set of targets of interest, further, the user sets weights for the selected candidate targets of interest according to their own needs, and the electronic device responds to the user's operation of setting weights to determine the weight of each target of interest in the set of targets of interest.
[0067] In this embodiment, the specific implementation of step S2200 can be as follows: performing target recognition on the preset image to obtain at least one target object contained in the preset image; searching for the target of interest and its corresponding weight corresponding to the at least one target object contained in the preset image in the target of interest set; and taking the target object corresponding to the target of interest with the largest weight as the target of interest in the preset image. That is, the target of interest in the preset image is inferred through the target of interest set in step S2200.
[0068] Specifically, the method of target recognition for the preset image can be as follows: input the preset image into the target detection network, and the target detection network outputs the target objects included in the preset image.
[0069] For example, an object detection network could be YOLO.
[0070] Step S2300: Control the zoom lens to focus on the target of interest in the preset image.
[0071] In one embodiment of this application, step S2300 can be specifically implemented by the following steps S2310 to S2312.
[0072] Step S2310: Obtain the depth of field of the sub-image corresponding to the target of interest in the preset image.
[0073] In this embodiment, when a target of interest is identified in a preset image, depth recognition is performed on the sub-image corresponding to the target of interest.
[0074] Step S2311: Determine the target voltage to be applied to the zoom lens based on the depth of field.
[0075] Step S2312: Apply the target voltage to the zoom lens.
[0076] In this embodiment, when the zoom lens is a T-Lens lens, there is a corresponding relationship between the voltage on the zoom lens and the focal length. Based on this, the voltage required on the zoom lens when its focal length equals the depth of field of the sub-image corresponding to the target of interest in the preset image can be denoted as the target voltage. Furthermore, the target voltage is applied to the zoom lens. At this time, the focal length of the zoom lens equals the depth of field of the sub-image corresponding to the target of interest in the preset image. Based on this, focusing on the sub-image corresponding to the target of interest in the preset image can be achieved. Therefore, the environmental image acquired through this zoom lens has high overall clarity and highlights the sub-image corresponding to the target of interest in the preset image.
[0077] This application provides a device focusing method applied to an electronic device. The camera module of the electronic device for acquiring environmental images includes a zoom lens. The method includes: acquiring a preset image acquired by the camera module, the preset image being a panoramic image with a preset depth of field; identifying targets of interest (ROIs) in the preset image based on a set of ROIs, the ROIs set including at least one ROI and its corresponding weight; and controlling the zoom lens to focus on the ROI in the preset image. This method enables focusing on sub-images corresponding to ROIs in the preset image. Based on this, the environmental image acquired through the zoom lens has high overall clarity and highlights the sub-images corresponding to ROIs in the preset image.
[0078] In one embodiment of this application, a set of targets of interest can also be automatically generated for the electronic device. In this regard, the device focusing method provided in this application further includes the following steps S2210 and S2211 before the aforementioned step S2200.
[0079] Step S2210: Obtain the sample image set.
[0080] In this embodiment, the sample image set is the set of images that the electronic device uses to acquire the target set of interest.
[0081] In one embodiment of this application, the sample image set can be a set of images specified by the user that can represent the target of their interest.
[0082] In one embodiment of this application, the sample image set may specifically be images pre-stored in an electronic device, such as images historically taken or saved and stored in the electronic device's photo album. And / or, the sample image set may also specifically be images historically transmitted in a multimedia application within the electronic device, such as those in a social media application. In this regard, step S2210 is specifically implemented through the following step S2210-1.
[0083] Step S2210-1: Obtain the first historical image stored in the electronic device at a set storage location, and / or the second historical image transmitted via the electronic device.
[0084] In this embodiment, the storage location can be exemplarily the storage location of the photo album on the electronic device. Based on this, the first historical image is an image historically taken or saved and stored in the photo album of the electronic device. Furthermore, the second historical image can specifically be an image historically transmitted (including uploaded and downloaded) by a multimedia application on the electronic device.
[0085] The method of acquiring the sample image set in step S2210-1 above eliminates the need for the user to manually specify the sample image set, enabling fully automatic acquisition. Furthermore, user habits can be learned based on the sample image set acquired in step S2210-1. Therefore, the target of interest set generated in step S2211 below, based on the sample image set acquired in step S2210-1, can more accurately reflect the user's targets of interest.
[0086] Step S2211: Generate a set of targets of interest based on the sample image set.
[0087] In one embodiment of this application, the above step S2211 is specifically implemented by the following steps S2211-1 to S2211-3.
[0088] Step S2211-1: For any sample image in the sample image set, determine whether there is a main subject in the sample image.
[0089] In one embodiment of this application, for any sample image in the sample image set, the sample image can be input into a convolutional neural network (CNN), which identifies whether a subject exists in the sample image. Specifically, the CNN outputs "1" if it identifies a subject in the sample image, and outputs "0" otherwise. The CNN may specifically include, in sequence: a first convolutional layer, a first pooling layer, a second convolutional layer, a second pooling layer, a third convolutional layer, a third pooling layer, a fully connected layer, and a sigmoid function.
[0090] Step S2211-2: If a main object exists in the sample image, detect the target object in the sample image.
[0091] In one embodiment of this application, when a subject object exists in a sample image, the sample image containing the subject object is input into a target detection network, which then detects the sample image to identify the target object corresponding to the sample image.
[0092] For example, an object detection network could be YOLO.
[0093] Step S2211-3: For sample images in the sample image set that contain a main object, determine the target set of interest based on the target object in the sample image.
[0094] In this embodiment, the category information corresponding to the target object is recorded as the target of interest. The target objects obtained based on steps S2211-2 are then classified according to the category information. Weights are assigned to the targets of interest corresponding to each target object based on the number of target objects in each category. The more target objects in a category, the greater the weight assigned to the targets of interest corresponding to that target object. Based on this, each target of interest and its corresponding weight is considered as a set of targets of interest.
[0095] Based on the above steps S2211-1 to S2211-3, the automatic generation of the target set of interest can be achieved.
[0096] In one embodiment of this application, step S2100 can be specifically implemented by step S2120.
[0097] Step S2120: In response to the set trigger event, acquire the preset image captured by the camera module.
[0098] In this application, the triggering event is set to be triggered by the user, which is used to trigger the electronic device to execute the above steps S2100 to S2300.
[0099] The trigger event is set to an input operation performed by the user to trigger the electronic device to perform the above steps S2100 to S2300, such as pressing a button to trigger the electronic device to perform the above steps S2100 to S2300, performing a gesture to trigger the electronic device to perform the above steps S2100 to S2300, or inputting a set voice to trigger the electronic device to perform the above steps S2100 to S2300.
[0100] In this embodiment, when the user triggers the set trigger event, step 2100 is executed, thereby further executing steps S2200 and S2300 to complete the autofocus of the electronic device. This allows the electronic device to autofocus, avoiding the need for the user to manually refocus multiple times while continuously taking multiple photos. Furthermore, it avoids unnecessary autofocusing by the electronic device when the shooting requirements are low.
[0101] This application also provides a device focusing apparatus 300, applied to an electronic device, wherein the camera module of the electronic device for acquiring environmental images includes a zoom lens, such as... Figure 3 As shown, the focusing device 300 includes:
[0102] The acquisition module 310 is used to acquire a preset image captured by the camera module, wherein the preset image is a panoramic image with a preset depth of field;
[0103] The recognition module 320 is used to identify targets of interest in the preset image based on a set of targets of interest, wherein the set of targets of interest includes at least one target of interest and a corresponding weight;
[0104] The control module 330 is used to control the zoom lens to focus on the target of interest in the preset image.
[0105] In one embodiment of this application, the acquisition module 310 is specifically used for:
[0106] The first environmental image acquired by the zoom lens at the first focal length and the second environmental image acquired at the second focal length are obtained respectively.
[0107] A preset image is generated based on the first environmental image and the second environmental image.
[0108] In one embodiment of this application, the acquisition module 310 is further configured to:
[0109] Obtain the sample image set;
[0110] Based on the sample image set, a target set of interest is generated.
[0111] In one embodiment of this application, the acquisition module 310 is further specifically used for:
[0112] For any sample image in the sample image set, determine whether there is a main subject in the sample image;
[0113] If a main object exists in the sample image, the target object in the sample image will be detected.
[0114] For sample images in the sample image set that contain a main object, the target set of interest is determined based on the target object in the sample image.
[0115] In one embodiment of this application, the acquisition module 310 is further specifically used for:
[0116] Acquire a first historical image stored at a set storage location in the electronic device, and / or a second historical image transmitted via the electronic device.
[0117] In one embodiment of this application, the control module 330 is specifically used for:
[0118] Obtain the depth of field of the sub-image corresponding to the target of interest in the preset image;
[0119] Based on the depth of field, determine the target voltage applied to the zoom lens;
[0120] The target voltage is applied to the zoom lens.
[0121] In one embodiment of this application, the acquisition module 310 is specifically used for:
[0122] In response to a set trigger event, a preset image captured by the camera module is obtained.
[0123] This application also provides an electronic device, which includes a camera module for acquiring environmental images and a device focusing device as provided in any of the above-described device embodiments, wherein the camera module includes a zoom lens;
[0124] Or, such as Figure 4 As shown, the electronic device 400 includes the camera module 410, the memory 420, and the processor 430. The memory 420 is used to store computer instructions, and the processor 430 is used to retrieve the computer instructions from the memory 420 to execute the method as described in any of the above method embodiments.
[0125] This application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method according to any one of the above-described method embodiments.
[0126] This application may be a system, method, and / or computer program product. A computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for causing a processor to implement various aspects of this application.
[0127] Computer-readable storage media can be tangible devices capable of holding and storing instructions for use by an instruction execution device. Computer-readable storage media can be, for example—but not limited to—electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination thereof. The computer-readable storage media used herein are not to be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.
[0128] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.
[0129] The computer program instructions used to perform the operations of this application may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as the "C" language or similar programming languages. The computer-readable program instructions may be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuits, such as programmable logic circuits, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), are personalized by utilizing state information from the computer-readable program instructions. These electronic circuits can execute the computer-readable program instructions to implement various aspects of this application.
[0130] Various aspects of this application are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.
[0131] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processor of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner; thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.
[0132] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.
[0133] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions. It will be well known to those skilled in the art that implementation in hardware, implementation in software, and implementation using a combination of software and hardware are equivalent.
[0134] The various embodiments of this application have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical applications, or technical improvements to the technology in the market, or to enable others skilled in the art to understand the embodiments disclosed herein. The scope of this application is defined by the appended claims.
Claims
1. An apparatus focusing method, characterized by, The application is applied to an electronic device, a camera module for collecting environment images of the electronic device comprises a zoom lens, and the method comprises the following steps: acquiring a preset image collected by the camera module, the preset image being a panoramic image of a preset depth of field; according to a set of target objects of interest, identifying target objects of interest in the preset image, the set of target objects of interest comprising at least one target object of interest and a corresponding weight; controlling the zoom lens to focus on the target objects of interest in the preset image.
2. The method of claim 1, wherein, The acquiring of the preset image collected by the camera module comprises the following steps: respectively acquiring a first environment image collected by the zoom lens at a first focal length and a second environment image collected by the zoom lens at a second focal length; generating a preset image according to the first environment image and the second environment image.
3. The method of claim 1, wherein, Before the step of identifying the target objects of interest in the preset image according to the set of target objects of interest, the method further comprises the following steps: acquiring a set of sample images; generating a set of target objects of interest according to the set of sample images.
4. The method of claim 3, wherein, The generating of the set of target objects of interest according to the set of sample images comprises the following steps: for any sample image in the set of sample images, determining whether there is a main object in the sample image; in the case that there is a main object in the sample image, detecting a target object in the sample image; for the sample image in which there is a main object, determining the set of target objects of interest according to the target object in the sample image.
5. The method of claim 3, wherein, The acquiring of the set of sample images comprises the following steps: acquiring a first historical image stored in a set storage location in the electronic device and / or a second historical image transmitted by the electronic device.
6. The method of claim 1, wherein, The zoom lens is a T-Lens lens, and the controlling of the zoom lens to focus on the target objects of interest in the preset image comprises the following steps: acquiring a depth of field of a sub-image corresponding to the target object of interest in the preset image; determining a target voltage applied to the zoom lens according to the depth of field; applying the target voltage to the zoom lens.
7. The method of claim 1, wherein, Before the acquiring of the preset image collected by the camera module, the method further comprises the following step: in response to a set trigger event, acquiring the preset image collected by the camera module.
8. An apparatus for focusing, characterized by The application is applied to an electronic device, a camera module for collecting environment images of the electronic device comprises a zoom lens, and the device comprises the following steps: an acquiring module, configured to acquire a preset image collected by the camera module, the preset image being a panoramic image of a preset depth of field; an identifying module, configured to identify target objects of interest in the preset image according to a set of target objects of interest, the set of target objects of interest comprising at least one target object of interest and a corresponding weight; a controlling module, configured to control the zoom lens to focus on the target objects of interest in the preset image.
9. An electronic device, comprising: The electronic device comprises a camera module for collecting environment images and a device focusing apparatus as claimed in claim 8, the camera module comprising a zoom lens; or, the electronic device comprises the camera module, a memory and a processor, the memory being configured to store computer instructions, and the processor being configured to call the computer instructions from the memory to execute the method as claimed in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, a computer program stored thereon, which, when executed by a processor, implements the method according to any one of claims 1-7.