CN114666490B - Focusing method, focusing device, electronic equipment and storage medium - Google Patents

Focusing method, focusing device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114666490B
CN114666490B CN202011540490.6A CN202011540490A CN114666490B CN 114666490 B CN114666490 B CN 114666490B CN 202011540490 A CN202011540490 A CN 202011540490A CN 114666490 B CN114666490 B CN 114666490B
Authority
CN
China
Prior art keywords
focusing
preview image
mode
area
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011540490.6A
Other languages
Chinese (zh)
Other versions
CN114666490A (en
Inventor
张伟
张海坡
徐鸿伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN202011540490.6A priority Critical patent/CN114666490B/en
Publication of CN114666490A publication Critical patent/CN114666490A/en
Application granted granted Critical
Publication of CN114666490B publication Critical patent/CN114666490B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/67Focus control based on electronic image sensor signals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/63Control of cameras or camera modules by using electronic viewfinders
    • H04N23/631Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters
    • H04N23/632Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters for displaying or modifying preview images prior to image capturing, e.g. variety of image resolutions or capturing parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/67Focus control based on electronic image sensor signals
    • H04N23/675Focus control based on electronic image sensor signals comprising setting of focusing regions

Abstract

The disclosure relates to a focusing method, a device, an electronic device and a storage medium, wherein the focusing method is applied to a terminal device and comprises the following steps: acquiring a focusing area of a first preview image in a view-finding frame of a preset application, wherein the first preview image is a preview image focused in a non-default mode, and a shooting object corresponding to the focusing area is a target object; generating a second preview image in the view-finding frame according to a zooming instruction based on the first preview image, and determining a target area of the second preview image, wherein a shooting object corresponding to the target area is the target object; and responding to the target area meeting a preset condition, and focusing the second preview image in a default mode.

Description

Focusing method, focusing device, electronic equipment and storage medium
Technical Field
The disclosure relates to the field of image acquisition, in particular to a focusing method, a focusing device, electronic equipment and a storage medium.
Background
With the progress of scientific technology, the shooting performance of the terminal equipment is higher and higher, such as zoom magnification is larger, a zooming process is smooth, focusing modes are various, and the like. When the terminal equipment is used for shooting images or videos, users often zoom and focus frequently, but in the related technology, the zooming and focusing matching effect of a camera is not ideal, and shooting effect and use experience are affected.
Disclosure of Invention
To overcome the problems in the related art, embodiments of the present disclosure provide a focusing method, apparatus, electronic device, and storage medium to solve the drawbacks in the related art.
According to a first aspect of embodiments of the present disclosure, there is provided a focusing method, applied to a terminal device, including:
acquiring a focusing area of a first preview image in a view-finding frame of a preset application, wherein the first preview image is a preview image focused in a non-default mode, and a shooting object corresponding to the focusing area is a target object;
generating a second preview image in the view-finding frame according to a zooming instruction based on the first preview image, and determining a target area of the second preview image, wherein a shooting object corresponding to the target area is the target object;
and responding to the target area meeting a preset condition, and focusing the second preview image in a default mode.
In one embodiment, the target area satisfies a predetermined condition, including:
the proportion of the target area to the second preview image is less than a first proportion threshold.
In one embodiment, the target area satisfies a predetermined condition, including:
the zoom ratio of the target area and the focusing area is larger than the zoom ratio threshold, wherein the zoom ratio threshold is determined according to the first preview image and the focusing area.
In one embodiment, the zoom ratio threshold is determined based on a ratio of the focus area to the first preview image and a distance of the focus area from a center of the first preview image.
In one embodiment, the target region comprises a focal sub-region and a non-focal sub-region;
the target area satisfies a predetermined condition, including:
the ratio of the non-focal sub-region to the target region is greater than a second ratio threshold.
In one embodiment, the non-default mode focus is triggered by a non-default focus instruction;
the acquiring the focusing area of the first preview image in the view-finding frame of the preset application comprises the following steps:
determining a shooting object aimed by the non-default focusing instruction as the target object;
and determining the region in the target frame corresponding to the target object as the focusing region.
In one embodiment, the non-default focus instructions include: a focusing instruction determined according to the touch operation;
the shooting object aimed by the non-default focusing instruction comprises: and the touch operation is aimed at the shooting object.
In one embodiment, the preset application has a plurality of modes; the default mode comprises the following steps: and determining a focusing mode according to the current running mode of the preset application.
In one embodiment, the preset application has at least one of an image acquisition mode, a video recording mode, and a preset object mode;
the default mode when the preset application runs the image acquisition mode and the video recording mode comprises the following steps: focusing mode with the center of the image as the focusing point;
the default mode when the preset application runs the preset object mode comprises the following steps: focusing mode with preset object as focusing point.
According to a second aspect of embodiments of the present disclosure, there is provided a focusing device applied to a terminal device, including:
the first acquisition module is used for acquiring a focusing area of a first preview image in a view-finding frame of a preset application, wherein the first preview image is a preview image focused in a non-default mode, and a shooting object corresponding to the focusing area is a target object;
a second acquisition module, configured to generate a second preview image in the viewfinder according to a zoom instruction based on the first preview image, and determine a target area of the second preview image, where a shooting object corresponding to the target area is the target object;
and the focusing module is used for focusing the second preview image in a default mode in response to the target area meeting a preset condition.
In one embodiment, the target area satisfies a predetermined condition, including:
the proportion of the target area to the second preview image is less than a first proportion threshold.
In one embodiment, the target area satisfies a predetermined condition, including:
the zoom ratio of the target area and the focusing area is larger than the zoom ratio threshold, wherein the zoom ratio threshold is determined according to the first preview image and the focusing area.
In one embodiment, the zoom ratio threshold is determined based on a ratio of the focus area to the first preview image and a distance of the focus area from a center of the first preview image.
In one embodiment, the target region comprises a focal sub-region and a non-focal sub-region;
the target area satisfies a predetermined condition, including:
the ratio of the non-focal sub-region to the target region is greater than a second ratio threshold.
In one embodiment, the non-default mode focus is triggered by a non-default focus instruction;
the first obtaining module is specifically configured to:
determining a shooting object aimed by the non-default focusing instruction as the target object;
and determining the region in the target frame corresponding to the target object as the focusing region.
In one embodiment, the non-default focus instructions include: a focusing instruction determined according to the touch operation;
the shooting object aimed by the non-default focusing instruction comprises: and the touch operation is aimed at the shooting object.
In one embodiment, the preset application has a plurality of modes; the default mode comprises the following steps: and determining a focusing mode according to the current running mode of the preset application.
In one embodiment, the preset application has at least one of an image acquisition mode, a video recording mode, and a preset object mode;
the default mode when the preset application runs the image acquisition mode and the video recording mode comprises the following steps: focusing mode with the center of the image as the focusing point;
the default mode when the preset application runs the preset object mode comprises the following steps: focusing mode with preset object as focusing point.
According to a third aspect of embodiments of the present disclosure, there is provided an electronic device comprising a memory for storing computer instructions executable on a processor for performing the focusing method according to the first aspect.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method of the first aspect.
The technical scheme provided by the embodiment of the disclosure can comprise the following beneficial effects:
the method comprises the steps of firstly obtaining a first preview image which is focused in a non-default mode in a view-finding frame of a preset application, obtaining a focusing area from the first preview image, further generating a second preview image in the view-finding frame according to a zooming instruction, obtaining a target area in the second preview image, enabling shooting objects corresponding to the target area and the focusing area to be the same target objects, and finally focusing the second preview image in a default mode when the target area meets preset conditions. The method has the advantages that the area corresponding to the target object is always acquired in the zooming process, the preset condition is set for focusing in the default mode of the second preview image, and focusing in the default mode is selectively started according to the target area and the preset condition in the zooming result, so that focusing in the default mode can be accurately started, the focusing result of focusing in the non-default mode is prevented from being damaged by redundant focusing in the default mode, the focusing effect is improved, the focusing energy consumption is saved, the matching effect of zooming and focusing is further improved, and the shooting effect and the user experience are improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
FIG. 1 is a flow chart of a focusing method shown in an exemplary embodiment of the present disclosure;
FIG. 2 is a schematic diagram of a comparison of preview images before and after zooming, as shown in an exemplary embodiment of the present disclosure;
FIG. 3 is a schematic diagram of a comparison of preview images before and after zooming, shown in another exemplary embodiment of the present disclosure;
FIG. 4 is a diagram illustrating a relationship of a target object to a target frame in accordance with an exemplary embodiment of the present disclosure;
fig. 5 is a schematic structural view of a focusing device shown in an exemplary embodiment of the present disclosure;
fig. 6 is a block diagram of an electronic device shown in an exemplary embodiment of the present disclosure.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
The terminology used in the present disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As used in this disclosure and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any or all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used in this disclosure to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present disclosure. The word "if" as used herein may be interpreted as "at … …" or "at … …" or "responsive to a determination", depending on the context.
With the progress of scientific technology, the shooting performance of the terminal equipment is higher and higher, such as zoom magnification is larger, a zooming process is smooth, focusing modes are various, and the like. When the terminal equipment is used for shooting images or videos, users often zoom and focus frequently, but in the related technology, the zooming and focusing matching effect of a camera is not ideal, and shooting effect and use experience are affected.
Based on this, in a first aspect, at least one embodiment of the present disclosure provides a focusing method applied to a terminal device, please refer to fig. 1, which illustrates a flow of the focusing method, including steps S101 to S103.
The terminal device may be a smart phone, a tablet computer, a desktop/laptop/handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (personal digital assistant, PDA), an augmented reality (augmented reality, AR)/Virtual Reality (VR) device, or the like, and the embodiments of the present disclosure are not intended to limit the specific form of the terminal device.
The terminal device may have an image acquisition component, such as a camera. When the terminal equipment starts the application of the camera and the like using the image acquisition component, the image acquisition component acquires the preview image of the space in the acquisition range in real time, zooming or focusing can be carried out on the preview image, and the zooming or focusing operation can be carried out automatically or according to the operation input by a user. In step S101, a focusing area of a first preview image in a viewfinder of a preset application is obtained, where the first preview image is a preview image focused in a non-default manner, and a shooting object corresponding to the focusing area is a target object.
The preset application may be an application using an image acquisition component, for example, a camera, and the image acquired by the image acquisition component forms a preview image in the running process of the preset application.
The non-default focusing refers to focusing that requires user intervention to perform. The non-default mode focusing is triggered by a non-default focusing instruction, which may be input by the user based on the preview image, and the area for which the non-default focusing instruction is directed is a focusing area. Optionally, the non-default focusing instruction may be a focusing instruction determined according to the touch operation, so that the area targeted by the non-default focusing instruction may be a shooting area targeted by the touch operation, for example, the user may click on an area (for example, an area corresponding to a person, an object, etc.) in the preview image, so that a focusing instruction using the area as a focusing area is generated, and the preview image after focusing is performed may be the first preview image.
The preview image is a result of real-time acquisition of the space in the acquisition range by the image acquisition component, so that the preview image is a continuous multi-frame image, and the first preview image can be one-frame image or multi-frame image. Alternatively, the first preview image may be always used as the first preview image without zooming or refocusing.
In step S102, a second preview image is generated in the viewfinder according to a zoom instruction based on the first preview image, and a target area of the second preview image is determined, wherein a shooting object corresponding to the target area is the target object.
The zooming instruction can be automatically generated or generated according to the operation input by the user; the zoom form may be a smooth zoom (SAT). Optionally, the user may generate a zoom instruction for increasing or decreasing the focal length by making the two fingers move away from or close to the display screen of the terminal device, that is, the preview image enlarges or reduces along with the movement of the finger, the finger stops moving, and the preview image frames at the time point, for example, in this embodiment, the two fingers make the move away from the first preview image displayed on the display screen, the first preview image enlarges in real time, the finger movement stops, and the preview image frames at the time point, which serves as the second preview image. The zoom instruction may include a zoom ratio or not, and when the zoom ratio is not included, the zoom ratio may be determined according to the focus area and the target area.
The size of the viewfinder is fixed while the shooting object (i.e., target object) corresponding to the focusing area is enlarged or reduced along with the preview image during zooming, so that the shooting object (i.e., target object) can be completely retained in the viewfinder, i.e., the shooting object corresponding to the target area is a complete target object, the shooting object (i.e., target object) can also be partially retained in the viewfinder, i.e., the shooting object corresponding to the target area is a part of the target object, and the shooting object (i.e., target object) can also be separated from the viewfinder, i.e., the target area corresponding to the target object does not exist in the second preview image. Referring to fig. 2, a small tortoise 202 is provided in the first preview image 201, the small tortoise 202 is a target object, the area where the small tortoise 202 is located is a focusing area, and after the first preview image 201 is zoomed to generate the second preview image 203, the space corresponding to the second preview image 203 is a part of the space corresponding to the first preview image 201, and the small tortoise 202 is not located in the space corresponding to the second preview image 203, so that the small tortoise 202 is separated from the view-finder frame, and the target area corresponding to the small tortoise 202 does not exist in the second preview image. Referring to fig. 3, a small tortoise 302 is provided in the first preview image 301, the small tortoise 202 is a target object, the area where the small tortoise 302 is located is a focusing area, and after the first preview image 301 is zoomed to generate the second preview image 303, the space corresponding to the second preview image 303 is a part of the space corresponding to the first preview image 301, and the small tortoise 302 is still left in the space corresponding to the second preview image 303, so that the small tortoise 302 is fully kept in the viewfinder, and the target area in the second preview image 303 corresponds to the complete small tortoise 302.
In step S103, in response to the target area satisfying a predetermined condition, the second preview image is focused by default.
Wherein the predetermined condition may be set in advance, and a plurality of predetermined conditions may be set. Therefore, it is possible to sequentially determine whether the target area satisfies each predetermined condition, and if any of the above determinations is satisfied, perform default-mode focusing, and if none of the above determinations is satisfied, perform default-mode focusing, that is, maintain a focusing result of non-default-mode focusing.
The default mode focusing refers to a focusing mode that can be performed without user intervention.
In the embodiment of the disclosure, a first preview image of which focusing in a non-default mode is completed in a viewfinder of a preset application is firstly obtained, a focusing area is obtained from the first preview image, a second preview image is further generated in the viewfinder according to a zooming instruction, a target area in the second preview image is obtained, shooting objects corresponding to the target area and the focusing area are the same as target objects, and finally when the target area meets a preset condition, focusing in the default mode is carried out on the second preview image. The method has the advantages that the area corresponding to the target object is always acquired in the zooming process, the preset condition is set for focusing in the default mode of the second preview image, and focusing in the default mode is selectively started according to the target area and the preset condition in the zooming result, so that focusing in the default mode can be accurately started, the focusing result of focusing in the non-default mode is prevented from being damaged by redundant focusing in the default mode, the focusing effect is improved, the focusing energy consumption is saved, the matching effect of zooming and focusing is further improved, and the shooting effect and the user experience are improved.
In some embodiments of the present disclosure, the target area meeting a predetermined condition may be: the proportion of the target area to the second preview image is less than a first proportion threshold.
The predetermined condition is that whether refocusing is needed is judged according to the intersection of the target area and the second preview image, and the intersection of the target area and the second preview image is the area where focusing is completed, so that the definition of the second preview image can be represented by taking the intersection as a judging condition, that is, the larger the area where focusing is completed, the clearer the second preview image is, the smaller the area where focusing is completed, and the more blurred the second preview image is.
The first proportional threshold may be automatically generated by the system or may be user-defined. For example, the first ratio threshold may be 50%, when the proportion of the target area to the second preview image is less than 50% (for example, the proportion of the target area to the second preview image is 20%, or the proportion of the target area to the second preview image is 0, that is, there is no target area corresponding to the target object in the second preview image), focusing is performed in a default manner on the second preview image, and when the proportion of the target area to the second preview image is greater than or equal to 50% (for example, the proportion of the target area to the second preview image is 70%), focusing is not performed in a default manner on the second preview image, that is, a result of focusing in a non-default manner is maintained.
In some embodiments of the present disclosure, the target area meeting a predetermined condition may be: the zoom ratio of the target area and the focusing area is larger than the zoom ratio threshold, wherein the zoom ratio threshold is determined according to the first preview image and the focusing area.
The zoom ratio is the size ratio of the shooting object in the second preview image to the corresponding shooting object in the first preview image, and can be obtained according to a zoom instruction or can be obtained by comparing a target area with a focusing area.
The zoom ratio threshold represents a critical value of a magnification factor by which the first preview image can maintain definition, that is, the magnification factor is lower than the critical value, the result of visual magnification is still a clear image, that is, an image which does not need to be focused, and the magnification factor is higher than or equal to the critical value, and the result of visual magnification is a blurred image, that is, an image which needs to be focused. Since the focusing area in the first preview image is an area where focusing is completed, the ratio of the focusing area has a certain influence on the sharpness, and the critical value, that is, the zoom ratio threshold, may be determined according to the ratio of the first preview image to the focusing area, for example, the larger the ratio is, the larger the zoom ratio threshold is, and the smaller the ratio is, the smaller the zoom ratio threshold is. In addition, in the zooming process, the shooting object corresponding to the preview image in the view frame can be enlarged or reduced by taking the center of the image as a base point, so that the proportion of the shooting object corresponding to the focusing area (namely the target object) remained in the view frame in the zooming process is also related to the distance from the shooting object to the center of the first preview image, and therefore, the zooming ratio threshold value can be further determined according to the proportion of the focusing area to the first preview image and the distance between the focusing area and the center of the first preview image, and the accuracy of the zooming ratio threshold value can be further improved.
In the embodiment of the disclosure, the zoom ratio is used as a condition for judging whether to focus in a default mode, and the zoom ratio threshold is determined based on the focusing area, so that the definition of the second preview image after zooming can be accurately determined, and whether to refocus is further determined.
In some embodiments of the disclosure, the target region comprises a focal sub-region and a non-focal sub-region; based on this, the target area satisfying the predetermined condition may be: the ratio of the non-focal sub-region to the target region is greater than a second ratio threshold.
The focusing subarea is a focusing finishing area, and the non-focusing subarea is an unfinished focusing area, namely the definition of the focusing subarea is high, and the definition of the non-focusing subarea is low. Therefore, the proportion of the target area occupied by the non-focusing sub-area can represent the keeping effect of the focusing result of the focusing area, that is, the lower the proportion is, the better the keeping effect of the focusing result of the focusing area is, and the higher the proportion is, the worse the keeping effect of the focusing result of the focusing area is; therefore, the proportion is very accurate as a condition for judging the definition of the second preview image, and whether the second preview image needs refocusing or not can be accurately determined.
In some embodiments of the present disclosure, the focus area of the first preview image may be acquired as follows: firstly, determining a shooting object aimed by the non-default focusing instruction as a target object; and then, determining the area in the target frame corresponding to the target object as the focusing area.
The non-default focusing instruction may be a focusing instruction determined according to a touch operation, so that a shooting object targeted by the non-default focusing instruction may be a shooting object targeted by the touch operation, for example, a user may click on a shooting object (such as a person, an object, etc.) in the preview image, so as to generate a focusing instruction with the shooting object as a target object.
In this embodiment, the boundary of each object in the image may be determined by determining the pixel value of each pixel of the first preview image, so that each object may be identified, and further, the shooting object for which the non-default focusing instruction is directed may be determined as the target object from the plurality of objects; the target frame may be a minimum frame capable of framing the target object, for example, a rectangular frame, please refer to fig. 4, which illustrates a relationship between the target object and the target frame, wherein the small tortoise 402 in the first preview image 401 is the target object, and the target frame 403 is the minimum rectangular frame capable of framing the small tortoise 402. The area in the target frame for framing the target object is used as the focusing area, so that convenience can be provided for judging the preset condition related to the focusing area, and the accuracy of judgment can be improved.
In some embodiments of the present disclosure, the preset application has a plurality of modes; the default manner may be: and determining a focusing mode according to the current running mode of the preset application.
The preset application does not only have a default focusing mode, but has different focusing modes in different modes, so that focusing can be performed in a targeted manner, the focusing effect of the default mode is improved, and for example, the definition of an image focused by the default mode is improved.
Optionally, the preset application is a camera, and the camera has at least one mode of an image acquisition mode, a video recording mode and a preset object mode; furthermore, the default mode when the preset application runs the image acquisition mode and the video recording mode may be: focusing mode with the center of the image as the focusing point; the default manner when the preset application runs the preset object mode may be: focusing mode with preset object as focusing point. The preset object mode can be combined with an image acquisition mode, namely applied to a shooting scene, and can be combined with a video recording mode, namely applied to a video recording scene; for example, the portrait mode of the camera is a form of the preset object mode, and the default focusing mode in the portrait mode is portrait focusing, that is, a focusing mode taking the portrait as a focusing center; for another example, the two-dimensional code scanning mode is also a form of the preset object mode, and the default focusing mode in the two-dimensional code scanning mode is two-dimensional code focusing, that is, the focusing mode taking the two-dimensional code as the focusing center.
Referring to fig. 5, according to a second aspect of the embodiments of the present disclosure, there is provided a focusing device, applied to a terminal device, including:
a first obtaining module 501, configured to obtain a focusing area of a first preview image in a viewfinder of a preset application, where the first preview image is a preview image focused in a non-default manner, and a shooting object corresponding to the focusing area is a target object;
a second obtaining module 502, configured to generate a second preview image in the viewfinder according to a zoom instruction based on the first preview image, and determine a target area of the second preview image, where a shooting object corresponding to the target area is the target object;
and a focusing module 503, configured to perform default focusing on the second preview image in response to the target area meeting a predetermined condition.
In some embodiments of the present disclosure, the target area satisfies a predetermined condition, including:
the proportion of the target area to the second preview image is less than a first proportion threshold.
In some embodiments of the present disclosure, the target area satisfies a predetermined condition, including:
the zoom ratio of the target area and the focusing area is smaller than the zoom ratio threshold, wherein the zoom ratio threshold is determined according to the first preview image and the focusing area.
In some embodiments of the present disclosure, the zoom ratio threshold is determined according to a ratio of the focus area to the first preview image and a distance of the focus area from a center of the first preview image.
In some embodiments of the disclosure, the target region comprises a focal sub-region and a non-focal sub-region;
the target area satisfies a predetermined condition, including:
the ratio of the non-focal sub-region to the target region is greater than a second ratio threshold.
In some embodiments of the present disclosure, the non-default mode focus is triggered by a non-default focus instruction;
the first obtaining module is specifically configured to:
determining a shooting object aimed by the non-default focusing instruction as the target object;
and determining the region in the target frame corresponding to the target object as the focusing region.
In some embodiments of the present disclosure, the non-default focus instructions include: a focusing instruction determined according to the touch operation;
the shooting object aimed by the non-default focusing instruction comprises: and the touch operation is aimed at the shooting object.
In some embodiments of the present disclosure, the preset application has a plurality of modes; the default mode comprises the following steps: and determining a focusing mode according to the current running mode of the preset application.
In some embodiments of the present disclosure, the preset application has at least one of an image acquisition mode, a video recording mode, and a preset object mode;
the default mode when the preset application runs the image acquisition mode and the video recording mode comprises the following steps: focusing mode with the center of the image as the focusing point;
the default mode when the preset application runs the preset object mode comprises the following steps: focusing mode with preset object as focusing point.
The specific manner in which the various modules perform the operations in relation to the apparatus of the above embodiments has been described in detail in relation to the embodiments of the method of the first aspect and will not be described in detail here.
In accordance with a fifth aspect of embodiments of the present disclosure, reference is made to fig. 6, which schematically illustrates a block diagram of an electronic device. For example, apparatus 600 may be a mobile phone, computer, digital broadcast terminal, messaging device, game console, tablet device, medical device, exercise device, personal digital assistant, or the like.
Referring to fig. 6, apparatus 600 may include one or more of the following components: a processing component 602, a memory 604, a power component 606, a multimedia component 608, an audio component 610, an input/output (I/O) interface 612, a sensor component 614, and a communication component 616.
The processing component 602 generally controls overall operation of the apparatus 600, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing element 602 may include one or more processors 620 to execute instructions to perform all or part of the steps of the methods described above. Further, the processing component 602 can include one or more modules that facilitate interaction between the processing component 602 and other components. For example, the processing component 602 may include a multimedia module to facilitate interaction between the multimedia component 608 and the processing component 602.
The memory 604 is configured to store various types of data to support operations at the device 600. Examples of such data include instructions for any application or method operating on the apparatus 600, contact data, phonebook data, messages, pictures, videos, and the like. The memory 604 may be implemented by any type or combination of volatile or nonvolatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
The power component 606 provides power to the various components of the device 600. The power components 606 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the device 600.
The multimedia component 608 includes a screen between the device 600 and the user that provides an output interface. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may sense not only the boundary of a touch or slide action, but also the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 608 includes a front camera and/or a rear camera. The front camera and/or the rear camera may receive external multimedia data when the apparatus 600 is in an operational mode, such as a photographing mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
The audio component 610 is configured to output and/or input audio signals. For example, the audio component 610 includes a Microphone (MIC) configured to receive external audio signals when the apparatus 600 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may be further stored in the memory 604 or transmitted via the communication component 616. In some embodiments, audio component 610 further includes a speaker for outputting audio signals.
The I/O interface 612 provides an interface between the processing component 602 and peripheral interface modules, which may be a keyboard, click wheel, buttons, etc. These buttons may include, but are not limited to: homepage button, volume button, start button, and lock button.
The sensor assembly 614 includes one or more sensors for providing status assessment of various aspects of the apparatus 600. For example, the sensor assembly 614 may detect the open/closed state of the device 600, the relative positioning of the components, such as the display and keypad of the device 600, the sensor assembly 614 may also detect a change in position of the device 600 or a component of the device 600, the presence or absence of user contact with the device 600, the orientation or acceleration/deceleration of the device 600, and a change in temperature of the device 600. The sensor assembly 614 may also include a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact. The sensor assembly 614 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 614 may also include an acceleration sensor, a gyroscopic sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 616 is configured to facilitate communication between the apparatus 600 and other devices in a wired or wireless manner. The device 600 may access a wireless network based on a communication standard, such as WiFi,2G or 3G,4G or 5G, or a combination thereof. In one exemplary embodiment, the communication part 616 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 616 further includes a Near Field Communication (NFC) module to facilitate short range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 600 may be implemented by 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, microcontrollers, microprocessors, or other electronic elements for performing the power supply methods of electronic devices described above.
In a sixth aspect, the present disclosure also provides, in an exemplary embodiment, a non-transitory computer-readable storage medium, such as memory 604, comprising instructions executable by processor 620 of apparatus 600 to perform the method of powering an electronic device described above. For example, the non-transitory computer readable storage medium may be ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any adaptations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (18)

1. A focusing method, applied to a terminal device, comprising:
acquiring a focusing area of a first preview image in a view-finding frame of a preset application, wherein the first preview image is a preview image focused in a non-default mode, and a shooting object corresponding to the focusing area is a target object;
generating a second preview image in the view-finding frame according to a zooming instruction based on the first preview image, and determining a target area of the second preview image, wherein a shooting object corresponding to the target area is the target object;
focusing the second preview image in a default mode in response to the target area meeting a predetermined condition;
the target area satisfies a predetermined condition, including:
the proportion of the target area to the second preview image is less than a first proportion threshold.
2. The focusing method according to claim 1, wherein the target area satisfies a predetermined condition, comprising:
the zoom ratio of the target area and the focusing area is larger than a zoom ratio threshold, wherein the zoom ratio threshold is determined according to the first preview image and the focusing area.
3. The focusing method according to claim 2, wherein the zoom ratio threshold is determined according to a ratio of the focusing area to the first preview image and a distance of the focusing area from a center of the first preview image.
4. The focusing method of claim 1, wherein the target region comprises a focal sub-region and a non-focal sub-region;
the target area satisfies a predetermined condition, including:
the ratio of the non-focal sub-region to the target region is greater than a second ratio threshold.
5. The focusing method according to any one of claims 1 to 4, characterized in that the non-default mode focusing is triggered by a non-default focusing instruction;
the acquiring the focusing area of the first preview image in the view-finding frame of the preset application comprises the following steps:
determining a shooting object aimed by the non-default focusing instruction as the target object;
and determining the region in the target frame corresponding to the target object as the focusing region.
6. The focusing method of claim 5, wherein the non-default focusing instruction comprises: a focusing instruction determined according to the touch operation;
the shooting object aimed by the non-default focusing instruction comprises: and the touch operation is aimed at the shooting object.
7. The focusing method according to any one of claims 1 to 4, characterized in that the preset application has a plurality of modes; the default mode comprises the following steps: and determining a focusing mode according to the current running mode of the preset application.
8. The focusing method of claim 7, wherein the preset application has at least one of an image acquisition mode, a video recording mode, and a preset image contrast mode;
the default mode when the preset application runs the image acquisition mode and the video recording mode comprises the following steps: focusing mode with the center of the image as the focusing point;
the default mode when the preset application runs the preset object mode comprises the following steps: focusing mode with preset object as focusing point.
9. A focusing device, characterized by being applied to a terminal device, comprising:
the first acquisition module is used for acquiring a focusing area of a first preview image in a view-finding frame of a preset application, wherein the first preview image is a preview image focused in a non-default mode, and a shooting object corresponding to the focusing area is a target object;
a second acquisition module, configured to generate a second preview image in the viewfinder according to a zoom instruction based on the first preview image, and determine a target area of the second preview image, where a shooting object corresponding to the target area is the target object;
the focusing module is used for focusing the second preview image in a default mode in response to the target area meeting a preset condition;
the target area satisfies a predetermined condition, including:
the proportion of the target area to the second preview image is less than a first proportion threshold.
10. The focusing device according to claim 9, wherein the target area satisfies a predetermined condition, comprising:
the zoom ratio of the target area and the focusing area is larger than a zoom ratio threshold, wherein the zoom ratio threshold is determined according to the first preview image and the focusing area.
11. The focusing device of claim 10, wherein the zoom ratio threshold is determined based on a ratio of the focus area to the first preview image and a distance of the focus area from a center of the first preview image.
12. The focusing device of claim 9, wherein the target region comprises a focusing sub-region and a non-focusing sub-region;
the target area satisfies a predetermined condition, including:
the ratio of the non-focal sub-region to the target region is greater than a second ratio threshold.
13. A focusing device according to any one of claims 9 to 12, wherein the non-default mode focusing is triggered by a non-default focusing instruction;
the first obtaining module is specifically configured to:
determining a shooting object aimed by the non-default focusing instruction as the target object;
and determining the region in the target frame corresponding to the target object as the focusing region.
14. The focusing device of claim 13, wherein the non-default focusing instruction comprises: a focusing instruction determined according to the touch operation;
the shooting object aimed by the non-default focusing instruction comprises: and the touch operation is aimed at the shooting object.
15. Focusing device according to one of the claims 9 to 12, characterized in that the preset application has a plurality of modes; the default mode comprises the following steps: and determining a focusing mode according to the current running mode of the preset application.
16. The focusing device of claim 15, wherein the preset application has at least one of an image acquisition mode, a video recording mode, and a portrait mode;
the default mode when the preset application runs the image acquisition mode and the video recording mode comprises the following steps: focusing mode with the center of the image as the focusing point;
the default mode when the preset application runs the preset object mode comprises the following steps: focusing mode with preset object as focusing point.
17. An electronic device comprising a memory, a processor for storing a computer executable program executable on the processor, the processor for executing the computer executable program based on the focusing method of any one of claims 1 to 8.
18. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method of any one of claims 1 to 8.
CN202011540490.6A 2020-12-23 2020-12-23 Focusing method, focusing device, electronic equipment and storage medium Active CN114666490B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011540490.6A CN114666490B (en) 2020-12-23 2020-12-23 Focusing method, focusing device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011540490.6A CN114666490B (en) 2020-12-23 2020-12-23 Focusing method, focusing device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114666490A CN114666490A (en) 2022-06-24
CN114666490B true CN114666490B (en) 2024-02-09

Family

ID=82024812

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011540490.6A Active CN114666490B (en) 2020-12-23 2020-12-23 Focusing method, focusing device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114666490B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116095477B (en) * 2022-08-16 2023-10-20 荣耀终端有限公司 Focusing processing system, method, equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104660913A (en) * 2015-03-18 2015-05-27 努比亚技术有限公司 Focus length adjusting method and device
CN106375595A (en) * 2016-10-17 2017-02-01 努比亚技术有限公司 Auxiliary focusing apparatus and method
CN107071273A (en) * 2017-03-01 2017-08-18 北京橙鑫数据科技有限公司 A kind of photographing instruction sending method and device
CN109495681A (en) * 2017-09-12 2019-03-19 天津三星通信技术研究有限公司 The method and apparatus for obtaining image
CN109618102A (en) * 2019-01-28 2019-04-12 Oppo广东移动通信有限公司 Focusing process method, apparatus, electronic equipment and storage medium
CN111050073A (en) * 2019-12-26 2020-04-21 维沃移动通信有限公司 Focusing method and electronic equipment
CN111277753A (en) * 2020-02-10 2020-06-12 Oppo广东移动通信有限公司 Focusing method and device, terminal equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104660913A (en) * 2015-03-18 2015-05-27 努比亚技术有限公司 Focus length adjusting method and device
CN106375595A (en) * 2016-10-17 2017-02-01 努比亚技术有限公司 Auxiliary focusing apparatus and method
CN107071273A (en) * 2017-03-01 2017-08-18 北京橙鑫数据科技有限公司 A kind of photographing instruction sending method and device
CN109495681A (en) * 2017-09-12 2019-03-19 天津三星通信技术研究有限公司 The method and apparatus for obtaining image
CN109618102A (en) * 2019-01-28 2019-04-12 Oppo广东移动通信有限公司 Focusing process method, apparatus, electronic equipment and storage medium
CN111050073A (en) * 2019-12-26 2020-04-21 维沃移动通信有限公司 Focusing method and electronic equipment
CN111277753A (en) * 2020-02-10 2020-06-12 Oppo广东移动通信有限公司 Focusing method and device, terminal equipment and storage medium

Also Published As

Publication number Publication date
CN114666490A (en) 2022-06-24

Similar Documents

Publication Publication Date Title
CN108419016B (en) Shooting method and device and terminal
EP3032821B1 (en) Method and device for shooting a picture
CN110557547B (en) Lens position adjusting method and device
WO2020042826A1 (en) Video stream denoising method and apparatus, electronic device and storage medium
EP3057304A1 (en) Method and apparatus for generating image filter
CN108462833B (en) Photographing method, photographing device and computer-readable storage medium
CN107341777B (en) Picture processing method and device
US11310443B2 (en) Video processing method, apparatus and storage medium
CN114666490B (en) Focusing method, focusing device, electronic equipment and storage medium
CN108596957B (en) Object tracking method and device
US11252341B2 (en) Method and device for shooting image, and storage medium
CN114422687B (en) Preview image switching method and device, electronic equipment and storage medium
CN114339019B (en) Focusing method, focusing device and storage medium
CN114430457B (en) Shooting method, shooting device, electronic equipment and storage medium
CN113315903B (en) Image acquisition method and device, electronic equipment and storage medium
CN111461950B (en) Image processing method and device
CN108366237B (en) Projection image adjusting method and device and computer readable storage medium
CN114071004A (en) Moon image acquisition method and device, electronic equipment and storage medium
CN107682623B (en) Photographing method and device
CN108769513B (en) Camera photographing method and device
CN114418865A (en) Image processing method, device, equipment and storage medium
CN114339018B (en) Method and device for switching lenses and storage medium
CN113766115B (en) Image acquisition method, mobile terminal, device and storage medium
EP3826282A1 (en) Image capturing method and device
CN117499776A (en) Shooting method, shooting device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant