CN106210514B - It takes pictures the method, apparatus and smart machine of focusing - Google Patents

It takes pictures the method, apparatus and smart machine of focusing Download PDF

Info

Publication number
CN106210514B
CN106210514B CN201610518458.5A CN201610518458A CN106210514B CN 106210514 B CN106210514 B CN 106210514B CN 201610518458 A CN201610518458 A CN 201610518458A CN 106210514 B CN106210514 B CN 106210514B
Authority
CN
China
Prior art keywords
human face
preview window
face region
ratio
drive current
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
CN201610518458.5A
Other languages
Chinese (zh)
Other versions
CN106210514A (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201610518458.5A priority Critical patent/CN106210514B/en
Publication of CN106210514A publication Critical patent/CN106210514A/en
Application granted granted Critical
Publication of CN106210514B publication Critical patent/CN106210514B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/61Control of cameras or camera modules based on recognised objects
    • H04N23/611Control of cameras or camera modules based on recognised objects where the recognised objects include parts of the human body
    • 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)
  • Studio Devices (AREA)

Abstract

The present invention is suitable for technical field of intelligent equipment, provides the method, apparatus and smart machine of a kind of focusing of taking pictures, which comprises setting human face region is in the ratio in the preview window and the corresponding relationship between motor drive current;During taking pictures, the human face region in the preview window and its ratio in the preview window are obtained;Corresponding motor drive current is obtained according to the ratio, inputs the motor drive current to motor, to complete the focusing to human face region.The ratio that the present invention is based on human face regions in the preview window locks focusing, improves the clarity of human face region shooting, and the portrait photographs for solving the problems, such as that the prior art is shot in personage's movement or camera shake are smudgy.

Description

It takes pictures the method, apparatus and smart machine of focusing
Technical field
The invention belongs to technical field of intelligent equipment more particularly to a kind of method, apparatus and smart machine of focusing of taking pictures.
Background technique
During taking pictures, when personage is mobile or camera shake, camera can not accurately detect stable face area Domain focuses so as to cause human face region and fails, so that the portrait photographs that shooting obtains are smudgy.
Summary of the invention
In consideration of it, the embodiment of the present invention provides the method, apparatus and smart machine of a kind of focusing of taking pictures, to solve existing skill The problem that the portrait photographs that art is shot in personage's movement or camera shake are smudgy.
In a first aspect, providing a kind of method of focusing of taking pictures, which comprises
Human face region is set in the ratio in the preview window and the corresponding relationship between motor drive current;
During taking pictures, the human face region in the preview window and its ratio in the preview window are obtained;
Corresponding motor drive current is obtained according to the ratio, inputs the motor drive current to motor, to complete Focusing to human face region.
Second aspect, provides a kind of device of focusing of taking pictures, and described device includes:
Setup module, for human face region to be arranged in the ratio in the preview window and the corresponding pass between motor drive current System;
Module is obtained, for during taking pictures, obtains human face region in the preview window and its in the preview window Ratio;
Focusing module inputs the motor to motor and drives for obtaining corresponding motor drive current according to the ratio Streaming current, to complete the focusing to human face region.
The third aspect, provides a kind of smart machine, and the smart machine includes the device of focusing of taking pictures as described above.
Compared with prior art, the embodiment of the present invention is provided with ratio of the human face region in the preview window and motor drives Corresponding relationship between electric current;During taking pictures, then by the human face region in acquisition the preview window and its in the preview window In ratio, obtain motor drive current corresponding with the ratio, the motor drive current inputted to motor, to drive horse Up to driving camera lens mobile, the focusing to human face region is completed.The motor drive current is that the ratio human face region is clear The motor drive current of clear focusing.When personage is mobile or camera shake, if ratio of the human face region in the preview window becomes Change small, motor drive current variation is small or constant, to lock focusing, improve human face region shoot it is clear Degree, the portrait photographs for solving the problems, such as that the prior art is shot in personage's movement or camera shake are smudgy.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with Other accompanying drawings can also be obtained according to these attached drawings.
Fig. 1 is the implementation flow chart of the method for focusing provided in an embodiment of the present invention of taking pictures;
Fig. 2 be another embodiment of the present invention provides focusing of taking pictures method implementation flow chart;
Fig. 3 is the composite structural diagram of the device of focusing provided in an embodiment of the present invention of taking pictures;
Fig. 4 is the composite structural diagram of smart machine provided in an embodiment of the present invention.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and It is not used in the restriction present invention.
The embodiment of the present invention is provided with human face region in the ratio in the preview window and corresponding between motor drive current Relationship;During taking pictures, then by obtain the preview window in human face region and its ratio in the preview window, obtain with The corresponding motor drive current of the ratio, inputs the motor drive current to motor, drives camera lens with drive motor It is mobile, complete the focusing to human face region.The motor drive current is that the motor of the ratio human face region shape library drives Streaming current.When personage is mobile or camera shake, if ratio of the human face region in the preview window changes small, the motor Drive current variations are small or constant, to lock focusing, improve the clarity of human face region shooting, solve existing skill The problem that the portrait photographs that art is shot in personage's movement or camera shake are smudgy.The embodiment of the present invention also provides Corresponding device, which will be described in detail below.
Fig. 1 shows the implementation process of the method for focusing provided in an embodiment of the present invention of taking pictures.
In embodiments of the present invention, the method for the focusing of taking pictures be applied to smart machine, the smart machine include but It is not limited to smart phone, tablet computer, learning machine, digital camera/video camera etc..The smart machine have camera function and Face datection function.
Refering to fig. 1, the method for the focusing of taking pictures includes:
In step s101, setting human face region is in the ratio in the preview window and the corresponding pass between motor drive current System.
Herein, ratio of the human face region in the preview window refers to the face that human face region occupies in the preview window Product ratio.
The size of the motor drive current determines the mobile target position of camera lens.In embodiments of the present invention, The motor drive current is the current value of the human face region shape library under corresponding ratio, i.e., under the motor drive current The position that camera lens are moved to is the position of human face region shape library.Further, camera lens are driven according to motor Characteristic, in the corresponding relationship, ratio of the human face region in the preview window is bigger, i.e., human face region is close shot, and motor drives Streaming current is smaller;Ratio of the human face region in the preview window is smaller, i.e., human face region is distant view, and motor drive current is bigger. The corresponding relationship can be stored by way of mapping table or corresponding relation database, herein with no restriction.
In step s 102, during taking pictures, obtain the preview window in human face region and its in the preview window Ratio.
In step s 103, corresponding motor drive current is obtained according to the ratio, inputs the motor to motor and drives Streaming current, to complete the focusing to human face region.
Illustratively, the area ratio can be indicated by pixel ratio, i.e., the human face region number of pixels that includes with The ratio of total number of pixels in the preview window.When the ratio is the area ratio calculated based on pixel, the step S102 can be with are as follows: smart machine is after starting camera, human face region in real-time detection the preview window, and obtains the face area The number of pixels that domain includes;Then the total number of pixels of described the preview window is obtained;Calculate the number of pixels of the human face region Ratio between the total number of pixels of the preview window obtains ratio of the human face region in the preview window.The ratio Reflect the depth of view information of human face region.According to the ratio, lookup and institute from step S101 pre-set corresponding relationship The corresponding motor drive current of ratio is stated, and with the motor drive current drive motor, to drive camera lens to be moved to target position It sets, realizes the focusing to human face region.When personage is mobile or camera shake, if ratio of the human face region in the preview window Change small, motor drive current variation is small or constant, to lock focusing, improve human face region shoot it is clear Clear degree, the portrait photographs for solving the problems, such as that the prior art is shot in personage's movement or camera shake are smudgy.
As another preferred embodiment of the invention, the embodiment of the present invention, can be according to experiment when corresponding relationship is arranged It counts obtained preset threshold and proportional region of the human face region in the preview window is divided into several segments, be then arranged each The corresponding motor drive current of section.Fig. 2 shows another embodiment of the present invention provides focusing of taking pictures method implementation process.
Referring to Fig.2, the described method includes:
In step s 201, proportional region of the human face region in the preview window is divided into according to preset threshold several Section.
In step S202, the corresponding motor drive current of each section of proportional region of setting.
When carrying out correspondence setting, the embodiment of the present invention counts ratio model of the human face region in the preview window first It encloses.Illustratively, when human face region is not present in the preview window, the ratio is minimum value a;When human face region occupies entirely When the preview window, the ratio is maximum value b.At this point, proportional region of the human face region in the preview window can be set For [a, b].The number of the preset threshold can be arranged according to actual demand.Illustratively, when including two preset thresholds When, i.e. the first preset threshold and the second preset threshold, first preset threshold are greater than second preset threshold, then step walks Proportional region of the human face region in the preview window is divided into several segments according to preset threshold by rapid S201 specifically:
Proportional region of the human face region in the preview window is drawn according to first preset threshold and the second preset threshold It is divided into three sections, wherein ratio maximum value of the human face region in the preview window to first preset threshold is the first ratio model It encloses, first preset threshold to second preset threshold is the second proportional region, second preset threshold to the people Ratio minimum value of the face region in the preview window is third proportional region.
Then corresponding motor drive current is arranged according to each section of proportional region.The motor drive current is for correspondence Each ratio value in proportional region is applicable in, so that when personage's movement or camera shake generate micro-displacement, The motor drive current variation remains unchanged, and then locks focusing, improves the clarity of human face region shooting, solves existing The problem that the portrait photographs for having technology to shoot in personage's movement or camera shake are smudgy.
In step S203, during taking pictures, obtain the preview window in human face region and its in the preview window Ratio.
In step S204, corresponding motor drive current is obtained according to the ratio, the motor is inputted to motor and drives Streaming current, to complete the focusing to human face region.
Herein, described step S203, S204 are identical as Fig. 1 step S102, S103 as described in the examples, please specifically join See the narration of above-described embodiment, details are not described herein again.
In conclusion ratio and motor drive current of the embodiment of the present invention by setting human face region in the preview window Between corresponding relationship;During taking pictures, then by the human face region in acquisition the preview window and its in the preview window Ratio, obtains motor drive current corresponding with the ratio, the motor drive current is input to motor, with drive motor It drives camera lens mobile, completes the focusing to human face region.The motor drive current is that the ratio human face region is clear The motor drive current of focusing.When personage is mobile or camera shake, if ratio variation of the human face region in the preview window Small, the motor drive current variation is small or constant, to lock focusing, improves the clear of human face region shooting Degree, the portrait photographs for solving the problems, such as that the prior art is shot in personage's movement or camera shake are smudgy.
The composed structure that Fig. 3 shows the device of focusing provided in an embodiment of the present invention of taking pictures only is shown for ease of description Part related to the embodiment of the present invention is gone out.
In embodiments of the present invention, described device is for realizing above-mentioned Fig. 1 to Fig. 2 focusing as described in the examples of taking pictures Method can be the unit of the software unit for being built in smart machine, hardware cell or software and hardware combining.The smart machine Including but not limited to smart phone, tablet computer, learning machine, digital camera/video camera etc..The smart machine has function of taking pictures Energy and Face datection function.
Refering to Fig. 3, described device includes:
Setup module 31, for human face region to be arranged in the ratio in the preview window and corresponding between motor drive current Relationship;
Module 32 is obtained, for during taking pictures, obtains human face region in the preview window and its in the preview window Ratio;
Focusing module 33 inputs the motor to motor for obtaining corresponding motor drive current according to the ratio Driving current, to complete the focusing to human face region.
Herein, ratio of the human face region in the preview window refers to the face that human face region occupies in the preview window Product ratio.
The size of the motor drive current determines the mobile target position of camera lens.In embodiments of the present invention, The motor drive current is the current value of the human face region shape library under corresponding ratio, i.e., under the motor drive current The position that camera lens are moved to is the position of human face region shape library.Further, camera lens are driven according to motor Characteristic, ratio of the human face region in the preview window is bigger, and motor drive current is smaller;Ratio of the human face region in the preview window Example is smaller, and motor drive current is bigger.
Further, the setup module 31 includes:
Division unit 311, if for being divided into proportional region of the human face region in the preview window according to preset threshold Dry section;
Setting unit 312, for the corresponding motor drive current of each section of proportional region to be arranged.
Corresponding motor drive current is arranged according to each section of proportional region in the embodiment of the present invention.The motor drive current Each ratio value in corresponding proportional region is applicable in, so that being generated in personage's movement or camera shake small When displacement, the motor drive current variation is remained unchanged, and then locks focusing, improves the clarity of human face region shooting, The portrait photographs for solving the problems, such as that the prior art is shot in personage's movement or camera shake are smudgy.
Further, the area ratio can be indicated by pixel ratio, i.e., the human face region number of pixels that includes with The ratio of total number of pixels in the preview window.The acquisition module 32 includes:
First acquisition unit 321 obtains the picture that the human face region includes for detecting the human face region in the preview window Plain number;
Second acquisition unit 322, for obtaining the total number of pixels of described the preview window;
Computing unit 323, for calculating between the number of pixels of the human face region and the total number of pixels of the preview window Ratio, obtain ratio of the human face region in the preview window.
It should be noted that the device in the embodiment of the present invention can be used to implement whole skills in above method embodiment The function of art scheme, each functional module can be implemented according to the method in above method embodiment, specific implementation Process can refer to the associated description in examples detailed above, and details are not described herein again.
Fig. 4 shows a kind of structural block diagram of smart machine, which can be used for implementing mentioning in above-described embodiment The method of the focusing of taking pictures supplied.
As shown in figure 4, smart machine 1200 may include RF (Radio Frequency, radio frequency) circuit 110, include The memory 120 of one or more (one is only shown in figure) computer readable storage mediums, input unit 130, display Unit 140, voicefrequency circuit 160, transmission module 170, includes one or more than one and (only shows one in figure sensor 150 It is a) processor 180 of processing core and the equal components of power supply 190.It will be understood by those skilled in the art that intelligence shown in Fig. 4 Energy 1200 structure of equipment does not constitute the restriction to smart machine 1200, may include components more more or fewer than diagram, or Person combines certain components or different component layouts.Wherein:
RF circuit 110 realizes the mutual conversion of electromagnetic wave and electric signal, thus with logical for receiving and transmitting electromagnetic wave News network or other equipment are communicated.RF circuit 110 may include various existing for executing the circuit elements of these functions Part, for example, antenna, RF transceiver, digital signal processor, encryption/deciphering chip, subscriber identity module (SIM) card, storage Device etc..RF circuit 110 can carry out communicating or by wireless with various networks such as internet, intranet, wireless network Network is communicated with other equipment.Above-mentioned wireless network may include cellular telephone networks, WLAN or Metropolitan Area Network (MAN). Various communication standards, agreement and technology, including but not limited to global system for mobile communications can be used in above-mentioned wireless network (Global System for Mobile Communication, GSM), enhanced mobile communication technology (Enhanced Data GSM Environment, EDGE), Wideband CDMA Technology (wideband code division multiple Access, W-CDMA), Code Division Multiple Access (Code division access, CDMA), time division multiple access technology (time Division multiple access, TDMA), adopting wireless fidelity technology (Wireless, Fidelity, WiFi) (such as U.S.'s electricity Gas and Electronic Engineering Association standard IEEE 802.11a, IEEE 802.11b, IEEE802.11g and/or IEEE 802.11n), the networking telephone (Voice over internet protocal, VoIP), worldwide interoperability for microwave accesses (Worldwide Interoperability for Microwave Access, Wi-Max), other be used for mail, Instant Messenger The agreement and any other suitable communications protocol of news and short message, or even may include that those are not developed currently yet Agreement.
Memory 120 can be used for storing software program and module, such as the method, device for focusing of taking pictures in above-described embodiment Corresponding program instruction/module, the software program and module that processor 180 is stored in memory 120 by operation, thus Application and data processing are performed various functions, that is, realizes ratio and motor driving electricity of the setting human face region in the preview window Corresponding relationship between stream and corresponding motor drive current is obtained to carry out focus operation according to the ratio when taking pictures Function or other function.Memory 120 may include high speed random access memory, may also include nonvolatile memory, such as one Or multiple magnetic storage devices, flash memory or other non-volatile solid state memories.In some instances, memory 120 can It further comprise the memory remotely located relative to processor 180, these remote memories can pass through network connection to intelligence It can equipment 1200.The example of above-mentioned network include but is not limited to internet, intranet, local area network, mobile radio communication and its Combination.
Input unit 130 can be used for receiving the number or character information of input, and generate and user setting and function Control related keyboard, mouse, operating stick, optics or trackball signal input.Specifically, input unit 130 may include touching Sensitive surfaces 131 and other input equipments 132.Touch sensitive surface 131, also referred to as touch display screen or Trackpad are collected and are used Family on it or nearby touch operation (such as user using any suitable object or attachment such as finger, stylus in touch-sensitive table Operation on face 131 or near touch sensitive surface 131), and corresponding attachment device is driven according to preset formula.It is optional , touch sensitive surface 131 may include both touch detecting apparatus and touch controller.Wherein, touch detecting apparatus detection is used The touch orientation at family, and touch operation bring signal is detected, transmit a signal to touch controller;Touch controller is from touch Touch information is received in detection device, and is converted into contact coordinate, then gives processor 180, and can receive processor 180 The order sent simultaneously is executed.Furthermore, it is possible to using multiple types such as resistance-type, condenser type, infrared ray and surface acoustic waves Realize touch sensitive surface 131.In addition to touch sensitive surface 131, input unit 130 can also include other input equipments 132.Specifically, Other input equipments 132 can include but is not limited to physical keyboard, function key (such as volume control button, switch key etc.), One of trace ball, mouse, operating stick etc. are a variety of.
Display unit 140 can be used for showing information input by user or the information and smart machine that are supplied to user 1200 various graphical user interface, these graphical user interface can be by figure, text, icon, video and any combination thereof To constitute.Display unit 140 may include display panel 141, optionally, can use LCD (Liquid Crystal Display, liquid crystal display), the forms such as OLED (Organic Light-Emitting Diode, Organic Light Emitting Diode) come Configure display panel 141.Further, touch sensitive surface 131 can cover display panel 141, when touch sensitive surface 131 is detected at it On or near touch operation after, send processor 180 to determine the type of touch event, be followed by subsequent processing device 180 according to touching The type for touching event provides corresponding visual output on display panel 141.Although in Fig. 4, touch sensitive surface 131 and display surface Plate 141 is to realize input and input function as two independent components, but in some embodiments it is possible to by touch-sensitive table Face 131 and display panel 141 integrate and realize and output and input function.
Smart machine 1200 may also include at least one sensor 150, for example, optical sensor, motion sensor and other Sensor.Specifically, optical sensor may include ambient light sensor and proximity sensor, wherein ambient light sensor can basis The light and shade of ambient light adjusts the brightness of display panel 141, proximity sensor can when smart machine 1200 is moved in one's ear, Close display panel 141 and/or backlight.As a kind of motion sensor, gravity accelerometer can detect all directions The size of upper (generally three axis) acceleration, can detect that size and the direction of gravity, can be used for detecting tilt angle when static, And application (such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating), the Vibration identification correlation function of identification mobile phone posture Energy (such as pedometer, percussion) etc.;The gyroscope that can also configure as smart machine 1200, barometer, hygrometer, thermometer, The other sensors such as infrared sensor, details are not described herein.
Voicefrequency circuit 160, loudspeaker 161, the audio that microphone 162 can provide between user and smart machine 1200 connect Mouthful.Electric signal after the audio data received conversion can be transferred to loudspeaker 161, by loudspeaker 161 by voicefrequency circuit 160 Be converted to voice signal output;On the other hand, the voice signal of collection is converted to electric signal by microphone 162, by voicefrequency circuit 160 receive after be converted to audio data, then by after the processing of audio data output processor 180, through RF circuit 110 to be sent to ratio Such as another terminal, or audio data is exported to memory 120 to be further processed.Voicefrequency circuit 160 is also possible that Earphone jack, to provide the communication of peripheral hardware earphone Yu smart machine 1200.
Smart machine 1200 can help user send and receive e-mail, is clear by transmission module 170 (such as WiFi module) Look at webpage and access streaming video etc., it provides wireless broadband internet for user and accesses.Although Fig. 4 shows transmission mould Block 170, but it is understood that, and it is not belonging to must be configured into for smart machine 1200, it is can according to need completely not Change in the range of the essence of invention and omits.
Processor 180 is the control centre of smart machine 1200, utilizes each of various interfaces and connection whole mobile phone A part by running or execute the software program and/or module that are stored in memory 120, and calls and is stored in storage Data in device 120 execute the various functions and processing data of smart machine 1200, to carry out integral monitoring to mobile phone.It can Choosing, processor 180 may include one or more processing cores;Preferably, processor 180 can integrate application processor and modulation Demodulation processor, wherein the main processing operation system of application processor, user interface and application program etc., modulation /demodulation processing Device mainly handles wireless communication.It is understood that above-mentioned modem processor can not also be integrated into processor 180.
Smart machine 1200 further includes the power supply 190 (such as battery) powered to all parts, it is preferred that power supply can lead to Cross power-supply management system and processor 180 be logically contiguous, thus by power-supply management system realize management charging, electric discharge and The functions such as power managed.Power supply 190 can also include one or more direct current or AC power source, recharging system, electricity The random components such as source fault detection circuit, power adapter or inverter, power supply status indicator.
Although being not shown, smart machine 1200 can also include camera, bluetooth module etc., and details are not described herein.Specifically In the present embodiment, the display unit of smart machine is touch-screen display, and smart machine further includes having memory and one Perhaps more than one program one of them or more than one program is stored in memory, and be configured to by one or The execution of more than one processor of person states one or more than one program includes the instruction for performing the following operation:
Human face region is set in the ratio in the preview window and the corresponding relationship between motor drive current;
During taking pictures, the human face region in the preview window and its ratio in the preview window are obtained;
Corresponding motor drive current is obtained according to the ratio, inputs the motor drive current to motor, to complete Focusing to human face region.
Assuming that above-mentioned is the first possible embodiment, then provided based on the first possible embodiment Second of possible embodiment in, in the memory of the smart machine, also include instructions for performing the following operations:
The setting human face region includes: in the ratio in the preview window and the corresponding relationship between motor drive current
Proportional region of the human face region in the preview window is divided into several segments according to preset threshold;
The corresponding motor drive current of each section of proportional region is set.
In the third the possible embodiment provided based on the first or second of possible embodiment, Also include instructions for performing the following operations in the memory of the smart machine:
In the corresponding relationship, ratio of the human face region in the preview window is bigger, and motor drive current is smaller;
Ratio of the human face region in the preview window is smaller, and motor drive current is bigger.
In the 4th kind of possible embodiment provided based on the first possible embodiment, the intelligence Also include instructions for performing the following operations in the memory of equipment:
Human face region in described acquisition the preview window and its ratio in the preview window include:
The human face region in the preview window is detected, the number of pixels that the human face region includes is obtained;
Obtain the total number of pixels of described the preview window;
The ratio between the number of pixels of the human face region and the total number of pixels of the preview window is calculated, the people is obtained Ratio of the face region in the preview window.
In conclusion the embodiment of the present invention be provided with ratio of the human face region in the preview window and motor drive current it Between corresponding relationship;During taking pictures, then by obtaining the human face region in the preview window and its ratio in the preview window Example, obtains motor drive current corresponding with the ratio, the motor drive current is input to motor, with drive motor band Dynamic camera lens are mobile, complete the focusing to human face region.The motor drive current is that the ratio human face region is clearly right Burnt motor drive current.When personage is mobile or camera shake, if ratio variation of the human face region in the preview window is micro- Small, the motor drive current variation is small or constant, to lock focusing, improves the clarity of human face region shooting, The portrait photographs for solving the problems, such as that the prior art is shot in personage's movement or camera shake are smudgy.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure Member and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually It is implemented in hardware or software, the specific application and design constraint depending on technical solution.Professional technician Each specific application can be used different methods to achieve the described function, but this realization is it is not considered that exceed The scope of the present invention.
It is apparent to those skilled in the art that for convenience and simplicity of description, the device of foregoing description It with the specific work process of unit, can refer to corresponding processes in the foregoing method embodiment, details are not described herein.
In several embodiments provided herein, it should be understood that the method, apparatus and intelligence of disclosed bat focusing Energy equipment, may be implemented in other ways.For example, the apparatus embodiments described above are merely exemplary, for example, The division of the module, unit, only a kind of logical function partition, there may be another division manner in actual implementation, example As multiple units or components can be combined or can be integrated into another system, or some features can be ignored or not executed. Another point, shown or discussed mutual coupling, direct-coupling or communication connection can be through some interfaces, dress It sets or the indirect coupling or communication connection of unit, can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.
In addition, each functional unit in each embodiment of the present invention, module can integrate in one processing unit, Can be each unit, module physically exists alone, can also be integrated in one unit with two or more units, module In.
It, can be with if the function is realized in the form of SFU software functional unit and when sold or used as an independent product It is stored in a computer readable storage medium.Based on this understanding, technical solution of the present invention is substantially in other words The part of the part that contributes to existing technology or the technical solution can be embodied in the form of software products, the meter Calculation machine software product is stored in a storage medium, including some instructions are used so that a computer equipment (can be a People's computer, server or network equipment etc.) it performs all or part of the steps of the method described in the various embodiments of the present invention. And storage medium above-mentioned includes: that USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), arbitrary access are deposited The various media that can store program code such as reservoir (RAM, Random Access Memory), magnetic or disk.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any Those familiar with the art in the technical scope disclosed by the present invention, can easily think of the change or the replacement, and should all contain Lid is within protection scope of the present invention.Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (5)

1. a kind of method for focusing of taking pictures, which is characterized in that the described method includes:
Human face region is set in the ratio in the preview window and the corresponding relationship between motor drive current;
During taking pictures, the human face region in the preview window and its ratio in the preview window are obtained;
Corresponding motor drive current is obtained according to the ratio, inputs the motor drive current to motor, to complete to people The focusing in face region;
The setting human face region includes: in the ratio in the preview window and the corresponding relationship between motor drive current
Proportional region of the human face region in the preview window is divided into several segments according to preset threshold;
The corresponding motor drive current of each section of proportional region is set;
Wherein, the motor drive current is the current value of a single-point, rather than a current value section, the motor drive current Each ratio value in corresponding proportional region is applicable in;
When personage is mobile or camera shake, if ratio of the human face region in described the preview window changes small, the horse It is small or constant up to drive current variations, to lock focusing.
2. the method for focusing of taking pictures as described in claim 1, which is characterized in that the human face region obtained in the preview window And its ratio in the preview window includes:
The human face region in the preview window is detected, the number of pixels that the human face region includes is obtained;
Obtain the total number of pixels of described the preview window;
The ratio between the number of pixels of the human face region and the total number of pixels of the preview window is calculated, the face area is obtained Ratio of the domain in the preview window.
3. a kind of device for focusing of taking pictures, which is characterized in that described device includes:
Setup module, for human face region to be arranged in the ratio in the preview window and the corresponding relationship between motor drive current;
Module is obtained, for obtaining the human face region in the preview window and its ratio in the preview window during taking pictures;
Focusing module inputs the motor driving electricity to motor for obtaining corresponding motor drive current according to the ratio Stream, to complete the focusing to human face region;
The setup module includes:
Division unit, for proportional region of the human face region in the preview window to be divided into several segments according to preset threshold;
Setting unit, for the corresponding motor drive current of each section of proportional region to be arranged;
Wherein, the motor drive current is the current value of a single-point, rather than a current value section, the motor drive current Each ratio value in corresponding proportional region is applicable in;
When personage is mobile or camera shake, if ratio of the human face region in described the preview window changes small, the horse It is small or constant up to drive current variations, to lock focusing.
4. the device of focusing of taking pictures as claimed in claim 3, which is characterized in that the acquisition module includes:
First acquisition unit obtains the number of pixels that the human face region includes for detecting the human face region in the preview window;
Second acquisition unit, for obtaining the total number of pixels of described the preview window;
Computing unit, for calculating the ratio between the number of pixels of the human face region and the total number of pixels of the preview window, Obtain ratio of the human face region in the preview window.
5. a kind of smart machine, which is characterized in that the smart machine includes taking pictures as claim 3 to 4 is described in any item The device of focusing.
CN201610518458.5A 2016-07-04 2016-07-04 It takes pictures the method, apparatus and smart machine of focusing Active CN106210514B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610518458.5A CN106210514B (en) 2016-07-04 2016-07-04 It takes pictures the method, apparatus and smart machine of focusing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610518458.5A CN106210514B (en) 2016-07-04 2016-07-04 It takes pictures the method, apparatus and smart machine of focusing

Publications (2)

Publication Number Publication Date
CN106210514A CN106210514A (en) 2016-12-07
CN106210514B true CN106210514B (en) 2019-04-12

Family

ID=57465071

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610518458.5A Active CN106210514B (en) 2016-07-04 2016-07-04 It takes pictures the method, apparatus and smart machine of focusing

Country Status (1)

Country Link
CN (1) CN106210514B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109005339B (en) * 2018-07-27 2020-07-28 努比亚技术有限公司 Image acquisition method, terminal and storage medium
CN110992419B (en) * 2019-10-13 2020-12-15 湛江市金蝶管理软件有限公司 Target big data occupied area detection platform and method
CN110855881B (en) * 2019-11-01 2021-07-02 RealMe重庆移动通信有限公司 Shooting processing method and device, storage medium and electronic equipment
CN110855882B (en) * 2019-11-01 2021-10-08 RealMe重庆移动通信有限公司 Shooting processing method and device, storage medium and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20090043159A (en) * 2007-10-29 2009-05-06 삼성디지털이미징 주식회사 Method of controlling digital image processing apparatus performing face recognition, and image processing apparatus adopting the method
CN101452181A (en) * 2007-12-03 2009-06-10 鸿富锦精密工业(深圳)有限公司 Automatic focusing system and method OF electronic device
CN104102068A (en) * 2013-04-11 2014-10-15 聚晶半导体股份有限公司 Automatic focusing method and automatic focusing device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007065290A (en) * 2005-08-31 2007-03-15 Nikon Corp Automatic focusing device
JP4315215B2 (en) * 2007-05-18 2009-08-19 カシオ計算機株式会社 Imaging apparatus, face detection method, and face detection control program
JP5995521B2 (en) * 2012-05-18 2016-09-21 キヤノン株式会社 Lens barrel and camera system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20090043159A (en) * 2007-10-29 2009-05-06 삼성디지털이미징 주식회사 Method of controlling digital image processing apparatus performing face recognition, and image processing apparatus adopting the method
CN101452181A (en) * 2007-12-03 2009-06-10 鸿富锦精密工业(深圳)有限公司 Automatic focusing system and method OF electronic device
CN104102068A (en) * 2013-04-11 2014-10-15 聚晶半导体股份有限公司 Automatic focusing method and automatic focusing device

Also Published As

Publication number Publication date
CN106210514A (en) 2016-12-07

Similar Documents

Publication Publication Date Title
CN106959761B (en) A kind of terminal photographic method, device and terminal
CN106027108B (en) A kind of indoor orientation method, device and wearable device and mobile terminal
CN104967790B (en) Method, photo taking, device and mobile terminal
CN103632165A (en) Picture processing method, device and terminal equipment
CN106484555B (en) The method and mobile terminal of abnormality detection and recovery
CN103414814A (en) Picture processing method and device and terminal device
CN106210514B (en) It takes pictures the method, apparatus and smart machine of focusing
CN106101776B (en) Method, smart machine and the speaker of volume adjustment
CN106161931A (en) The method and device of image preview
CN103744592A (en) Information processing method and terminal
CN103714161A (en) Image thumbnail generation method and device and terminal
CN105279186A (en) Image processing method and system
CN105306802A (en) Photographing mode switching method and device
CN105120158B (en) The image pickup method and device of mobile terminal
CN105205371B (en) The locking means and device of mobile terminal
CN105635553B (en) Image shooting method and device
CN109493821A (en) Screen brightness regulation method, device and storage medium
CN106131402B (en) A kind of self-shooting bar, photographic method and self-heterodyne system
CN104574452A (en) Generating method and device for window background
CN105100361B (en) The way of recording and device of mobile terminal
CN110209415A (en) Firmware method for refreshing, device and storage medium
CN109656431A (en) Information display method, device and storage medium
CN109683821A (en) Data processing method, device, mobile terminal and storage medium
CN106453776A (en) Adding method of contact person, server and mobile terminal
CN110022600A (en) Adjusting method, device, storage medium and the mobile terminal of driving current

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong

Applicant after: OPPO Guangdong Mobile Communications Co., Ltd.

Address before: 523841 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong

Applicant before: Guangdong OPPO Mobile Communications Co., Ltd.

GR01 Patent grant
GR01 Patent grant