CN107613204B - Focusing area adjusting method, terminal and computer storage medium - Google Patents

Focusing area adjusting method, terminal and computer storage medium Download PDF

Info

Publication number
CN107613204B
CN107613204B CN201710895517.5A CN201710895517A CN107613204B CN 107613204 B CN107613204 B CN 107613204B CN 201710895517 A CN201710895517 A CN 201710895517A CN 107613204 B CN107613204 B CN 107613204B
Authority
CN
China
Prior art keywords
area
region
target
sub
target region
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
CN201710895517.5A
Other languages
Chinese (zh)
Other versions
CN107613204A (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.)
Nubia Technology Co Ltd
Original Assignee
Nubia Technology 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 Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Priority to CN201710895517.5A priority Critical patent/CN107613204B/en
Publication of CN107613204A publication Critical patent/CN107613204A/en
Application granted granted Critical
Publication of CN107613204B publication Critical patent/CN107613204B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Studio Devices (AREA)

Abstract

The invention discloses a focusing area adjusting method, a terminal and a computer storage medium, wherein the method comprises the following steps: obtaining a size adjustment operation for a target area in a viewing interface; determining a scaling parameter corresponding to the target area based on the size adjustment operation of the target area; adjusting the target area from the first area range to the second area range based on the scaling parameter; determining a focusing area corresponding to the shot object in the target area, wherein the focusing area is used for focusing the shot object; the focusing speed is accelerated, and the focusing quality is also ensured.

Description

Focusing area adjusting method, terminal and computer storage medium
Technical Field
The invention relates to the technical field of camera shooting, in particular to a focusing area adjusting method, a focusing area adjusting terminal and a computing storage medium.
Background
With the development of the intelligent terminal, the performance of the camera on the intelligent terminal is better and better. In order to satisfy the pursuit of the user for high shooting effect, a Continuous Auto Focus (Continuous Auto Focus) function is provided in the camera, and a common Continuous Auto Focus scheme is as follows: detecting the change of ambient light, detecting the change of pose data of the camera, detecting the change of objects in a viewing interface, and triggering the camera to focus again when one or more of the three changes reach corresponding threshold values.
No matter what kind of change triggers refocusing, a measurement area (i.e., a focusing area) of continuous auto-focusing is an area in the center of the terminal screen, because the center area of the screen is the area where the subject is located when the user normally views and photographs.
However, the size of the central area of the screen may be far from the size of the object to be shot, for example, when a piece of hair or a needle point is shot, if the middle area with a preset size is still used, the amount of data calculation required for focusing is too large, and in addition, since the central area of the screen not only contains the object to be shot, but also contains more other objects, the object to be shot is still unclear after the central area of the screen is focused.
Disclosure of Invention
In order to solve the above technical problem, embodiments of the present invention provide a method and a terminal for adjusting a focus area, and a computer storage medium.
The method for adjusting the focusing area provided by the embodiment of the invention comprises the following steps:
obtaining a size adjustment operation for a target area in a viewing interface;
determining a scaling parameter corresponding to the target area based on the size adjustment operation of the target area;
adjusting the target area from a first area range to a second area range based on the scaling parameter;
and determining a focusing area corresponding to the shot object in the target area, wherein the focusing area is used for focusing the shot object.
In the embodiment of the invention, the area of each sub-region included in the target region before and after size adjustment is S, and S is a positive number; the number of the sub-regions included in the target region before the size adjustment is N1, and N1 is a positive integer;
the adjusting the target region from a first region range to a second region range based on the scaling parameter comprises:
determining the number of sub-regions included in the target region after the size of the target region is adjusted to be N2, wherein N2 is a positive integer different from N1;
adjusting the number of sub-regions included in the target region from the N1 to the N2 to achieve an adjustment of the target region from a first region range to a second region range.
In the embodiment of the invention, the number of the sub-regions included in the target region before and after size adjustment is N, wherein N is a positive integer; wherein the area of each sub-region included in the target region before the size adjustment is S1, and S1 is a positive number;
the adjusting the target region from a first region range to a second region range based on the scaling parameter comprises:
based on the scaling parameters, determining the area of each sub-region included after the size of the target region is adjusted to be S2, wherein S2 is a positive number different from S1;
adjusting the area of each sub-region included in the target region from the S1 to the S2, so as to adjust the target region from a first region range to a second region range.
In the embodiment of the present invention, the number of sub-regions included in the target region before size adjustment is N1, where N1 is a positive integer, the area of each sub-region included in the target region before size adjustment is S1, and S1 is a positive number;
the adjusting the target region from a first region range to a second region range based on the scaling parameter comprises:
based on the scaling parameters, determining that the number of sub-regions included in the target region after being subjected to size adjustment is N2, and determining that the area of each sub-region included in the target region after being subjected to size adjustment is S2, wherein N2 is a positive integer different from N1, and S2 is a positive number different from S1;
adjusting the number of sub-regions included in the target region from the N1 to the N2, and adjusting the area of each sub-region included in the target region from the S1 to the S2, so as to adjust the target region from a first region range to a second region range.
In an embodiment of the present invention, the determining a focusing area corresponding to a subject in the target area includes:
and selecting M sub-regions from the target region based on the position of the subject in the target region, and taking the region range formed by the M sub-regions as a focusing region, wherein the target region comprises N or N2 sub-regions after size adjustment, and M is a positive integer less than or equal to N or N2.
In this embodiment of the present invention, if the size adjustment operation is a zoom-out operation, the area of the first region range is larger than the area of the second region;
if the size adjustment operation is a zoom-in operation, the area of the first region range is smaller than the area of the second region.
The terminal provided by the embodiment of the invention comprises:
the camera is used for carrying out image acquisition on the view area to obtain a view interface;
input means for obtaining a size adjustment operation for a target area in a viewing interface;
a memory for storing an adjustment program of a focusing area;
a processor for executing an adjustment program of the focusing area in the memory to realize the following operations:
determining a scaling parameter corresponding to the target area based on the size adjustment operation of the target area;
adjusting the target area from a first area range to a second area range based on the scaling parameter;
and determining a focusing area corresponding to the shot object in the target area, wherein the focusing area is used for focusing the shot object.
In the embodiment of the invention, the area of each sub-region included in the target region before and after size adjustment is S, and S is a positive number; the number of the sub-regions included in the target region before the size adjustment is N1, and N1 is a positive integer;
the processor is further configured to execute an adjustment procedure of the focusing area in the memory to implement the following operations:
determining the number of sub-regions included in the target region after the size of the target region is adjusted to be N2, wherein N2 is a positive integer different from N1;
adjusting the number of sub-regions included in the target region from the N1 to the N2 to achieve an adjustment of the target region from a first region range to a second region range.
In the embodiment of the invention, the number of the sub-regions included in the target region before and after size adjustment is N, wherein N is a positive integer; wherein the area of each sub-region included in the target region before the size adjustment is S1, and S1 is a positive number;
the processor is further configured to execute an adjustment procedure of the focusing area in the memory to implement the following operations:
based on the scaling parameters, determining the area of each sub-region included after the size of the target region is adjusted to be S2, wherein S2 is a positive number different from S1;
adjusting the area of each sub-region included in the target region from the S1 to the S2, so as to adjust the target region from a first region range to a second region range.
In the embodiment of the present invention, the number of sub-regions included in the target region before size adjustment is N1, where N1 is a positive integer, the area of each sub-region included in the target region before size adjustment is S1, and S1 is a positive number;
the processor is further configured to execute an adjustment procedure of the focusing area in the memory to implement the following operations:
based on the scaling parameters, determining that the number of sub-regions included in the target region after being subjected to size adjustment is N2, and determining that the area of each sub-region included in the target region after being subjected to size adjustment is S2, wherein N2 is a positive integer different from N1, and S2 is a positive number different from S1;
adjusting the number of sub-regions included in the target region from the N1 to the N2, and adjusting the area of each sub-region included in the target region from the S1 to the S2, so as to adjust the target region from a first region range to a second region range.
In an embodiment of the present invention, the processor is further configured to execute an adjustment program of the focusing area in the memory to implement the following operations:
and selecting M sub-regions from the target region based on the position of the subject in the target region, and taking the region range formed by the M sub-regions as a focusing region, wherein the target region comprises N or N2 sub-regions after size adjustment, and M is a positive integer less than or equal to N or N2.
In this embodiment of the present invention, if the size adjustment operation is a zoom-out operation, the area of the first region range is larger than the area of the second region;
if the size adjustment operation is a zoom-in operation, the area of the first region range is smaller than the area of the second region.
The computer storage medium provided by the embodiment of the present invention stores one or more programs, and the one or more programs can be executed by one or more processors to implement the method for adjusting the focusing area as described in the claims.
According to the technical scheme of the embodiment of the invention, the size adjustment operation aiming at the target area in the viewing interface is obtained; determining a scaling parameter corresponding to the target area based on the size adjustment operation of the target area; adjusting the target area from a first area range to a second area range based on the scaling parameter; and determining a focusing area corresponding to the shot object in the target area, wherein the focusing area is used for focusing the shot object. By adopting the technical scheme of the embodiment of the invention, the size of the target area in the viewing interface is adjusted through the size adjustment operation, and the focusing area is a part of the target area, so that the size of the current shot object can be dynamically adapted through the adjustment of the size of the target area, the mode of self-defining the size of the focusing area can reduce unnecessary calculation amount in the focusing processing process, accelerate the focusing speed and ensure the focusing quality.
Drawings
Fig. 1 is a schematic diagram of a hardware structure of an optional mobile terminal for implementing various embodiments of the present invention;
fig. 2 is a diagram of a communication network system architecture according to an embodiment of the present invention;
FIG. 3 is a first schematic view of a viewing interface of a camera according to an embodiment of the present invention;
FIG. 4 is a first flowchart illustrating a method for adjusting a focus area according to an embodiment of the present invention;
FIG. 5 is a second schematic view of a viewing interface of a camera according to an embodiment of the present invention;
FIG. 6 is a third schematic view of a viewing interface of a camera according to an embodiment of the invention;
FIG. 7 is a first schematic diagram illustrating adjustment of a target area according to an embodiment of the present invention;
FIG. 8 is a second flowchart illustrating a method for adjusting a focus area according to an embodiment of the present invention;
FIG. 9 is a second schematic diagram of adjusting the target area according to an embodiment of the present invention;
FIG. 10 is a third flowchart illustrating a method for adjusting a focus area according to an embodiment of the present invention;
FIG. 11 is a third schematic diagram illustrating adjustment of a target area according to an embodiment of the present invention;
FIG. 12 is a fourth flowchart illustrating a method for adjusting a focus area according to an embodiment of the present invention;
fig. 13 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for facilitating the explanation of the present invention, and have no specific meaning in itself. Thus, "module", "component" or "unit" may be used mixedly.
The terminal may be implemented in various forms. For example, the terminal described in the present invention may include a mobile terminal such as a mobile phone, a tablet computer, a notebook computer, a palmtop computer, a Personal Digital Assistant (PDA), a Portable Media Player (PMP), a navigation device, a wearable device, a smart band, a pedometer, and the like, and a fixed terminal such as a Digital TV, a desktop computer, and the like.
The following description will be given by way of example of a mobile terminal, and it will be understood by those skilled in the art that the construction according to the embodiment of the present invention can be applied to a fixed type terminal, in addition to elements particularly used for mobile purposes.
Referring to fig. 1, which is a schematic diagram of a hardware structure of a mobile terminal for implementing various embodiments of the present invention, the mobile terminal 100 may include: RF (Radio Frequency) unit 101, WiFi module 102, audio output unit 103, a/V (audio/video) input unit 104, sensor 105, display unit 106, user input unit 107, interface unit 108, memory 109, processor 110, and power supply 111. Those skilled in the art will appreciate that the mobile terminal architecture shown in fig. 1 is not intended to be limiting of mobile terminals, which may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The following describes each component of the mobile terminal in detail with reference to fig. 1:
the radio frequency unit 101 may be configured to receive and transmit signals during information transmission and reception or during a call, and specifically, receive downlink information of a base station and then process the downlink information to the processor 110; in addition, the uplink data is transmitted to the base station. Typically, radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 101 can also communicate with a network and other devices through wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System for Mobile communications), GPRS (General Packet Radio Service), CDMA2000(Code Division Multiple Access 2000), WCDMA (Wideband Code Division Multiple Access), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access), FDD-LTE (Frequency Division duplex-Long Term Evolution), and TDD-LTE (Time Division duplex-Long Term Evolution).
WiFi belongs to short-distance wireless transmission technology, and the mobile terminal can help a user to receive and send e-mails, browse webpages, access streaming media and the like through the WiFi module 102, and provides wireless broadband internet access for the user. Although fig. 1 shows the WiFi module 102, it is understood that it does not belong to the essential constitution of the mobile terminal, and may be omitted entirely as needed within the scope not changing the essence of the invention.
The audio output unit 103 may convert audio data received by the radio frequency unit 101 or the WiFi module 102 or stored in the memory 109 into an audio signal and output as sound when the mobile terminal 100 is in a call signal reception mode, a call mode, a recording mode, a voice recognition mode, a broadcast reception mode, or the like. Also, the audio output unit 103 may also provide audio output related to a specific function performed by the mobile terminal 100 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 103 may include a speaker, a buzzer, and the like.
The a/V input unit 104 is used to receive audio or video signals. The a/V input Unit 104 may include a Graphics Processing Unit (GPU) 1041 and a microphone 1042, the Graphics processor 1041 Processing image data of still pictures or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 106. The image frames processed by the graphic processor 1041 may be stored in the memory 109 (or other storage medium) or transmitted via the radio frequency unit 101 or the WiFi module 102. The microphone 1042 may receive sounds (audio data) via the microphone 1042 in a phone call mode, a recording mode, a voice recognition mode, or the like, and may be capable of processing such sounds into audio data. The processed audio (voice) data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 101 in case of a phone call mode. The microphone 1042 may implement various types of noise cancellation (or suppression) algorithms to cancel (or suppress) noise or interference generated in the course of receiving and transmitting audio signals.
The mobile terminal 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 1061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 1061 and/or a backlight when the mobile terminal 100 is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when stationary, and can be used for applications of recognizing the posture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured on the mobile phone, further description is omitted here.
The display unit 106 is used to display information input by a user or information provided to the user. The Display unit 106 may include a Display panel 1061, and the Display panel 1061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 107 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the mobile terminal. Specifically, the user input unit 107 may include a touch panel 1071 and other input devices 1072. The touch panel 1071, also referred to as a touch screen, may collect a touch operation performed by a user on or near the touch panel 1071 (e.g., an operation performed by the user on or near the touch panel 1071 using a finger, a stylus, or any other suitable object or accessory), and drive a corresponding connection device according to a predetermined program. The touch panel 1071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 110, and can receive and execute commands sent by the processor 110. In addition, the touch panel 1071 may be implemented in various types, such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 1071, the user input unit 107 may include other input devices 1072. In particular, other input devices 1072 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like, and are not limited to these specific examples.
Further, the touch panel 1071 may cover the display panel 1061, and when the touch panel 1071 detects a touch operation thereon or nearby, the touch panel 1071 transmits the touch operation to the processor 110 to determine the type of the touch event, and then the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of the touch event. Although the touch panel 1071 and the display panel 1061 are shown in fig. 1 as two separate components to implement the input and output functions of the mobile terminal, in some embodiments, the touch panel 1071 and the display panel 1061 may be integrated to implement the input and output functions of the mobile terminal, and is not limited herein.
The interface unit 108 serves as an interface through which at least one external device is connected to the mobile terminal 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 108 may be used to receive input (e.g., data information, power, etc.) from external devices and transmit the received input to one or more elements within the mobile terminal 100 or may be used to transmit data between the mobile terminal 100 and external devices.
The memory 109 may be used to store software programs as well as various data. The memory 109 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 109 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 110 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by operating or executing software programs and/or modules stored in the memory 109 and calling data stored in the memory 109, thereby performing overall monitoring of the mobile terminal. Processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 110.
The mobile terminal 100 may further include a power supply 111 (e.g., a battery) for supplying power to various components, and preferably, the power supply 111 may be logically connected to the processor 110 via a power management system, so as to manage charging, discharging, and power consumption management functions via the power management system.
Although not shown in fig. 1, the mobile terminal 100 may further include a bluetooth module or the like, which is not described in detail herein.
In order to facilitate understanding of the embodiments of the present invention, a communication network system on which the mobile terminal of the present invention is based is described below.
Referring to fig. 2, fig. 2 is an architecture diagram of a communication Network system according to an embodiment of the present invention, where the communication Network system is an LTE system of a universal mobile telecommunications technology, and the LTE system includes a UE (User Equipment) 201, an E-UTRAN (Evolved UMTS Terrestrial Radio Access Network) 202, an EPC (Evolved Packet Core) 203, and an IP service 204 of an operator, which are in communication connection in sequence.
Specifically, the UE201 may be the terminal 100 described above, and is not described herein again.
The E-UTRAN202 includes eNodeB2021 and other eNodeBs 2022, among others. Among them, the eNodeB2021 may be connected with other eNodeB2022 through backhaul (e.g., X2 interface), the eNodeB2021 is connected to the EPC203, and the eNodeB2021 may provide the UE201 access to the EPC 203.
The EPC203 may include an MME (Mobility Management Entity) 2031, an HSS (Home Subscriber Server) 2032, other MMEs 2033, an SGW (Serving gateway) 2034, a PGW (PDN gateway) 2035, and a PCRF (Policy and charging functions Entity) 2036, and the like. The MME2031 is a control node that handles signaling between the UE201 and the EPC203, and provides bearer and connection management. HSS2032 is used to provide registers to manage functions such as home location register (not shown) and holds subscriber specific information about service characteristics, data rates, etc. All user data may be sent through SGW2034, PGW2035 may provide IP address assignment for UE201 and other functions, and PCRF2036 is a policy and charging control policy decision point for traffic data flow and IP bearer resources, which selects and provides available policy and charging control decisions for a policy and charging enforcement function (not shown).
The IP services 204 may include the internet, intranets, IMS (IP Multimedia Subsystem), or other IP services, among others.
Although the LTE system is described as an example, it should be understood by those skilled in the art that the present invention is not limited to the LTE system, but may also be applied to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA, and future new network systems.
Based on the above mobile terminal hardware structure and communication network system, the present invention provides various embodiments of the method.
Fig. 3 is a schematic view of a viewing interface of a camera according to an embodiment of the present invention, as shown in fig. 3, a measurement area (i.e., a focusing area) where the camera performs continuous auto-focusing is a part of a central area of a screen, where the central area of the screen is also referred to as a target area, and the area of the central area occupies 1/4 of the whole screen, and assuming that the target area is a, in some scenarios, the size (i.e., the area size) of the target area needs to be adjusted, for example: when a user shoots a hair or a needle point, if the area of the target area is still A, all pixel points in A need to be calculated, and therefore the final focusing process is achieved. However, when focusing on a fine object, the calculation amount of the focusing process can be reduced by adjusting the area of the target region, so as to improve the focusing speed and efficiency. As shown in fig. 3, the area of a is larger than a, that is, the area of the target region is reduced from a to a by one kind of interaction operation, and the area of the target region is enlarged from a to a by another kind of interaction operation. The technical scheme of the embodiment of the invention is not limited to the scene of reducing the target area, and is also suitable for the scene of amplifying the target area.
Fig. 4 is a first flowchart illustrating a method for adjusting a focus area according to an embodiment of the present invention, as shown in fig. 4, the method for adjusting a focus area includes the following steps:
step 401: a size adjustment operation for a target area in a viewing interface is obtained.
The technical scheme of the embodiment of the invention is applied to the terminal, the terminal can be a mobile phone, a tablet computer, a palm computer, a game machine and other equipment, and the terminal is provided with a camera. In addition, the technical scheme of the embodiment of the invention can also be applied to single camera equipment.
In the embodiment of the present invention, an area shot by a camera is referred to as a viewing area, and when a scene in the viewing area is displayed on a screen, a picture on the screen is referred to as a viewing interface, so that the viewing interface corresponds to the viewing area, that is: the viewfinder interface is a picture that the viewfinder area presents on the screen.
In the embodiment of the present invention, it is assumed that the size of the viewing interface is consistent with the size of the terminal screen, and of course, the size of the viewing interface may also be smaller than the size of the terminal screen, that is: the viewing interface occupies a portion of the screen. In order to distinguish the subject and the background of the viewing interface, and considering that the subject is generally located in the central area of the viewing interface, the central area of the viewing interface is taken as a target area, which is also the subject area. In one embodiment, the target area occupies 1/4 of the viewing interface, although the size and location of the target area is not limited thereto.
In the embodiment of the present invention, since the size of the subject may be much smaller than the target area or much larger than the target area, the size of the target area is adjusted to adaptively focus the subject.
In the embodiment of the present invention, the size adjustment of the target area is performed based on the size adjustment operation, and here, the size adjustment operation includes two types, one is a zoom-in adjustment operation and the other is a zoom-out adjustment operation. In one embodiment, the zoom-in adjustment operation or the zoom-out adjustment operation may be implemented by a gesture, such as: the pinch operation is performed through the two fingers to achieve the zoom-out adjustment operation, the separation operation is performed through the two fingers to achieve the zoom-in adjustment operation, and the pinch or separation distance of the fingers represents the zoom-out or zoom-in degree. For another example: the zoom-out adjustment operation is realized by sliding one finger upward, and the zoom-in adjustment operation is realized by sliding one finger downward, wherein the distance of the upward or downward sliding of the finger represents the degree of zoom-out or zoom-in.
It should be understood by those skilled in the art that the implementation manner of the zoom-in adjustment operation or the zoom-out adjustment operation of the embodiments of the present invention is not limited thereto, and may be implemented in other manners, such as long pressing the left direction key to implement the zoom-in adjustment operation, and long pressing the right direction key to implement the zoom-out adjustment operation.
Step 402: and determining a scaling parameter corresponding to the target area based on the size adjustment operation of the target area.
In the embodiment of the invention, the scaling parameter corresponding to the target area can be determined based on the size adjustment operation of the target area. Here, the operation attribute in the resizing operation characterizes the scaling parameter.
In one embodiment, the zoom-out adjustment operation is performed by a pinch operation with two fingers, and the zoom-in adjustment operation is performed by a separation operation with two fingers, the distance of pinch or separation of the fingers representing a zoom-out parameter or a zoom-in parameter.
In another embodiment, the zoom-out adjustment operation is performed by sliding one finger upward and the zoom-in adjustment operation is performed by sliding one finger downward, the distance by which the finger slides upward or downward being indicative of the zoom-out parameter or the zoom-in parameter.
In another embodiment, the zoom-in adjustment operation is performed by long pressing the left direction key, the zoom-out adjustment operation is performed by long pressing the right direction key, and the pressing duration of the left direction key or the right direction key represents the zoom-in parameter or the zoom-out parameter.
In a specific application, assuming that the scaling parameter is E, the area of the target region before size adjustment is a, and the area of the target region after size adjustment is a, the following relationship holds:
a=E×A
when E is larger than 0 and smaller than 1, the target area is reduced from A to a; when E is larger than 1, the target area is enlarged from A to a.
Step 403: based on the scaling parameter, the target area is adjusted from a first area range to a second area range.
In the embodiment of the present invention, assuming that the range before the size adjustment of the target region is the first region range (corresponding to the area a), the scaling parameter may be adjusted from the original first region range to the second region range based on the scaling parameter. Here, the second region range (corresponding to the area a) is a range in which the size of the target region is adjusted.
In this embodiment of the present invention, the area range (e.g., the first area range and the second area range) of the target area may be represented by pixel coordinates of the display screen, and taking the first area range as an example, the first area range may be represented by (x1, y1) and (x2, y2), where (x1, y1) represents coordinates of an upper left corner of the first area range, and (x2, y2) represents coordinates of a lower right corner of the first area range. Similarly, the second region range may be characterized by (x3, y3) and (x4, y4), where (x3, y3) represents the coordinates of the upper left corner of the second region range and (x4, y4) represents the coordinates of the lower right corner of the second region range.
In the embodiment of the invention, the area range of the target area is adjusted based on the scaling parameter, which is represented by that the area of the target area is adjusted from large to small or from small to large.
Step 404: and determining a focusing area corresponding to the shot object in the target area, wherein the focusing area is used for focusing the shot object.
In the embodiment of the invention, the target area is thinned because the proportion of the shot object in the target area is small. Specifically, the target area is divided into N sub-areas. In one embodiment, each of the N sub-regions is the same size. In another embodiment, each of the N sub-regions is of a different size or a different size for a portion of the sub-regions.
Fig. 5 is a second schematic view of a view interface of a camera according to an embodiment of the present invention, as shown in fig. 5, an 1/4 area (i.e., a target area) in the center of the view interface is divided into 25 sub-areas of 5 × 5 (i.e., N ═ 25). It should be understood by those skilled in the art that the division of the target area is not limited to the manner shown in fig. 5, and may be divided in other manners.
After the size of the target area is adjusted, the target area may further include N sub-areas, or may include N2 sub-areas different from N, based on which, based on the position of the subject in the target area, M sub-areas are selected from the target area, and an area range formed by the M sub-areas is used as a focusing area, wherein the target area includes N or N2 sub-areas after the size adjustment, and M is a positive integer less than or equal to N or N2. Here, the M selected sub-regions are regions where the subject is located.
As shown in fig. 6, the target region includes 25 sub-regions after being adjusted in size. Assuming that the subject is located at the upper right corner of the target area in the viewing interface, 4 sub-areas located at the upper right corner (i.e., M is 4) are selected from the N sub-areas as the focus area.
In an application scene, acquiring depth information of each object in the target area; and determining a shot object in the target area based on the depth information of each object in the target area, and determining the position of the shot object in the target area.
In another application scene, performing feature extraction on the image corresponding to the target area to obtain feature parameters; and determining a shot object in the target area based on the extracted characteristic parameters, and determining the position of the shot object in the target area.
Therefore, if the range of the target area is small, the calculation of large-area depth information or characteristic parameters and the processing of the information are not needed, so that the calculation amount is greatly reduced, and the focusing speed is accelerated.
The technical solution of the embodiments of the present invention is further described below with reference to specific application examples.
Example 1
As shown in fig. 7, the area of each sub-region included in the target region before and after the size adjustment is S, where S is a positive number; wherein the number of sub-regions included before the size adjustment of the target region is N1-25, and N1 is a positive integer.
As shown in fig. 8, the method for adjusting a focusing area according to an embodiment of the present invention includes the following steps:
step 801: a size adjustment operation for a target area in a viewing interface is obtained.
The technical scheme of the embodiment of the invention is applied to the terminal, the terminal can be a mobile phone, a tablet computer, a palm computer, a game machine and other equipment, and the terminal is provided with a camera. In addition, the technical scheme of the embodiment of the invention can also be applied to single camera equipment.
In the embodiment of the present invention, an area shot by a camera is referred to as a viewing area, and when a scene in the viewing area is displayed on a screen, a picture on the screen is referred to as a viewing interface, so that the viewing interface corresponds to the viewing area, that is: the viewfinder interface is a picture that the viewfinder area presents on the screen.
In the embodiment of the present invention, it is assumed that the size of the viewing interface is consistent with the size of the terminal screen, and of course, the size of the viewing interface may also be smaller than the size of the terminal screen, that is: the viewing interface occupies a portion of the screen. In order to distinguish the subject and the background of the viewing interface, and considering that the subject is generally located in the central area of the viewing interface, the central area of the viewing interface is taken as a target area, which is also the subject area. In one embodiment, the target area occupies 1/4 of the viewing interface, although the size and location of the target area is not limited thereto.
In the embodiment of the present invention, since the size of the subject may be much smaller than the target area or much larger than the target area, the size of the target area is adjusted to adaptively focus the subject.
Step 802: and determining a scaling parameter corresponding to the target area based on the size adjustment operation of the target area.
In the embodiment of the invention, the scaling parameter corresponding to the target area can be determined based on the size adjustment operation of the target area. Here, the operation attribute in the resizing operation characterizes the scaling parameter.
In one embodiment, the zoom-out adjustment operation is performed by a pinch operation with two fingers, and the zoom-in adjustment operation is performed by a separation operation with two fingers, the distance of pinch or separation of the fingers representing a zoom-out parameter or a zoom-in parameter.
In another embodiment, the zoom-out adjustment operation is performed by sliding one finger upward and the zoom-in adjustment operation is performed by sliding one finger downward, the distance by which the finger slides upward or downward being indicative of the zoom-out parameter or the zoom-in parameter.
In another embodiment, the zoom-in adjustment operation is performed by long pressing the left direction key, the zoom-out adjustment operation is performed by long pressing the right direction key, and the pressing duration of the left direction key or the right direction key represents the zoom-in parameter or the zoom-out parameter.
In a specific application, assuming that the scaling parameter is E, the area of the target region before size adjustment is a, and the area of the target region after size adjustment is a, the following relationship holds:
a=E×A
when E is larger than 0 and smaller than 1, the target area is reduced from A to a; when E is larger than 1, the target area is enlarged from A to a.
Step 803: based on the scaling parameter, the number of sub-regions included after the target region is subjected to size adjustment is determined to be N2, and N2 is a positive integer different from N1.
In the embodiment of the invention, the area range of the target area is adjusted based on the scaling parameter, which is represented by that the area of the target area is adjusted from large to small or from small to large.
In the embodiment of the present invention, the number of sub-regions included in the target region is adjusted, that is, the number of sub-regions included in the target region is adjusted from N1 to N2.
Here, since a is N1 × S and a is N2 × S, N2 × S is E × N1 × S, that is, the following formula is satisfied:
N2=E×N1
it can be seen that based on the number of sub-regions included in the target region N1 and the scaling parameter E, the number of sub-regions included in the adjusted target region N2 can be determined.
Step 804: adjusting the number of sub-regions included in the target region from the N1 to the N2 to achieve an adjustment of the target region from a first region range to a second region range.
Step 805: and determining a focusing area corresponding to the shot object in the target area, wherein the focusing area is used for focusing the shot object.
In the embodiment of the invention, the target area is thinned because the proportion of the shot object in the target area is small. Specifically, the target area is divided into N sub-areas. In one embodiment, each of the N sub-regions is the same size. In another embodiment, each of the N sub-regions is of a different size or a different size for a portion of the sub-regions.
After the size of the target area is adjusted, N2 sub-areas are included in the target area, based on the result, M sub-areas are selected from the target area based on the position of the shot object in the target area, and the area range formed by the M sub-areas is used as a focusing area, wherein M is a positive integer less than or equal to N2. Here, the M selected sub-regions are regions where the subject is located.
In an application scene, acquiring depth information of each object in the target area; and determining a shot object in the target area based on the depth information of each object in the target area, and determining the position of the shot object in the target area.
In another application scene, performing feature extraction on the image corresponding to the target area to obtain feature parameters; and determining a shot object in the target area based on the extracted characteristic parameters, and determining the position of the shot object in the target area.
Therefore, if the range of the target area is small, the calculation of large-area depth information or characteristic parameters and the processing of the information are not needed, so that the calculation amount is greatly reduced, and the focusing speed is accelerated.
Example two
As shown in fig. 9, the number of sub-regions included in the target region before and after size adjustment is N, where N is a positive integer; wherein the area of each sub-region included in the target region before the size adjustment is S1, and S1 is a positive number.
As shown in fig. 10, the method for adjusting a focusing area according to an embodiment of the present invention includes the following steps:
step 1001: a size adjustment operation for a target area in a viewing interface is obtained.
The technical scheme of the embodiment of the invention is applied to the terminal, the terminal can be a mobile phone, a tablet computer, a palm computer, a game machine and other equipment, and the terminal is provided with a camera. In addition, the technical scheme of the embodiment of the invention can also be applied to single camera equipment.
In the embodiment of the present invention, an area shot by a camera is referred to as a viewing area, and when a scene in the viewing area is displayed on a screen, a picture on the screen is referred to as a viewing interface, so that the viewing interface corresponds to the viewing area, that is: the viewfinder interface is a picture that the viewfinder area presents on the screen.
In the embodiment of the present invention, it is assumed that the size of the viewing interface is consistent with the size of the terminal screen, and of course, the size of the viewing interface may also be smaller than the size of the terminal screen, that is: the viewing interface occupies a portion of the screen. In order to distinguish the subject and the background of the viewing interface, and considering that the subject is generally located in the central area of the viewing interface, the central area of the viewing interface is taken as a target area, which is also the subject area. In one embodiment, the target area occupies 1/4 of the viewing interface, although the size and location of the target area is not limited thereto.
In the embodiment of the present invention, since the size of the subject may be much smaller than the target area or much larger than the target area, the size of the target area is adjusted to adaptively focus the subject.
Step 1002: and determining a scaling parameter corresponding to the target area based on the size adjustment operation of the target area.
In the embodiment of the invention, the scaling parameter corresponding to the target area can be determined based on the size adjustment operation of the target area. Here, the operation attribute in the resizing operation characterizes the scaling parameter.
In one embodiment, the zoom-out adjustment operation is performed by a pinch operation with two fingers, and the zoom-in adjustment operation is performed by a separation operation with two fingers, the distance of pinch or separation of the fingers representing a zoom-out parameter or a zoom-in parameter.
In another embodiment, the zoom-out adjustment operation is performed by sliding one finger upward and the zoom-in adjustment operation is performed by sliding one finger downward, the distance by which the finger slides upward or downward being indicative of the zoom-out parameter or the zoom-in parameter.
In another embodiment, the zoom-in adjustment operation is performed by long pressing the left direction key, the zoom-out adjustment operation is performed by long pressing the right direction key, and the pressing duration of the left direction key or the right direction key represents the zoom-in parameter or the zoom-out parameter.
In a specific application, assuming that the scaling parameter is E, the area of the target region before size adjustment is a, and the area of the target region after size adjustment is a, the following relationship holds:
a=E×A
when E is larger than 0 and smaller than 1, the target area is reduced from A to a; when E is larger than 1, the target area is enlarged from A to a.
Step 1003: based on the scaling parameters, the area of each sub-region included after the size of the target region is adjusted is determined to be S2, and S2 is a positive number different from S1.
In the embodiment of the invention, the area range of the target area is adjusted based on the scaling parameter, which is represented by that the area of the target area is adjusted from large to small or from small to large.
In the embodiment of the present invention, the area of the sub-region included in the target region is adjusted, that is, the area of the sub-region included in the target region is adjusted from S1 to S2.
Here, since a is N × S1 and a is N × S2, N × S2 is E × N × S1, that is, the following formula is satisfied:
S2=E×S1
as can be seen, based on the area S1 of the sub-region included in the target region and the scaling parameter E, the area S2 of the sub-region included in the adjusted target region can be determined.
Step 1004: adjusting the area of each sub-region included in the target region from the S1 to the S2, so as to adjust the target region from a first region range to a second region range.
Step 1005: and determining a focusing area corresponding to the shot object in the target area, wherein the focusing area is used for focusing the shot object.
In the embodiment of the invention, the target area is thinned because the proportion of the shot object in the target area is small. Specifically, the target area is divided into N sub-areas. In one embodiment, each of the N sub-regions is the same size. In another embodiment, each of the N sub-regions is of a different size or a different size for a portion of the sub-regions.
After the size of the target area is adjusted, N2 sub-areas are included in the target area, based on the result, M sub-areas are selected from the target area based on the position of the shot object in the target area, and the area range formed by the M sub-areas is used as a focusing area, wherein M is a positive integer less than or equal to N2. Here, the M selected sub-regions are regions where the subject is located.
In an application scene, acquiring depth information of each object in the target area; and determining a shot object in the target area based on the depth information of each object in the target area, and determining the position of the shot object in the target area.
In another application scene, performing feature extraction on the image corresponding to the target area to obtain feature parameters; and determining a shot object in the target area based on the extracted characteristic parameters, and determining the position of the shot object in the target area.
Therefore, if the range of the target area is small, the calculation of large-area depth information or characteristic parameters and the processing of the information are not needed, so that the calculation amount is greatly reduced, and the focusing speed is accelerated.
Example three
As shown in fig. 11, the number of sub-regions included in the target region before size adjustment is N1, N1 is a positive integer, and the area of each sub-region included in the target region before size adjustment is S1, and S1 is a positive number.
As shown in fig. 12, the method for adjusting the focusing area according to the embodiment of the present invention includes the following steps:
step 1201: a size adjustment operation for a target area in a viewing interface is obtained.
The technical scheme of the embodiment of the invention is applied to the terminal, the terminal can be a mobile phone, a tablet computer, a palm computer, a game machine and other equipment, and the terminal is provided with a camera. In addition, the technical scheme of the embodiment of the invention can also be applied to single camera equipment.
In the embodiment of the present invention, an area shot by a camera is referred to as a viewing area, and when a scene in the viewing area is displayed on a screen, a picture on the screen is referred to as a viewing interface, so that the viewing interface corresponds to the viewing area, that is: the viewfinder interface is a picture that the viewfinder area presents on the screen.
In the embodiment of the present invention, it is assumed that the size of the viewing interface is consistent with the size of the terminal screen, and of course, the size of the viewing interface may also be smaller than the size of the terminal screen, that is: the viewing interface occupies a portion of the screen. In order to distinguish the subject and the background of the viewing interface, and considering that the subject is generally located in the central area of the viewing interface, the central area of the viewing interface is taken as a target area, which is also the subject area. In one embodiment, the target area occupies 1/4 of the viewing interface, although the size and location of the target area is not limited thereto.
In the embodiment of the present invention, since the size of the subject may be much smaller than the target area or much larger than the target area, the size of the target area is adjusted to adaptively focus the subject.
Step 1202: and determining a scaling parameter corresponding to the target area based on the size adjustment operation of the target area.
In the embodiment of the invention, the scaling parameter corresponding to the target area can be determined based on the size adjustment operation of the target area. Here, the operation attribute in the resizing operation characterizes the scaling parameter.
In one embodiment, the zoom-out adjustment operation is performed by a pinch operation with two fingers, and the zoom-in adjustment operation is performed by a separation operation with two fingers, the distance of pinch or separation of the fingers representing a zoom-out parameter or a zoom-in parameter.
In another embodiment, the zoom-out adjustment operation is performed by sliding one finger upward and the zoom-in adjustment operation is performed by sliding one finger downward, the distance by which the finger slides upward or downward being indicative of the zoom-out parameter or the zoom-in parameter.
In another embodiment, the zoom-in adjustment operation is performed by long pressing the left direction key, the zoom-out adjustment operation is performed by long pressing the right direction key, and the pressing duration of the left direction key or the right direction key represents the zoom-in parameter or the zoom-out parameter.
In a specific application, assuming that the scaling parameter is E, the area of the target region before size adjustment is a, and the area of the target region after size adjustment is a, the following relationship holds:
a=E×A
when E is larger than 0 and smaller than 1, the target area is reduced from A to a; when E is larger than 1, the target area is enlarged from A to a.
Step 1203: based on the scaling parameters, the number of sub-regions included in the target region after being subjected to size adjustment is determined to be N2, the area of each sub-region included in the target region after being subjected to size adjustment is determined to be S2, N2 is a positive integer different from N1, and S2 is a positive number different from S1.
In the embodiment of the invention, the area range of the target area is adjusted based on the scaling parameter, which is represented by that the area of the target area is adjusted from large to small or from small to large.
In the embodiment of the present invention, the number and the area of the sub-regions included in the target region are simultaneously adjusted, that is, the number of the sub-regions included in the target region is adjusted from N2 to N2, and the area of the sub-regions is adjusted from S1 to S2.
Here, since a is N1 × S1 and a is N2 × S2, N2 × S2 is E × N1 × S1, that is, the following formula holds:
E=(N2×S2)/(N1×S1)
in the embodiment of the present invention, since the number and the area of the sub-regions included in the target region are adjusted at the same time, another setting operation may be obtained, and the adjustment amounts respectively corresponding to the number and the area are determined based on the setting operation, for example: the number corresponds to the adjustment amount E1, the area corresponds to the adjustment amount E2, E1 × E2 — E, then N2 — E1 × N1, and S2 — E2 × N1.
In the embodiment of the invention, the adjusting quantities corresponding to the number and the area can be set by default, so that the terminal can automatically adjust the number and the area according to the adjusting quantities corresponding to the number and the area.
Step 1204: adjusting the number of sub-regions included in the target region from the N1 to the N2, and adjusting the area of each sub-region included in the target region from the S1 to the S2, so as to adjust the target region from a first region range to a second region range.
Step 1205: and determining a focusing area corresponding to the shot object in the target area, wherein the focusing area is used for focusing the shot object.
In the embodiment of the invention, the target area is thinned because the proportion of the shot object in the target area is small. Specifically, the target area is divided into N sub-areas. In one embodiment, each of the N sub-regions is the same size. In another embodiment, each of the N sub-regions is of a different size or a different size for a portion of the sub-regions.
After the size of the target area is adjusted, N2 sub-areas are included in the target area, based on the result, M sub-areas are selected from the target area based on the position of the shot object in the target area, and the area range formed by the M sub-areas is used as a focusing area, wherein M is a positive integer less than or equal to N2. Here, the M selected sub-regions are regions where the subject is located.
In an application scene, acquiring depth information of each object in the target area; and determining a shot object in the target area based on the depth information of each object in the target area, and determining the position of the shot object in the target area.
In another application scene, performing feature extraction on the image corresponding to the target area to obtain feature parameters; and determining a shot object in the target area based on the extracted characteristic parameters, and determining the position of the shot object in the target area.
Therefore, if the range of the target area is small, the calculation of large-area depth information or characteristic parameters and the processing of the information are not needed, so that the calculation amount is greatly reduced, and the focusing speed is accelerated.
Fig. 13 is a schematic structural composition diagram of a terminal according to an embodiment of the present invention, and as shown in fig. 13, the terminal includes:
the camera 1301 is used for acquiring images of a view finding area to obtain a view finding interface;
an input device 1302 for obtaining a size adjustment operation for a target area in a viewfinder interface;
a memory 1303 for storing an adjustment program of the focusing area;
a processor 1304 for executing an adjustment program of the focusing area in the memory to implement the following operations:
determining a scaling parameter corresponding to the target area based on the size adjustment operation of the target area;
adjusting the target area from a first area range to a second area range based on the scaling parameter;
and determining a focusing area corresponding to the shot object in the target area, wherein the focusing area is used for focusing the shot object.
In the embodiment of the invention, the area of each sub-region included in the target region before and after size adjustment is S, and S is a positive number; the number of the sub-regions included in the target region before the size adjustment is N1, and N1 is a positive integer;
the processor 1304 is further configured to execute an adjustment procedure of the focusing area in the memory to:
determining the number of sub-regions included in the target region after the size of the target region is adjusted to be N2, wherein N2 is a positive integer different from N1;
adjusting the number of sub-regions included in the target region from the N1 to the N2 to achieve an adjustment of the target region from a first region range to a second region range.
In the embodiment of the invention, the number of the sub-regions included in the target region before and after size adjustment is N, wherein N is a positive integer; wherein the area of each sub-region included in the target region before the size adjustment is S1, and S1 is a positive number;
the processor 1304 is further configured to execute an adjustment procedure of the focusing area in the memory to:
based on the scaling parameters, determining the area of each sub-region included after the size of the target region is adjusted to be S2, wherein S2 is a positive number different from S1;
adjusting the area of each sub-region included in the target region from the S1 to the S2, so as to adjust the target region from a first region range to a second region range.
In the embodiment of the present invention, the number of sub-regions included in the target region before size adjustment is N1, where N1 is a positive integer, the area of each sub-region included in the target region before size adjustment is S1, and S1 is a positive number;
the processor 1304 is further configured to execute an adjustment procedure of the focusing area in the memory to:
based on the scaling parameters, determining that the number of sub-regions included in the target region after being subjected to size adjustment is N2, and determining that the area of each sub-region included in the target region after being subjected to size adjustment is S2, wherein N2 is a positive integer different from N1, and S2 is a positive number different from S1;
adjusting the number of sub-regions included in the target region from the N1 to the N2, and adjusting the area of each sub-region included in the target region from the S1 to the S2, so as to adjust the target region from a first region range to a second region range.
In this embodiment of the present invention, the processor 1304 is further configured to execute an adjustment program of the focusing area in the memory to implement the following operations:
and selecting M sub-regions from the target region based on the position of the subject in the target region, and taking the region range formed by the M sub-regions as a focusing region, wherein the target region comprises N or N2 sub-regions after size adjustment, and M is a positive integer less than or equal to N or N2.
In this embodiment of the present invention, if the size adjustment operation is a zoom-out operation, the area of the first region range is larger than the area of the second region;
if the size adjustment operation is a zoom-in operation, the area of the first region range is smaller than the area of the second region.
It will be appreciated by those skilled in the art that the functions of the various components of the terminal in the embodiments of the present invention can be understood with reference to the foregoing description of the method for adjusting the focus area.
In the embodiment of the present invention, if the terminal is implemented in the form of a software functional module and sold or used as an independent product, the terminal may also be stored in a computer-readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present invention may be essentially implemented or a part contributing to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read Only Memory (ROM), a magnetic disk, or an optical disk. Thus, embodiments of the invention are not limited to any specific combination of hardware and software.
Accordingly, an embodiment of the present invention further provides a computer storage medium, in which a computer program is stored, the computer program being configured to execute the method for adjusting a focus area according to the embodiment of the present invention.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (10)

1. A method for adjusting a focus area, the method comprising:
obtaining a size adjustment operation for a target area in a viewing interface;
determining a scaling parameter corresponding to the target region based on the size adjustment operation of the target region, wherein the scaling parameter is the ratio of the area of the target region after the size adjustment operation to the area of the target region before the size adjustment operation;
adjusting the target area from a first area range to a second area range based on the scaling parameter;
and determining a focusing area corresponding to the shot object in the target area, wherein the focusing area is used for focusing the shot object.
2. The method for adjusting a focusing area according to claim 1, wherein the area of each sub-area included in the target area before and after the size adjustment is S, S being a positive number; the number of the sub-regions included in the target region before the size adjustment is N1, and N1 is a positive integer;
the adjusting the target region from a first region range to a second region range based on the scaling parameter comprises:
determining the number of sub-regions included in the target region after the size of the target region is adjusted to be N2, wherein N2 is a positive integer different from N1;
adjusting the number of sub-regions included in the target region from the N1 to the N2 to achieve an adjustment of the target region from a first region range to a second region range.
3. The method for adjusting the focusing area according to claim 1, wherein the number of the sub-areas included in the target area before and after the size adjustment is N, N being a positive integer; wherein the area of each sub-region included in the target region before the size adjustment is S1, and S1 is a positive number;
the adjusting the target region from a first region range to a second region range based on the scaling parameter comprises:
based on the scaling parameters, determining the area of each sub-region included after the size of the target region is adjusted to be S2, wherein S2 is a positive number different from S1;
adjusting the area of each sub-region included in the target region from the S1 to the S2, so as to adjust the target region from a first region range to a second region range.
4. The method for adjusting a focusing area according to claim 1, wherein the number of sub-areas included in the target area before the size adjustment is N1, N1 is a positive integer, and the area of each sub-area included in the target area before the size adjustment is S1, S1 is a positive number;
the adjusting the target region from a first region range to a second region range based on the scaling parameter comprises:
based on the scaling parameters, determining that the number of sub-regions included in the target region after being subjected to size adjustment is N2, and determining that the area of each sub-region included in the target region after being subjected to size adjustment is S2, wherein N2 is a positive integer different from N1, and S2 is a positive number different from S1;
adjusting the number of sub-regions included in the target region from the N1 to the N2, and adjusting the area of each sub-region included in the target region from the S1 to the S2, so as to adjust the target region from a first region range to a second region range.
5. The method for adjusting the focusing area according to any one of claims 1 to 4, wherein the determining the focusing area corresponding to the subject in the target area comprises:
and selecting M sub-regions from the target region based on the position of the subject in the target region, and taking the region range formed by the M sub-regions as a focusing region, wherein the target region comprises N or N2 sub-regions after size adjustment, and M is a positive integer less than or equal to N or N2.
6. The method for adjusting a focusing area according to any one of claims 1 to 4,
if the size adjustment operation is a reduction operation, the area of the first region range is larger than that of the second region;
if the size adjustment operation is a zoom-in operation, the area of the first region range is smaller than the area of the second region.
7. A terminal, characterized in that the terminal comprises:
the camera is used for carrying out image acquisition on the view area to obtain a view interface;
input means for obtaining a size adjustment operation for a target area in a viewing interface;
a memory for storing an adjustment program of a focusing area;
a processor for executing an adjustment program of the focusing area in the memory to realize the following operations:
determining a scaling parameter corresponding to the target region based on the size adjustment operation of the target region, wherein the scaling parameter is the ratio of the area of the target region after the size adjustment operation to the area of the target region before the size adjustment operation;
adjusting the target area from a first area range to a second area range based on the scaling parameter;
and determining a focusing area corresponding to the shot object in the target area, wherein the focusing area is used for focusing the shot object.
8. The terminal according to claim 7, wherein the area of each sub-region included in the target region before and after the size adjustment is S, and S is a positive number; the number of the sub-regions included in the target region before the size adjustment is N1, and N1 is a positive integer;
the processor is further configured to execute an adjustment procedure of the focusing area in the memory to implement the following operations:
determining the number of sub-regions included in the target region after the size of the target region is adjusted to be N2, wherein N2 is a positive integer different from N1;
adjusting the number of sub-regions included in the target region from the N1 to the N2 to achieve an adjustment of the target region from a first region range to a second region range.
9. The terminal according to claim 7, wherein the number of sub-regions included in the target region before and after size adjustment is N, where N is a positive integer; wherein the area of each sub-region included in the target region before the size adjustment is S1, and S1 is a positive number;
the processor is further configured to execute an adjustment procedure of the focusing area in the memory to implement the following operations:
based on the scaling parameters, determining the area of each sub-region included after the size of the target region is adjusted to be S2, wherein S2 is a positive number different from S1;
adjusting the area of each sub-region included in the target region from the S1 to the S2, so as to adjust the target region from a first region range to a second region range.
10. A computer storage medium, characterized in that the computer storage medium stores one or more programs executable by one or more processors to implement the method steps of any of claims 1 to 6.
CN201710895517.5A 2017-09-28 2017-09-28 Focusing area adjusting method, terminal and computer storage medium Active CN107613204B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710895517.5A CN107613204B (en) 2017-09-28 2017-09-28 Focusing area adjusting method, terminal and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710895517.5A CN107613204B (en) 2017-09-28 2017-09-28 Focusing area adjusting method, terminal and computer storage medium

Publications (2)

Publication Number Publication Date
CN107613204A CN107613204A (en) 2018-01-19
CN107613204B true CN107613204B (en) 2020-08-28

Family

ID=61059334

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710895517.5A Active CN107613204B (en) 2017-09-28 2017-09-28 Focusing area adjusting method, terminal and computer storage medium

Country Status (1)

Country Link
CN (1) CN107613204B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110771147A (en) * 2018-08-01 2020-02-07 深圳市大疆创新科技有限公司 Method for adjusting parameters of shooting device, control equipment and shooting system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004242010A (en) * 2003-02-05 2004-08-26 Minolta Co Ltd Imaging apparatus
CN101241222A (en) * 2007-02-08 2008-08-13 佳能株式会社 Focus adjusting device, image pickup apparatus, and focus adjustment method
CN105573016A (en) * 2015-12-21 2016-05-11 浙江大学 Adjustment method and adjustment system for automatic focusing window
CN106254855A (en) * 2016-08-25 2016-12-21 锐马(福建)电气制造有限公司 A kind of three-dimensional modeling method based on zoom range finding and system
CN106961552A (en) * 2017-03-27 2017-07-18 联想(北京)有限公司 One kind focusing control method and electronic equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9282235B2 (en) * 2014-05-30 2016-03-08 Apple Inc. Focus score improvement by noise correction

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004242010A (en) * 2003-02-05 2004-08-26 Minolta Co Ltd Imaging apparatus
CN101241222A (en) * 2007-02-08 2008-08-13 佳能株式会社 Focus adjusting device, image pickup apparatus, and focus adjustment method
CN105573016A (en) * 2015-12-21 2016-05-11 浙江大学 Adjustment method and adjustment system for automatic focusing window
CN106254855A (en) * 2016-08-25 2016-12-21 锐马(福建)电气制造有限公司 A kind of three-dimensional modeling method based on zoom range finding and system
CN106961552A (en) * 2017-03-27 2017-07-18 联想(北京)有限公司 One kind focusing control method and electronic equipment

Also Published As

Publication number Publication date
CN107613204A (en) 2018-01-19

Similar Documents

Publication Publication Date Title
CN109701266B (en) Game vibration method, device, mobile terminal and computer readable storage medium
CN108196750B (en) Screen interface screenshot method and device and computer-readable storage medium
CN107948530B (en) Image processing method, terminal and computer readable storage medium
CN107613208B (en) Focusing area adjusting method, terminal and computer storage medium
CN108234876B (en) Tracking focusing method, terminal and computer readable storage medium
CN110086993B (en) Image processing method, image processing device, mobile terminal and computer readable storage medium
CN109471579B (en) Terminal screen information layout adjustment method and device, mobile terminal and storage medium
CN110187808B (en) Dynamic wallpaper setting method and device and computer-readable storage medium
CN107450796B (en) A kind of image processing method, mobile terminal and computer readable storage medium
CN111885307B (en) Depth-of-field shooting method and device and computer readable storage medium
CN108184052A (en) A kind of method of video record, mobile terminal and computer readable storage medium
CN109062465A (en) A kind of application program launching method, mobile terminal and storage medium
CN109672822A (en) A kind of method for processing video frequency of mobile terminal, mobile terminal and storage medium
CN111324407A (en) Animation display method, terminal and computer readable storage medium
CN107241504B (en) Image processing method, mobile terminal and computer readable storage medium
CN110278481B (en) Picture-in-picture implementation method, terminal and computer readable storage medium
CN110052024B (en) Game vibration adjusting method, adjusting device, mobile terminal and storage medium
CN108848298B (en) Picture shooting method, flexible terminal and computer readable storage medium
CN108282608B (en) Multi-region focusing method, mobile terminal and computer readable storage medium
CN112135060B (en) Focusing processing method, mobile terminal and computer storage medium
CN112437472B (en) Network switching method, equipment and computer readable storage medium
CN112135045A (en) Video processing method, mobile terminal and computer storage medium
CN112153305A (en) Camera starting method, mobile terminal and computer storage medium
CN109561221B (en) Call control method, device and computer readable storage medium
CN107743204B (en) Exposure processing method, terminal, and computer-readable 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