CN106131403B - Touch focusing method and device - Google Patents

Touch focusing method and device Download PDF

Info

Publication number
CN106131403B
CN106131403B CN201610509407.6A CN201610509407A CN106131403B CN 106131403 B CN106131403 B CN 106131403B CN 201610509407 A CN201610509407 A CN 201610509407A CN 106131403 B CN106131403 B CN 106131403B
Authority
CN
China
Prior art keywords
focusing
contrast value
value
area
contrast
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
CN201610509407.6A
Other languages
Chinese (zh)
Other versions
CN106131403A (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 CN201610509407.6A priority Critical patent/CN106131403B/en
Publication of CN106131403A publication Critical patent/CN106131403A/en
Application granted granted Critical
Publication of CN106131403B publication Critical patent/CN106131403B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/62Control of parameters via user interfaces
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Studio Devices (AREA)

Abstract

The disclosure relates to a touch focusing method and device, and belongs to the technical field of electronics. The method comprises the following steps: receiving a touch operation acting on a preview screen; drawing n focusing areas by taking the action position of the touch operation as a center, wherein the area of each focusing area in the n focusing areas is unequal, and n is more than or equal to 2; and focusing according to the n focusing areas. The method and the device can draw at least two focusing areas by taking the action position of the touch operation as the center, and solve the problem that when only one focusing area is drawn, if the focusing area is too small, enough contrast value cannot be obtained from the focusing area, so that focusing cannot be performed; if the focusing area is large, the foreground object can be ignored, the background object can be focused, the focusing is not accurate, and the effect of improving the success rate and accuracy of focusing is achieved.

Description

Touch focusing method and device
Technical Field
The present disclosure relates to the field of electronic technologies, and in particular, to a touch focusing method and apparatus.
Background
With the popularization of video cameras, more and more users use video cameras to take pictures. The user may need to adjust the focal distance during shooting, wherein the touch focusing mode is increasingly popular with the user.
A touch focusing method provided in the related art includes: the user selects an focusing point on the shooting picture, the terminal forms a focusing area by taking the focusing point as the center, the contrast value in the focusing area is counted, and focusing is carried out according to the counted contrast value.
Disclosure of Invention
To solve the problems in the related art, the present disclosure provides a touch focusing method and apparatus.
According to a first aspect of embodiments of the present disclosure, there is provided a touch focusing method, the method including:
displaying a preview picture of a picture to be shot by a camera;
receiving a touch operation acting on the preview picture;
drawing n focusing areas by taking the action position of the touch operation as a center, wherein the area of each focusing area in the n focusing areas is different, and n is more than or equal to 2;
and focusing according to the n focusing areas.
Optionally, when n is 2 and the area of the first focusing region is greater than the area of the second focusing region, performing focusing according to the n focusing regions includes:
respectively calculating a first contrast value of the first focusing area and a second contrast value of the second focusing area, wherein the first contrast value is used for representing the brightness contrast degree of the object in the first focusing area, and the second contrast value is used for representing the brightness contrast degree of the object in the second focusing area;
and determining to focus the first focusing area or the second focusing area according to the first contrast value and the second contrast value.
Optionally, the determining to focus the first focusing region or the second focusing region according to the first contrast value and the second contrast value includes:
detecting whether the absolute value of the difference between the first peak contrast value and the second peak contrast value is smaller than a first threshold value and whether the absolute value of the difference between the first average contrast value and the second average contrast value is smaller than a second threshold value;
determining to focus the second focusing region when an absolute value of a difference between the first peak contrast value and the second peak contrast value is smaller than a first threshold value and an absolute value of a difference between the first average contrast value and the second average contrast value is smaller than a second threshold value.
Optionally, the method further includes:
when the absolute value of the difference value of the first peak contrast value and the second peak contrast value is larger than the first threshold value, determining to focus the first focusing area; or,
determining to focus the first focusing region when an absolute value of a difference between the first average contrast value and the second average contrast value is greater than the second threshold value.
Optionally, an object in the first focus region is a background object, and an object in the second focus region is a foreground object.
According to a second aspect of the embodiments of the present disclosure, there is provided a touch focusing apparatus, the apparatus comprising:
a picture display module configured to display a preview picture of a picture to be photographed by the camera;
an operation receiving module configured to receive a touch operation acting on the preview screen displayed by the screen display module;
the area drawing module is configured to draw n focusing areas by taking the action position of the touch operation received by the operation receiving module as a center, the area of each focusing area in the n focusing areas is unequal, and n is larger than or equal to 2;
a focusing module configured to focus according to the n focusing regions drawn by the region drawing module.
Optionally, when n is 2 and the area of the first focusing region is greater than the area of the second focusing region, the focusing module includes:
a contrast value calculation sub-module configured to calculate a first contrast value of the first focusing area and a second contrast value of the second focusing area, respectively, the first contrast value being used for representing a brightness contrast degree of an object in the first focusing area, the second contrast value being used for representing a brightness contrast degree of an object in the second focusing area;
a first focusing submodule configured to determine to focus the first focusing area or the second focusing area according to the first contrast value and the second contrast value calculated by the contrast value calculation submodule.
Optionally, the first contrast value includes a first peak contrast value and a first average contrast value, the second contrast value includes a second peak contrast value and a second average contrast value, and the first focus submodule includes:
a numerical detection sub-module configured to detect whether an absolute value of a difference of the first and second peak contrast values is less than a first threshold value and whether an absolute value of a difference of the first and second average contrast values is less than a second threshold value;
a second focusing submodule configured to determine to focus the second focusing area when the result detected by the numerical detection submodule is that the absolute value of the difference between the first peak contrast value and the second peak contrast value is smaller than a first threshold value, and the absolute value of the difference between the first average contrast value and the second average contrast value is smaller than a second threshold value.
Optionally, the first focus sub-module further includes:
a third focusing sub-module configured to determine to focus the first focusing region when the absolute value of the difference between the first peak contrast value and the second peak contrast value is greater than the first threshold as a result of the detection by the numerical detection sub-module; or,
a fourth focusing sub-module configured to determine to focus the first focusing area when the result of the detection by the numerical detection sub-module is that the absolute value of the difference between the first contrast average and the second contrast average is greater than the second threshold.
Optionally, an object in the first focus region is a background object, and an object in the second focus region is a foreground object.
According to a third aspect of the embodiments of the present disclosure, there is provided a touch focusing apparatus, the apparatus comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
displaying a preview picture of a picture to be shot by a camera;
receiving a touch operation acting on the preview picture;
drawing n focusing areas by taking the action position of the touch operation as a center, wherein the area of each focusing area in the n focusing areas is different, and n is more than or equal to 2;
and focusing according to the n focusing areas.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
receiving a touch operation acting on a preview screen; drawing n focusing areas by taking the action position of the touch operation as a center, wherein the area of each focusing area in the n focusing areas is unequal, and n is more than or equal to 2; focusing is carried out according to the n focusing areas, at least two focusing areas can be drawn by taking the action position of the touch operation as the center, and the problem that when only one focusing area is drawn, if the focusing area is too small, enough contrast value cannot be obtained from the focusing area, so that focusing cannot be carried out is solved; if the focusing area is large, the foreground object can be ignored, the background object can be focused, the focusing is not accurate, and the effect of improving the success rate and accuracy of focusing is achieved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure.
FIG. 1 is a flow chart illustrating a touch focus method according to an exemplary embodiment.
FIG. 2A is a flowchart illustrating a touch focus method according to another exemplary embodiment.
Fig. 2B is a schematic diagram illustrating a preview screen according to another exemplary embodiment.
FIG. 2C is a schematic diagram illustrating a touch operation according to another exemplary embodiment.
FIG. 2D is a schematic diagram illustrating a focus area according to another exemplary embodiment.
FIG. 2E is a flow chart illustrating focusing according to a focusing area according to another exemplary embodiment.
FIG. 2F is a schematic diagram illustrating a first contrast value and a second contrast value according to another exemplary embodiment.
FIG. 3 is a block diagram illustrating a touch focus device according to an exemplary embodiment.
FIG. 4 is a block diagram illustrating a touch focus device according to an exemplary embodiment.
FIG. 5 is a block diagram illustrating an apparatus for touch focus according to an example embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Fig. 1 is a flowchart illustrating a touch focusing method applied to a terminal mounted with a camera according to an exemplary embodiment, and the touch focusing method includes the following steps, as shown in fig. 1.
In step 101, a preview screen of a screen to be captured by the camera is displayed.
After the terminal starts the camera and before the camera shoots, a picture displayed on an interface of the terminal is a preview picture of a picture to be shot by the camera.
In step 102, a touch operation applied to the preview screen is received.
The touch operation is an operation of manually focusing by a user's touch before shooting with a camera.
In step 103, n focusing areas are drawn with the action position of the touch operation as the center, the area of each focusing area in the n focusing areas is not equal, and n is not less than 2.
In step 104, focusing is performed according to the n focusing areas.
In summary, the touch focusing method provided by the present disclosure receives a touch operation applied to a preview screen; drawing n focusing areas by taking the action position of the touch operation as a center, wherein the area of each focusing area in the n focusing areas is unequal, and n is more than or equal to 2; focusing is carried out according to the n focusing areas, at least two focusing areas can be drawn by taking the action position of the touch operation as the center, and the problem that when only one focusing area is drawn, if the focusing area is too small, enough contrast value cannot be obtained from the focusing area, so that focusing cannot be carried out is solved; if the focusing area is large, the foreground object can be ignored, the background object can be focused, the focusing is not accurate, and the effect of improving the success rate and accuracy of focusing is achieved.
Fig. 2A is a flowchart illustrating a touch focusing method applied to a terminal mounted with a camera according to another exemplary embodiment, and the touch focusing method includes the following steps, as shown in fig. 2A.
In step 201, a preview screen of a screen to be captured by the camera is displayed.
After the terminal starts the camera and before the camera shoots, a picture displayed on an interface of the terminal is a preview picture of a picture to be shot by the camera. Referring to fig. 2B, a preview screen is displayed on the interface of the terminal in fig. 2B.
In step 202, a touch operation applied to the preview screen is received.
The touch operation is an operation of manually focusing by a user's touch before shooting with a camera. When the terminal receives a touch operation on the preview screen, step 203 is executed.
Referring to fig. 2C, the user touches the preview screen with a finger, and the terminal receives a touch operation.
In step 203, n focusing areas are drawn with the action position of the touch operation as the center, the area of each focusing area in the n focusing areas is not equal, and n is not less than 2.
The focus area is an area drawn with the action position of the touch operation as the center, and the focus area may be an area of any shape, for example, a square area, a rectangular area, a circular area, an irregular pattern area, and the like.
When the terminal draws a focusing area by taking the action position of the touch operation as the center, if the focusing area is too small, the terminal cannot acquire enough contrast value from the focusing area, so that focusing cannot be performed; if the focusing area is too large, the terminal ignores the foreground object and focuses on the background object, so that the focusing is inaccurate. Wherein the contrast value represents a brightness contrast degree of the object in the focusing area.
In order to solve the above problem, in this embodiment, the terminal draws n (n ≧ 2) focusing regions with the action position of the touch operation as the center, and the area of each focusing region is unequal, so that the terminal can perform accurate focusing according to the n focusing regions. The shapes of the focusing areas may be the same or different, and the embodiment is not limited.
When drawing each focusing area in the n focusing areas, the terminal can acquire coordinates of an action position of touch operation in the interface, determine coordinates of each vertex of the focusing area in the interface according to a preset algorithm and the coordinates of the action position, and draw the focusing area according to the coordinates of each vertex.
For example, when n is equal to 2, the terminal draws two focusing areas with different areas, which are referred to as a first focusing area and a second focusing area in this embodiment, and the area of the first focusing area is larger than that of the second focusing area, please refer to fig. 2D. The first focus area can count contrast values of objects in a larger range in the preview picture, and the second focus area can count contrast values of objects in a smaller range in the preview picture. Optionally, an object in the first focus region is a background object, and an object in the second focus region is a foreground object.
In step 204, when n is 2 and the area of the first focusing region is larger than the area of the second focusing region, a first contrast value of the first focusing region and a second contrast value of the second focusing region are respectively calculated, the first contrast value is used for indicating the brightness contrast degree of the object in the first focusing region, and the second contrast value is used for indicating the brightness contrast degree of the object in the second focusing region.
In the process of pushing the camera from far to near, the terminal may calculate the contrast value in each focusing region for multiple times, where the contrast value of the first focusing region is referred to as a first contrast value, and the contrast value of the second focusing region is referred to as a second contrast value in this embodiment.
Since the pushing distance of the camera is determined by the current of the terminal, and the larger the current is, the farther the pushing distance of the camera is, in this embodiment, the terminal may calculate the first contrast value and the second contrast value once when the current changes by a fixed magnitude.
In step 205, it is determined whether to focus the first focusing area or the second focusing area according to the first contrast value and the second contrast value.
The terminal may determine whether to focus the first focusing area or the second focusing area according to a change in the first contrast value and the second contrast value.
Referring to fig. 2E, the first contrast value includes a first peak contrast value and a first average contrast value, the second contrast value includes a second peak contrast value and a second average contrast value, and the determining whether to focus the first focusing area or the second focusing area according to the first contrast value and the second contrast value includes:
in step 2051, it is detected whether the absolute value of the difference between the first and second peak contrast values is less than a first threshold value and whether the absolute value of the difference between the first and second average contrast values is less than a second threshold value.
The first peak contrast value is a maximum first contrast value among the first contrast values counted in the first focus region, and the first average value is a quotient obtained by dividing the sum of all the first contrast values counted in the first focus region by the number of times the first contrast values are counted. The second peak contrast value is a largest second contrast value among the second contrast values counted in the second focus region, and the second average value is a quotient obtained by dividing the sum of all the second contrast values counted in the second focus region by the number of times the second contrast values are counted.
The terminal determines whether to focus the first focusing area or the second focusing area based on a magnitude relationship between the first peak contrast value and the second peak contrast value and a magnitude relationship between the first average contrast value and the second average contrast value.
In step 2052, it is determined to focus the second focus area when the absolute value of the difference between the first and second peak contrast values is less than the first threshold value and the absolute value of the difference between the first and second average contrast values is less than the second threshold value.
When the absolute value of the difference between the first peak contrast value and the second peak contrast value is smaller than the first threshold, and the absolute value of the difference between the first average contrast value and the second average contrast value is smaller than the second threshold, please refer to fig. 2F, which shows three examples of the relationship among the first peak contrast value, the second peak contrast value, the first average contrast value and the second average contrast value, which satisfy the above conditions, where the horizontal axis in fig. 2F is the distance from the camera to the object, the vertical axis is the contrast value in the focus area, the first contrast value is represented by a straight line, and the dashed line represents the second contrast value.
In a first example, in the process of pushing the camera from far to near, when an object with a higher contrast value exists in both the first focus region and the second focus region, a relatively obvious peak exists in a curve of the first contrast value in the first focus region, and the peak is a first contrast peak; a curve of the second contrast value in the second focus area has a more obvious peak, which is the second contrast peak, please refer to (1) in fig. 2F. When the absolute value of the difference between the first peak contrast value and the second peak contrast value is smaller than the first threshold value, and the absolute value of the difference between the first average contrast value and the second average contrast value is smaller than the second threshold value, the terminal determines to focus the second focusing area.
In a second example, in the process of pushing the camera from far to near, when an object with a higher contrast value does not exist in the first focus area, the first contrast value is generally smaller, and an object with a higher contrast value exists in the second focus area, the curve of the second contrast value in the first focus area is smoother; in the second focus area, there is a more obvious peak, which is the second contrast peak, please refer to (2) in fig. 2F. When the absolute value of the difference between the first peak contrast value and the second peak contrast value is smaller than the first threshold value, and the absolute value of the difference between the first average contrast value and the second average contrast value is smaller than the second threshold value, the terminal determines to focus the second focusing area.
In a third example, in the process of pushing the camera from far to near, when an object with a higher contrast value does not exist in the first focus area, the first contrast value is generally larger, and an object with a higher contrast value exists in the second focus area, the curve of the second contrast value in the first focus area is smoother; in the second focus area, there is a more obvious peak, which is the second contrast peak, please refer to (3) in fig. 2F. When the absolute value of the difference between the first peak contrast value and the second peak contrast value is smaller than the first threshold value, and the absolute value of the difference between the first average contrast value and the second average contrast value is smaller than the second threshold value, the terminal determines to focus the second focusing area.
In step 2053, it is determined to focus the first focusing area when the absolute value of the difference between the first peak contrast value and the second peak contrast value is greater than the first threshold value.
Referring to (4) in fig. 2F, in the fourth example, in the process of pushing the camera from far to near, when an object with a higher contrast value exists in the first focus region, an object with a higher contrast value does not exist in the second focus region, and the second contrast value is generally smaller, a relatively obvious peak exists in the first focus region, and the peak is the first contrast peak; the curve of the second contrast value in the second focus area is relatively flat. When the absolute value of the difference value between the first contrast peak value and the second contrast peak value is larger than a first threshold value, the terminal determines to focus the first focusing area.
In step 2054, it is determined to focus the first focus area when the absolute value of the difference between the first contrast average and the second contrast average is greater than a second threshold.
Step 2053 and step 2054 may be executed alternatively or both, and this embodiment is not limited.
In summary, the touch focusing method provided by the present disclosure receives a touch operation applied to a preview screen; drawing n focusing areas by taking the action position of the touch operation as a center, wherein the area of each focusing area in the n focusing areas is unequal, and n is more than or equal to 2; focusing is carried out according to the n focusing areas, at least two focusing areas can be drawn by taking the action position of the touch operation as the center, and the problem that when only one focusing area is drawn, if the focusing area is too small, enough contrast value cannot be obtained from the focusing area, so that focusing cannot be carried out is solved; if the focusing area is large, the foreground object can be ignored, the background object can be focused, the focusing is not accurate, and the effect of improving the success rate and accuracy of focusing is achieved.
Fig. 3 is a block diagram illustrating a touch focusing apparatus applied to a camera-mounted terminal according to an exemplary embodiment, as shown in fig. 3, the touch focusing apparatus including: a screen display module 310, an operation receiving module 320, a region drawing module 330, and a focusing module 440.
The screen display module 310 is configured to display a preview screen of a screen to be photographed by the camera;
the operation receiving module 320 configured to receive a touch operation applied to the preview screen displayed by the screen display module 310;
the region drawing module 330 is configured to draw n focusing regions with the action position of the touch operation received by the operation receiving module 320 as the center, wherein the area of each focusing region in the n focusing regions is not equal, and n is greater than or equal to 2;
the focusing module 340 is configured to focus according to the n focusing regions drawn by the region drawing module 330.
In summary, the touch focusing apparatus provided by the present disclosure receives a touch operation applied to a preview screen; drawing n focusing areas by taking the action position of the touch operation as a center, wherein the area of each focusing area in the n focusing areas is unequal, and n is more than or equal to 2; focusing is carried out according to the n focusing areas, at least two focusing areas can be drawn by taking the action position of the touch operation as the center, and the problem that when only one focusing area is drawn, if the focusing area is too small, enough contrast value cannot be obtained from the focusing area, so that focusing cannot be carried out is solved; if the focusing area is large, the foreground object can be ignored, the background object can be focused, the focusing is not accurate, and the effect of improving the success rate and accuracy of focusing is achieved.
Fig. 4 is a block diagram illustrating a touch focusing apparatus applied to a camera-mounted terminal according to an exemplary embodiment, as shown in fig. 4, the touch focusing apparatus including: a screen display module 410, an operation receiving module 420, a region drawing module 430 and a focusing module 440.
The screen display module 410 is configured to display a preview screen of a screen to be photographed by the camera;
the operation receiving module 420 configured to receive a touch operation applied to the preview screen displayed by the screen displaying module 410;
the region drawing module 430 is configured to draw n focusing regions with the action position of the touch operation received by the operation receiving module 420 as the center, the area of each focusing region in the n focusing regions is unequal, and n is greater than or equal to 2;
the focusing module 440 is configured to focus according to the n focusing regions drawn by the region drawing module 430.
Optionally, when n is 2 and the area of the first focusing region is greater than the area of the second focusing region, the focusing module 440 includes:
the contrast value calculating sub-module 441 is configured to calculate a first contrast value of the first focusing area and a second contrast value of the second focusing area, respectively, where the first contrast value is used to represent a brightness contrast degree of an object in the first focusing area, and the second contrast value is used to represent a brightness contrast degree of an object in the second focusing area;
the first focusing sub-module 442 is configured to determine whether to focus the first focusing area or the second focusing area according to the first contrast value and the second contrast value calculated by the contrast value calculating sub-module 441.
The first contrast value includes a first peak contrast value and a first average contrast value, the second contrast value includes a second peak contrast value and a second average contrast value, and the first focus module 442 further includes:
a numerical detection sub-module 4421 configured to detect whether an absolute value of a difference between the first and second peak contrast values is less than a first threshold value and whether an absolute value of a difference between the first and second average contrast values is less than a second threshold value;
a second focus sub-module 4422 configured to determine to focus the second focus region when an absolute value of a difference between the first and second peak contrast values is less than a first threshold value and an absolute value of a difference between the first and second average contrast values is less than a second threshold value.
Optionally, the first focusing submodule 442 further includes:
the third focusing sub-module 4423 is configured to determine to focus the first focusing region when the absolute value of the difference between the first and second peak contrast values is greater than the first threshold; or,
the fourth focusing sub-module 4424 is configured to determine to focus the first focusing region when an absolute value of a difference between the first contrast average and the second contrast average is greater than a second threshold.
Optionally, an object in the first focus region is a background object, and an object in the second focus region is a foreground object.
In summary, the touch focusing apparatus provided by the present disclosure receives a touch operation applied to a preview screen; drawing n focusing areas by taking the action position of the touch operation as a center, wherein the area of each focusing area in the n focusing areas is unequal, and n is more than or equal to 2; focusing is carried out according to the n focusing areas, at least two focusing areas can be drawn by taking the action position of the touch operation as the center, and the problem that when only one focusing area is drawn, if the focusing area is too small, enough contrast value cannot be obtained from the focusing area, so that focusing cannot be carried out is solved; if the focusing area is large, the foreground object can be ignored, the background object can be focused, the focusing is not accurate, and the effect of improving the success rate and accuracy of focusing is achieved.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
An exemplary embodiment of the present disclosure provides a touch focusing apparatus capable of implementing a touch focusing method provided by the present disclosure, the touch focusing apparatus including: a processor, a memory for storing processor-executable instructions;
wherein the processor is configured to:
displaying a preview picture of a picture to be shot by a camera;
receiving a touch operation acting on a preview picture;
drawing n focusing areas by taking the action position of the touch operation as a center, wherein the area of each focusing area in the n focusing areas is unequal, and n is more than or equal to 2;
and focusing according to the n focusing areas.
Fig. 5 is a block diagram illustrating an apparatus 500 for information display according to an example embodiment. For example, the apparatus 500 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 5, the apparatus 500 may include one or more of the following components: processing component 502, memory 504, power component 506, multimedia component 508, audio component 510, input/output (I/O) interface 512, sensor component 514, and communication component 516.
The processing component 502 generally controls overall operation of the device 500, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 502 may include one or more processors 518 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 502 can include one or more modules that facilitate interaction between the processing component 502 and other components. For example, the processing component 502 can include a multimedia module to facilitate interaction between the multimedia component 508 and the processing component 502.
The memory 504 is configured to store various types of data to support operations at the apparatus 500. Examples of such data include instructions for any application or method operating on device 500, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 504 may be implemented by any type or combination of volatile or non-volatile 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 disks.
The power supply component 506 provides power to the various components of the device 500. The power components 506 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the apparatus 500.
The multimedia component 508 includes a screen that provides an output interface between the device 500 and the user. 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 an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 508 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the device 500 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 510 is configured to output and/or input audio signals. For example, audio component 510 includes a Microphone (MIC) configured to receive external audio signals when apparatus 500 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 504 or transmitted via the communication component 516. In some embodiments, audio component 510 further includes a speaker for outputting audio signals.
The I/O interface 512 provides an interface between the processing component 502 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 514 includes one or more sensors for providing various aspects of status assessment for the device 500. For example, the sensor assembly 514 may detect an open/closed state of the apparatus 500, the relative positioning of the components, such as a display and keypad of the apparatus 500, the sensor assembly 514 may also detect a change in the position of the apparatus 500 or a component of the apparatus 500, the presence or absence of user contact with the apparatus 500, orientation or acceleration/deceleration of the apparatus 500, and a change in the temperature of the apparatus 500. The sensor assembly 514 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 514 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 514 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 516 is configured to facilitate communication between the apparatus 500 and other devices in a wired or wireless manner. The apparatus 500 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 516 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 516 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 500 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, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 504 comprising instructions, executable by the processor 518 of the apparatus 500 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure herein. This application is intended to cover any variations, 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 will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (11)

1. A touch focusing method, the method comprising:
displaying a preview picture of a picture to be shot by a camera;
receiving a touch operation acting on the preview picture;
drawing n focusing areas according to the touch operation by taking the action position of the touch operation as a center, so that the n focusing areas by taking the action position of the touch operation as the center appear in the preview picture at the same time, the area of each focusing area in the n focusing areas is unequal, and n is larger than or equal to 2;
and focusing according to the n focusing areas.
2. The method according to claim 1, wherein when n is 2 and the area of the first focusing region is larger than the area of the second focusing region, the focusing according to the n focusing regions comprises:
respectively calculating a first contrast value of the first focusing area and a second contrast value of the second focusing area, wherein the first contrast value is used for representing the brightness contrast degree of the object in the first focusing area, and the second contrast value is used for representing the brightness contrast degree of the object in the second focusing area;
and determining to focus the first focusing area or the second focusing area according to the first contrast value and the second contrast value.
3. The method of claim 2, wherein the first contrast value comprises a first peak contrast value and a first average contrast value, the second contrast value comprises a second peak contrast value and a second average contrast value, and the determining to focus the first focus region or the second focus region based on the first contrast value and the second contrast value comprises:
detecting whether the absolute value of the difference between the first peak contrast value and the second peak contrast value is smaller than a first threshold value and whether the absolute value of the difference between the first average contrast value and the second average contrast value is smaller than a second threshold value;
determining to focus the second focusing region when an absolute value of a difference between the first peak contrast value and the second peak contrast value is smaller than a first threshold value and an absolute value of a difference between the first average contrast value and the second average contrast value is smaller than a second threshold value.
4. The method of claim 3, further comprising:
when the absolute value of the difference value of the first peak contrast value and the second peak contrast value is larger than the first threshold value, determining to focus the first focusing area; or,
determining to focus the first focusing region when an absolute value of a difference between the first average contrast value and the second average contrast value is greater than the second threshold value.
5. The method of any of claims 2 to 4, wherein the objects in the first focus region are background objects and the objects in the second focus region are foreground objects.
6. A touch focusing apparatus, the apparatus comprising:
a picture display module configured to display a preview picture of a picture to be photographed by the camera;
an operation receiving module configured to receive a touch operation acting on the preview screen displayed by the screen display module;
the area drawing module is configured to draw n focusing areas according to the touch operation by taking the action position of the touch operation received by the operation receiving module as a center, so that the n focusing areas by taking the action position of the touch operation as the center appear in the preview picture at the same time, the area of each focusing area in the n focusing areas is unequal, and n is larger than or equal to 2;
a focusing module configured to focus according to the n focusing regions drawn by the region drawing module.
7. The apparatus of claim 6, wherein when n is 2 and the area of the first focusing region is larger than the area of the second focusing region, the focusing module comprises:
a contrast value calculation sub-module configured to calculate a first contrast value of the first focusing area and a second contrast value of the second focusing area, respectively, the first contrast value being used for representing a brightness contrast degree of an object in the first focusing area, the second contrast value being used for representing a brightness contrast degree of an object in the second focusing area;
a first focusing submodule configured to determine to focus the first focusing area or the second focusing area according to the first contrast value and the second contrast value calculated by the contrast value calculation module.
8. The method of claim 7, wherein the first contrast value comprises a first peak contrast value and a first average contrast value, wherein the second contrast value comprises a second peak contrast value and a second average contrast value, and wherein the first focus sub-module further comprises:
a numerical detection sub-module configured to detect whether an absolute value of a difference of the first and second peak contrast values is less than a first threshold value and whether an absolute value of a difference of the first and second average contrast values is less than a second threshold value;
a second focusing submodule configured to determine to focus the second focusing area when the result of the detection by the numerical detection submodule is that an absolute value of a difference between the first peak contrast value and the second peak contrast value is smaller than a first threshold value, and an absolute value of a difference between the first average contrast value and the second average contrast value is smaller than a second threshold value.
9. The apparatus of claim 8, wherein the first focus sub-module further comprises:
a third focusing sub-module configured to determine to focus the first focusing region when the absolute value of the difference between the first peak contrast value and the second peak contrast value is greater than the first threshold as a result of the detection by the numerical detection sub-module; or,
a fourth focusing sub-module configured to determine to focus the first focusing area when the result of the detection by the numerical detection sub-module is that the absolute value of the difference between the first contrast average and the second contrast average is greater than the second threshold.
10. The apparatus of any one of claims 7 to 9, wherein the object in the first focus region is a background object and the object in the second focus region is a foreground object.
11. A touch focusing apparatus, the apparatus comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
displaying a preview picture of a picture to be shot by a camera;
receiving a touch operation acting on the preview picture;
drawing n focusing areas according to the touch operation by taking the action position of the touch operation as a center, so that the n focusing areas by taking the action position of the touch operation as the center appear in the preview picture at the same time, the area of each focusing area in the n focusing areas is unequal, and n is larger than or equal to 2;
and focusing according to the n focusing areas.
CN201610509407.6A 2016-06-30 2016-06-30 Touch focusing method and device Active CN106131403B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610509407.6A CN106131403B (en) 2016-06-30 2016-06-30 Touch focusing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610509407.6A CN106131403B (en) 2016-06-30 2016-06-30 Touch focusing method and device

Publications (2)

Publication Number Publication Date
CN106131403A CN106131403A (en) 2016-11-16
CN106131403B true CN106131403B (en) 2020-06-02

Family

ID=57468952

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610509407.6A Active CN106131403B (en) 2016-06-30 2016-06-30 Touch focusing method and device

Country Status (1)

Country Link
CN (1) CN106131403B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107613208B (en) * 2017-09-29 2020-11-06 努比亚技术有限公司 Focusing area adjusting method, terminal and computer storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011133700A (en) * 2009-12-25 2011-07-07 Canon Inc Focusing method, focusing device, and imaging apparatus
CN104270562A (en) * 2014-08-15 2015-01-07 广东欧珀移动通信有限公司 Method and device for focusing when photographing
CN105357444A (en) * 2015-11-27 2016-02-24 努比亚技术有限公司 Focusing method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011133700A (en) * 2009-12-25 2011-07-07 Canon Inc Focusing method, focusing device, and imaging apparatus
CN104270562A (en) * 2014-08-15 2015-01-07 广东欧珀移动通信有限公司 Method and device for focusing when photographing
CN105357444A (en) * 2015-11-27 2016-02-24 努比亚技术有限公司 Focusing method and device

Also Published As

Publication number Publication date
CN106131403A (en) 2016-11-16

Similar Documents

Publication Publication Date Title
US9674395B2 (en) Methods and apparatuses for generating photograph
CN105430262B (en) Filming control method and device
US11061202B2 (en) Methods and devices for adjusting lens position
EP3032821B1 (en) Method and device for shooting a picture
CN107944367B (en) Face key point detection method and device
CN107888984B (en) Short video playing method and device
CN108462833B (en) Photographing method, photographing device and computer-readable storage medium
CN105631803B (en) The method and apparatus of filter processing
US10318069B2 (en) Method for controlling state of touch screen, and electronic device and medium for implementing the same
CN108154466B (en) Image processing method and device
CN107480785B (en) Convolutional neural network training method and device
CN104216525B (en) Method and device for mode control of camera application
EP3176984A1 (en) Method and device for processing information
EP3040912A1 (en) Method and device for classifying pictures
CN106210495A (en) Image capturing method and device
CN106534951A (en) Method and apparatus for video segmentation
CN106095300B (en) Method and device for adjusting playing progress
US9665925B2 (en) Method and terminal device for retargeting images
CN106131403B (en) Touch focusing method and device
CN107832112B (en) Wallpaper setting method and device
CN107122356B (en) Method and device for displaying face value and electronic equipment
CN106331463B (en) Camera focal length amplification method and device
CN107295229B (en) The photographic method and device of mobile terminal
CN104616687A (en) Recording method and device
CN106713748B (en) Method and device for sending pictures

Legal Events

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