CN107566735A - A kind of dual camera focusing method, mobile terminal and computer-readable recording medium - Google Patents

A kind of dual camera focusing method, mobile terminal and computer-readable recording medium Download PDF

Info

Publication number
CN107566735A
CN107566735A CN201710912720.9A CN201710912720A CN107566735A CN 107566735 A CN107566735 A CN 107566735A CN 201710912720 A CN201710912720 A CN 201710912720A CN 107566735 A CN107566735 A CN 107566735A
Authority
CN
China
Prior art keywords
focusing
camera
focus
focus value
value
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.)
Pending
Application number
CN201710912720.9A
Other languages
Chinese (zh)
Inventor
卢亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nubia Technology Co Ltd
Original Assignee
Nubia Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Priority to CN201710912720.9A priority Critical patent/CN107566735A/en
Publication of CN107566735A publication Critical patent/CN107566735A/en
Pending legal-status Critical Current

Links

Abstract

The invention discloses a kind of dual camera focusing method, and the focusing calculated in focusing area per fragment position is respectively separated by the first camera and second camera;Calculate the focus value between two neighboring focusing;Focus value in each focusing is compared, shooting focus is determined according to the result of contrast.The invention also discloses a kind of mobile terminal and computer-readable recording medium, solves the problems, such as that camera focusing needs the long period in correlation technique, is focused simultaneously by dual camera, accelerate focus process, focusing time is reduced, focusing time can be reduced will by about one time, improves Consumer's Experience.

Description

A kind of dual camera focusing method, mobile terminal and computer-readable recording medium
Technical field
The present invention relates to mobile communication technology field, more particularly to a kind of dual camera focusing method, mobile terminal and Computer-readable recording medium.
Background technology
At present, when taking pictures, video camera typically all can first find a focusing, and the searching process of focusing is all base In common FV principles, that is, the focusing that a width shooting image is found above is initial position, judges the opening position Definition, then using the position as starting point, increase △ x units every time to some direction along a curve, look for pair Focus, if on some direction, after one section of ascendant trend of passing by is reached at x1, continuous three opening positions are all judged as declining Trend, then initial point is returned to, looks for focusing towards opposite direction in the same manner, until finding a model substantially Enclose, the curve ranges obtained as coarse scan, then △ x will be reduced in the curve ranges that coarse scan obtains to enter in the same way The trickle focusing of row, until finding definition highest point, the focusing as current picture to be captured.
And for dual camera, focusing is all to need to go to focus respectively, therefore, right for single camera The burnt required time is more long, is unfavorable for quickly taking pictures, catches excellent moment, the use to user cause it is certain not Just property.
The problem of needing the long period for camera focusing in correlation technique, solution is not yet proposed at present.
The content of the invention
It is a primary object of the present invention to propose a kind of dual camera focusing method, mobile terminal and computer-readable deposit Storage media, it is intended to solve the problems, such as that camera focusing needs the long period in correlation technique.
To achieve the above object, the embodiment of the present invention proposes a kind of dual camera focusing method, including:
The focusing calculated in focusing area per fragment position is respectively separated by the first camera and second camera;
Calculate the focus value between two neighboring focusing;
Focus value in each focusing is compared, shooting focus is determined according to the result of contrast.
Alternatively, the focusing calculated in focusing area per fragment position is respectively separated by the first camera and second camera Point includes:
The focus value P1 of the first focusing is obtained by first camera, second is obtained by the second camera The focus value P2 of focusing;
Wherein, the focal length of first focusing is the initial value pre-set, and second focusing is the starting Value+step-length, the step-length are configured previously according to demand.
Alternatively, the focus value in each focusing is compared, determines that shooting focus includes according to the result of contrast:
The focus value P2 with judging the clear of second focusing by way of the size of the focus value P1 Whether clear degree is higher than the definition of first focusing;
In the case where judged result is no, determine first focusing for shooting focus.
Alternatively, described second pair is being judged by way of the focus value P2 and the focus value P1 size After whether the definition of focus is higher than the definition of first focusing, methods described also includes:
In the case where the judgment result is yes, first camera obtains the 3rd focusing with the initial value+2* step-lengths The focus value P3 of point;The second camera obtains the focus value P4 of the 4th focusing with the initial value+3* step-lengths;
The focus value P4 with judging the clear of the 4th focusing by way of the size of the focus value P3 Whether clear degree is higher than the definition of the 3rd focusing;
In the case where judged result is no, determine the 3rd focusing for shooting focus.
Alternatively, described 4th pair is being judged by way of the focus value P4 and the focus value P3 size After whether the definition of focus is higher than the definition of the 3rd focusing, methods described also includes:
In the case where the judgment result is yes, continued to obtain the focal length value of focusing according to the initial value+4* step-lengths, directly The focus value obtained to first camera is higher than the focus value that the second camera obtains, and determines first camera Focusing corresponding to the focus value of acquisition is shooting focus.
Another aspect according to embodiments of the present invention, additionally provides a kind of mobile terminal, and the mobile terminal includes:First Camera, second camera, processor, memory and communication bus, wherein,
First camera and the second camera, it is respectively used to focus to the image of shooting;
The communication bus, for realizing the connection communication between the processor and the memory;
The processor, for performing the dual camera stored in memory focusing program, to realize following steps:
Pair calculated in focusing area per fragment position is respectively separated by first camera and the second camera Focus;
Calculate the focus value between two neighboring focusing;
Focus value in each focusing is compared, shooting focus is determined according to the result of contrast.
Alternatively, the processor is additionally operable to perform dual camera focusing program, to realize following steps:
The focus value P1 of the first focusing is obtained by first camera, second is obtained by the second camera The focus value P2 of focusing;
Wherein, the focal length of first focusing is the initial value pre-set, and second focusing is the starting Value+step-length, the step-length are configured previously according to demand.
Alternatively, the processor is additionally operable to perform dual camera focusing program, to realize following steps:
The focus value P2 with judging the clear of second focusing by way of the size of the focus value P1 Whether clear degree is higher than the definition of first focusing;
In the case where judged result is no, determine first focusing for shooting focus.
Alternatively, the processor is additionally operable to perform dual camera focusing program, to realize following steps:
Judging second focusing by way of the focus value P2 and the focus value P1 size After whether definition is higher than the definition of first focusing, in the case where the judgment result is yes, first shooting Head obtains the focus value P3 of the 3rd focusing with the initial value+2* step-lengths;The second camera is walked with the initial value+3* The long focus value P4 for obtaining the 4th focusing;
The focus value P4 with judging the clear of the 4th focusing by way of the size of the focus value P3 Whether clear degree is higher than the definition of the 3rd focusing;
In the case where judged result is no, determine the 3rd focusing for shooting focus.
Alternatively, the processor is additionally operable to perform dual camera focusing program, to realize following steps:
Judging the 4th focusing by way of the focus value P4 and the focus value P3 size After whether definition is higher than the definition of the 3rd focusing, in the case where the judgment result is yes, according to the starting Value+4* step-lengths continue to obtain the focal length value of focusing, until the focus value that first camera obtains is taken the photograph higher than described second As the focus value that head obtains, determine focusing corresponding to the focus value that first camera obtains for shooting focus.
Another aspect according to embodiments of the present invention, additionally provide a kind of computer-readable recording medium, the computer Readable storage medium storing program for executing is stored with one or more program, and one or more of programs can be by one or more processor Perform, the step of to realize above-mentioned dual camera focusing method.
By the present invention, it is respectively separated by the first camera and second camera and calculates every fragment position in focusing area Focusing;Calculate the focus value between two neighboring focusing;Focus value in each focusing is compared, according to contrast As a result shooting focus is determined, solves the problems, such as that camera focusing needs the long period in correlation technique, it is same by dual camera When focus, accelerate focus process, reduce focusing time, focusing time can be reduced will by about one time, improves Consumer's Experience.
Brief description of the drawings
Fig. 1 is the hardware architecture diagram for realizing each one optional mobile terminal of embodiment of the present invention;
Fig. 2 is the wireless communication system schematic diagram of mobile terminal as shown in Figure 1;
Fig. 3 is the flow chart of dual camera focusing method according to embodiments of the present invention;
Fig. 4 is the schematic diagram one of dual camera focusing according to embodiments of the present invention;
Fig. 5 is the schematic diagram two of dual camera focusing according to embodiments of the present invention;
Fig. 6 is the schematic diagram three of dual camera focusing according to embodiments of the present invention;
Fig. 7 is the block diagram of mobile terminal according to embodiments of the present invention.
The realization, functional characteristics and advantage of the object of the invention will be described further referring to the drawings in conjunction with the embodiments.
Embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
In follow-up description, the suffix using such as " module ", " part " or " unit " for representing element is only Be advantageous to the explanation of the present invention, itself there is no a specific meaning.Therefore, " module ", " part " or " unit " can mix Ground uses.
Terminal can be implemented in a variety of manners.For example, the terminal described in the present invention can include such as mobile phone, flat board Computer, notebook computer, palm PC, personal digital assistant (Personal Digital Assistant, PDA), portable Media player (Portable Media Player, PMP), guider, wearable device, Intelligent bracelet, pedometer etc. move Dynamic terminal, and the fixed terminal such as digital TV, desktop computer.
It will be illustrated in subsequent descriptions by taking mobile terminal as an example, it will be appreciated by those skilled in the art that except special Outside element for moving purpose, construction according to the embodiment of the present invention can also apply to the terminal of fixed type.
Referring to Fig. 1, its hardware architecture diagram for a kind of mobile terminal of each embodiment of the realization present invention, the shifting Dynamic terminal 100 can include:RF (Radio Frequency, radio frequency) unit 101, WiFi module 102, audio output unit 103rd, A/V (audio/video) input block 104, sensor 105, display unit 106, user input unit 107, interface unit 108th, the part such as memory 109, processor 110 and power supply 111.It will be understood by those skilled in the art that shown in Fig. 1 Mobile terminal structure does not form the restriction to mobile terminal, and mobile terminal can be included than illustrating more or less parts, Either combine some parts or different parts arrangement.
The all parts of mobile terminal are specifically introduced with reference to Fig. 1:
Radio frequency unit 101 can be used for receiving and sending messages or communication process in, the reception and transmission of signal, specifically, by base station Downlink information receive after, handled to processor 110;In addition, up data are sent to base station.Generally, radio frequency unit 101 Including but not limited to antenna, at least one amplifier, transceiver, coupler, low-noise amplifier, duplexer etc..In addition, penetrate Frequency unit 101 can also be communicated by radio communication with network and other equipment.Above-mentioned radio communication can use any communication Standard or agreement, including but not limited to GSM (Global System of Mobile communication, global system for mobile telecommunications System), GPRS (General Packet Radio Service, general packet radio service), CDMA2000 (Code Division Multiple Access 2000, CDMA 2000), WCDMA (Wideband Code Division Multiple Access, WCDMA), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access, TD SDMA), FDD-LTE (Frequency Division Duplexing-Long Term Evolution, FDD Long Term Evolution) and TDD-LTE (Time Division Duplexing-Long Term Evolution, time division duplex Long Term Evolution) etc..
WiFi belongs to short range wireless transmission technology, and mobile terminal can help user to receive and dispatch electricity by WiFi module 102 Sub- mail, browse webpage and access streaming video etc., it has provided the user wireless broadband internet and accessed.Although Fig. 1 shows Go out WiFi module 102, but it is understood that, it is simultaneously not belonging to must be configured into for mobile terminal, completely can be according to need To be omitted in the essential scope for do not change invention.
Audio output unit 103 can be in call signal reception pattern, call mode, record mould in mobile terminal 100 When under the isotypes such as formula, speech recognition mode, broadcast reception mode, by radio frequency unit 101 or WiFi module 102 it is receiving or It is sound that the voice data stored in memory 109, which is converted into audio signal and exported,.Moreover, audio output unit 103 The audio output related to the specific function that mobile terminal 100 performs can also be provided (for example, call signal receives sound, disappeared Breath receives sound etc.).Audio output unit 103 can include loudspeaker, buzzer etc..
A/V input blocks 104 are used to receive audio or video signal.A/V input blocks 104 can include graphics processor (Graphics Processing Unit, GPU) 1041 and microphone 1042, graphics processor 1041 is in video acquisition mode Or the static images or the view data of video obtained in image capture mode by image capture apparatus (such as camera) are carried out Reason.Picture frame after processing may be displayed on display unit 106.Picture frame after the processing of graphics processor 1041 can be deposited Storage is transmitted in memory 109 (or other storage mediums) or via radio frequency unit 101 or WiFi module 102.Mike Wind 1042 can connect in telephone calling model, logging mode, speech recognition mode etc. operational mode via microphone 1042 Quiet down sound (voice data), and can be voice data by such acoustic processing.Audio (voice) data after processing can To be converted to the form output that mobile communication base station can be sent to via radio frequency unit 101 in the case of telephone calling model. Microphone 1042 can implement various types of noises and eliminate (or suppression) algorithm to eliminate (or suppression) in reception and send sound Caused noise or interference during frequency signal.
Mobile terminal 100 also includes at least one sensor 105, such as optical sensor, motion sensor and other biographies Sensor.Specifically, optical sensor includes ambient light sensor and proximity transducer, wherein, ambient light sensor can be according to environment The light and shade of light adjusts the brightness of display panel 1061, and proximity transducer can close when mobile terminal 100 is moved in one's ear Display panel 1061 and/or backlight.As one kind of motion sensor, accelerometer sensor can detect in all directions (general For three axles) size of acceleration, size and the direction of gravity are can detect that when static, the application available for identification mobile phone posture (such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, percussion) etc.; The fingerprint sensor that can also configure as mobile phone, pressure sensor, iris sensor, molecule sensor, gyroscope, barometer, The other sensors such as hygrometer, thermometer, infrared ray sensor, will not be repeated here.
Display unit 106 is used for the information for showing the information inputted by user or being supplied to user.Display unit 106 can wrap Display panel 1061 is included, liquid crystal display (Liquid Crystal Display, LCD), Organic Light Emitting Diode can be used Forms such as (Organic Light-Emitting Diode, OLED) configures display panel 1061.
User input unit 107 can be used for the numeral or character information for receiving input, and produce the use with mobile terminal The key signals input that family is set and function control is relevant.Specifically, user input unit 107 may include contact panel 1071 with And other input equipments 1072.Contact panel 1071, also referred to as touch-screen, collect touch operation of the user on or near it (for example user uses any suitable objects or annex such as finger, stylus on contact panel 1071 or in contact panel 1071 Neighbouring operation), and corresponding attachment means are driven according to formula set in advance.Contact panel 1071 may include touch detection Two parts of device and touch controller.Wherein, the touch orientation of touch detecting apparatus detection user, and detect touch operation band The signal come, transmits a signal to touch controller;Touch controller receives touch information from touch detecting apparatus, and by it Contact coordinate is converted into, then gives processor 110, and the order sent of reception processing device 110 and can be performed.In addition, can To realize contact panel 1071 using polytypes such as resistance-type, condenser type, infrared ray and surface acoustic waves.Except contact panel 1071, user input unit 107 can also include other input equipments 1072.Specifically, other input equipments 1072 can wrap Include but be not limited to physical keyboard, in function key (such as volume control button, switch key etc.), trace ball, mouse, action bars etc. One or more, do not limit herein specifically.
Further, contact panel 1071 can cover display panel 1061, detect thereon when contact panel 1071 or After neighbouring touch operation, processor 110 is sent to determine the type of touch event, is followed by subsequent processing device 110 according to touch thing The type of part provides corresponding visual output on display panel 1061.Although in Fig. 1, contact panel 1071 and display panel 1061 be the part independent as two to realize the input of mobile terminal and output function, but in certain embodiments, can Input and the output function of mobile terminal are realized so that contact panel 1071 and display panel 1061 is integrated, is not done herein specifically Limit.
Interface unit 108 is connected the interface that can pass through as at least one external device (ED) with mobile terminal 100.For example, External device (ED) can include wired or wireless head-band earphone port, external power source (or battery charger) port, wired or nothing Line FPDP, memory card port, the port for connecting the device with identification module, audio input/output (I/O) end Mouth, video i/o port, ear port etc..Interface unit 108 can be used for receiving the input from external device (ED) (for example, number It is believed that breath, electric power etc.) and the input received is transferred to one or more elements in mobile terminal 100 or can be with For transmitting data between mobile terminal 100 and external device (ED).
Memory 109 can be used for storage software program and various data.Memory 109 can mainly include storing program area And storage data field, wherein, storing program area can storage program area, application program (such as the sound needed at least one function Sound playing function, image player function etc.) etc.;Storage data field can store according to mobile phone use created data (such as Voice data, phone directory etc.) etc..In addition, memory 109 can include high-speed random access memory, can also include non-easy The property lost memory, a for example, at least disk memory, flush memory device or other volatile solid-state parts.
Processor 110 is the control centre of mobile terminal, utilizes each of various interfaces and the whole mobile terminal of connection Individual part, by running or performing the software program and/or module that are stored in memory 109, and call and be stored in storage Data in device 109, the various functions and processing data of mobile terminal are performed, so as to carry out whole monitoring to mobile terminal.Place Reason device 110 may include one or more processing units;Preferably, processor 110 can integrate application processor and modulatedemodulate is mediated Device is managed, wherein, application processor mainly handles operating system, user interface and application program etc., and modem processor is main Handle radio communication.It is understood that above-mentioned modem processor can not also be integrated into processor 110.
Mobile terminal 100 can also include the power supply 111 (such as battery) to all parts power supply, it is preferred that power supply 111 Can be logically contiguous by power-supply management system and processor 110, so as to realize management charging by power-supply management system, put The function such as electricity and power managed.
Although Fig. 1 is not shown, mobile terminal 100 can also will not be repeated here including bluetooth module etc..
For the ease of understanding the embodiment of the present invention, the communications network system being based on below to the mobile terminal of the present invention enters Row description.
Referring to Fig. 2, Fig. 2 is a kind of communications network system Organization Chart provided in an embodiment of the present invention, the communication network system Unite as the LTE system of universal mobile communications technology, the UE that the LTE system includes communicating connection successively (User Equipment, is used Family equipment) 201, E-UTRAN (Evolved UMTS Terrestrial Radio Access Network, evolved UMTS lands Ground wireless access network) 202, EPC (Evolved Packet Core, evolved packet-based core networks) 203 and operator IP operation 204。
Specifically, UE201 can be above-mentioned terminal 100, and here is omitted.
E-UTRAN202 includes eNodeB2021 and other eNodeB2022 etc..Wherein, eNodeB2021 can be by returning Journey (backhaul) (such as X2 interface) is connected with other eNodeB2022, and eNodeB2021 is connected to EPC203, ENodeB2021 can provide UE201 to EPC203 access.
EPC203 can include MME (Mobility Management Entity, mobility management entity) 2031, HSS (Home Subscriber Server, home subscriber server) 2032, other MME2033, SGW (Serving Gate Way, Gateway) 2034, PGW (PDN Gate Way, grouped data network gateway) 2035 and PCRF (Policy and Charging Rules Function, policy and rate functional entity) 2036 etc..Wherein, MME2031 be processing UE201 and The control node of signaling between EPC203, there is provided carrying and connection management.HSS2032 is all to manage for providing some registers Such as the function of attaching position register (not shown) etc, and preserve some and used about service features, data rate etc. The special information in family.All customer data can be transmitted by SGW2034, and PGW2035 can provide UE 201 IP Address is distributed and other functions, and PCRF2036 is strategy and the charging control strategic decision-making of business data flow and IP bearing resources Point, it selects and provided available strategy and charging control decision-making with charge execution function unit (not shown) for strategy.
IP operation 204 can include internet, Intranet, IMS (IP Multimedia Subsystem, IP multimedia System) or other IP operations etc..
Although above-mentioned be described by taking LTE system as an example, those skilled in the art it is to be understood that the present invention not only Suitable for LTE system, be readily applicable to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA with And following new network system etc., do not limit herein.
Based on above-mentioned mobile terminal hardware configuration and communications network system, each embodiment of the inventive method is proposed.
Embodiment 1
Based on above-mentioned mobile terminal, the embodiments of the invention provide a kind of dual camera focusing method, Fig. 3 is according to this The flow chart of the dual camera focusing method of inventive embodiments, as shown in figure 3, this method comprises the following steps:
Step S301, pair calculated in focusing area per fragment position is respectively separated by the first camera and second camera Focus;
Step S302, calculate the focus value between two neighboring focusing;
Step S303, the focus value in each focusing is compared, shooting focus is determined according to the result of contrast.
By above-mentioned steps, it is respectively separated and is calculated in focusing area per fragment position by the first camera and second camera Focusing;Calculate the focus value between two neighboring focusing;Focus value in each focusing is compared, according to contrast Result determine shooting focus, solve the problems, such as that camera focusing needs the long period in correlation technique, passes through dual camera Focus simultaneously, accelerate focus process, reduce focusing time, focusing time can be reduced will by about one time, improves Consumer's Experience.
Fig. 4 is the schematic diagram one of dual camera focusing according to embodiments of the present invention, as shown in figure 4, passing through the first shooting Head and second camera, which are respectively separated the focusing calculated in focusing area per fragment position, to be included:Imaged by described first Head obtains the focus value P1 of the first focusing, and the focus value P2 of the second focusing is obtained by the second camera;Wherein, institute The focal length for stating the first focusing is the initial value pre-set, and second focusing is the initial value+step-length, the step-length It is configured previously according to demand.
Alternatively, the focus value in each focusing is compared, determines that shooting focus includes according to the result of contrast: Judged by way of the focus value P2 and the focus value P1 size second focusing definition whether Higher than the definition of first focusing;In the case where judged result is no, determine that first focusing is burnt for shooting Point.
Fig. 5 is the schematic diagram two of dual camera focusing according to embodiments of the present invention, as shown in figure 5, by comparing Whether the mode for stating focus value P2 and the focus value P1 size judges the definition of second focusing higher than described the After the definition of one focusing, methods described also includes:In the case where the judgment result is yes, first camera is with institute State the focus value P3 that initial value+2* step-lengths obtain the 3rd focusing;The second camera is obtained with the initial value+3* step-lengths The focus value P4 of 4th focusing;Described the is judged by way of the focus value P4 and the focus value P3 size Whether the definition of four focusings is higher than the definition of the 3rd focusing;Fig. 6 is double shootings according to embodiments of the present invention The schematic diagram three of head focusing, as shown in fig. 6, in the case where judged result is no, i.e., the definition of the 3rd focusing is higher than institute The definition of the 4th focusing is stated, determines the 3rd focusing for shooting focus.
Alternatively, described 4th pair is being judged by way of the focus value P4 and the focus value P3 size After whether the definition of focus is higher than the definition of the 3rd focusing, methods described also includes:It is yes in judged result In the case of, continued to obtain the focal length value of focusing according to the initial value+4* step-lengths, obtained until first camera Focus value is higher than the focus value that the second camera obtains, and determines to focus corresponding to the focus value that first camera obtains Point is shooting focus.
The focusing of dual camera in the embodiment of the present invention, focused by the first camera and second camera interval calculation Focusing in region per fragment position, calculates the contrast value between two neighboring focusing, the contrast value in each focusing is entered Row compares, and obtains shooting focus.The mode of focus is only calculated using a camera compared with the prior art so that dual camera exists Amount of calculation reduces half in focus process, focuses one times of time shortening.
Contrast focusing mode:
TAB is initial value, and len [N] array is customized parameter.
Step 1:The viewfinder image P1 that TAB value is the first posterior focal distance probe parameters is taken, is second with TAB+len [0] value The viewfinder image P2 of focal length probe parameters.P1 and P2 is contrasted, if more and more clearIf it is not, P1 is most clearly point, TAB is then For final focal length.If perform step 2
Step 2:Take TAB+len [0]+len [1] value be third time focal length probe parameters viewfinder image P3, and with P2 pairs Than, if it is more and more clearIf it is not, P2 is most clearly point, TAB+len [0] value are then final focal length.If perform step 3
Step 3:Aforesaid operations are repeated, until finding final focal length.Focus and fail if final focal length is not found all the time.
Wherein, len [N] array, focusing speed and focusing precision are decide.N is bigger, and span each len is smaller, then right Burnt speed is slower, and focusing precision is higher.
Double modes for taking the photograph contrast focusing:
Step 1:The viewfinder image P1 that the first posterior focal distance probe parameters are taken the photograph based on TAB value is taken, is pair with TAB+len [0] value Take the photograph the viewfinder image P2 of the first posterior focal distance probe parameters.
Herein P1 and P2 be and meanwhile value obtain image, effectively avoid traditional priority find a view because mobile phone shake caused by Picture difference is bigger to cause mobile phone focusing failure.
P1 and P2 is contrasted, if more and more clearIf it is not, P1 is most clearly point, TAB is then final focal length, if holding Row step 2.
Step 2:The viewfinder image P3 that the second posterior focal distance probe parameters are taken the photograph based on TAB+len [0]+len [1] value is taken, with TAB + len [0]+len [1]+len [2] value takes the photograph the viewfinder image P4 of the first posterior focal distance probe parameters for pair.P3 and P4 is contrasted, if more It is more clear to comeIf it is not, P3 is most clearly point, TAB+len [0] value are then final focal length.If perform step 3.
Step 3:Aforesaid operations are repeated, until finding final focal length.Focus and fail if final focal length is not found all the time.
In the case where len [N] is constant, it is possible to reduce the focusing time of half, can be with the situation that focusing time is constant The focusing precision doubled.
The embodiment of the present invention is described in detail below.
The quick focusing method of dual camera specifically includes in the embodiment of the present invention:
Step S1, first group of focusing is obtained by the first camera, second camera, it is previous right that every group of focusing includes Focus and latter focusing.
Before this step, the focusing of previous image, the starting pair using the focusing as present image are first obtained Focus.
In this step, previous focusing is obtained by the first camera, latter focusing is obtained by second camera, often Group focusing includes previous focusing and latter focusing.
Step S2, judges whether the focus value of latter focusing is more than the focus value of previous focusing.
In this step, the size of the focus value of more latter focusing and the focus value of previous focusing.After detecting The focus value that the focus value of one focusing is more than previous focusing is continued through under the first camera and second camera acquisition One group of focusing, and judge whether latter focusing is more than the focus value of previous focusing;
Above-mentioned example, the size of the focus value of more latter focusing and the focus value of previous focusing are accepted, circulation is held The step of row obtains focusing and judges the size of the focus value of latter focusing and the focus value of previous focusing.
In the present invention, focus value is bigger, represents that the image of the focusing is more clear;Focus value is smaller, represents the focusing Image it is more unintelligible.
In this step, when the focus value of latter focusing is more than the focus value of previous focusing, continues through first and take the photograph As head next group of focusing of acquisition, it is further continued for judging the focus value of the latter focusing in next group of focusing and previous focusing Focus value size.
This step includes following 4 kinds of situations:
I1 represents the previous focusing of first group of focusing, and J1 represents the latter focusing of first group of focusing, and I2 is represented The previous focusing of second group of focusing, J2 represent the latter focusing of second group of focusing, I3 the 3rd group of focusing of expression Previous focusing, J3 represent the latter focusing of the 3rd group of focusing.
Situation 1:When finding I1 < J1 < I2 < J2, now represent that the focus value of the focusings of J 2 is maximum, as it was previously stated, Focus value is bigger, represents that the image of the focusing is more clear, now shows that focusing point curve is in ascendant trend, then needs to pass through First camera and second camera are continued to search for, and continuous three focusings of downward trend are in until finding.
Situation 2:When finding I1 < J1 < I2 > J2, now show that the focus value of I2 focusings is maximum, such case can It can be that to have slight fluctuation or I2 focusings be crest to focusing point curve, therefore continue the I3 focusings in the 3rd group of focusing of detection Focus value and J3 focusings focus value;If detect J2 < I3 < J3, then it represents that focusing point curve has slight fluctuation;If inspection Measure J2 > I3 > J3, then it represents that I2 crests, using I2 focusings as the first focusing.If detect J2 < I3 > J3, table Show the focusing multiple slight fluctuation of point curve;If detect J2 > I3 < J3, then it represents that focusing point curve has slight fluctuation.
Situation 3:As J1 >=I2≤J2, being now likely to focusing point curve has slight fluctuation, as situation 2, needs Continue to detect the focus value of I3 focusings and the focus value of J3 focusings, here is omitted.
Situation 4:As I1 < J1 > I2 > J2, such case is probably that focusing point curve has slight fluctuation or J1 focusings For crest, with situation 2, it is necessary to continue to detect the focus value of I3 focusings and the focus value of J3 focusings, it is no longer superfluous herein State.
Step S3, a certain focusing before the focus value for finding continuous three focusings is less than three focusings During focus value, image taking is carried out using a certain focusing as the first focusing.
Above-mentioned example is accepted, the focus value that the first camera obtains I3 focusings is continued through, is obtained by second camera The focus value of J3 focusings is taken, as it was previously stated, until the focus value for finding continuous three focusings is less than three focusings During the focus value of preceding a certain focusing, image taking is carried out using a certain focusing as the first focusing.
Here, the previous focusing is adjacent with the latter focusing and is spaced the first step-length.
In an optional embodiment, after the step S3, in addition to:Step S4, described first pair according to lookup The method of focus searches the second focusing to opposite direction, and the method that the opposite direction searches the second focusing includes:
Step S41, the first camera is repositioned onto focusing starting point, continues through the first camera and the second shooting Head obtains next group of focusing, and judges whether latter focusing is more than the focus value of previous focusing.
Step S42, a certain focusing before the focus value for finding continuous three focusings is less than three focusings Focus value when, using a certain focusing as the second focusing carry out image taking.
Specifically, being searched according to the method opposite direction for searching first focusing, the first camera is repositioned onto The focusing starting point, it is described to focus on the previous focusing that starting point is first group of focusing, continue through the first camera and Second camera obtains next group of focusing, and judges whether latter focusing is more than the focus value of previous focusing, likewise, When the focus value of a certain focusing before the focus value for finding continuous three focusings is less than three focusings, by described in A certain focusing carries out image taking as the second focusing.
In the present invention, step S1- steps S4 may be considered the process of coarse scan, and following step S5, which may be considered, carefully to be swept Process, the first focusing found by step S1- steps S3 is not definition highest focusing, the first focusing A simply clearly point relatively, in order to find most clearly the 3rd focusing thus need to perform step S4 and search the second focusing Point.
In an optional embodiment, methods described also includes:Step S5, in first focusing and the second focusing Between, search focus value maximum from second focusing to first focusing based on the second step-length using prior art Focusing, image taking is carried out using the maximum focusing of focus value as the 3rd focusing.
In this step, the maximum focusing of focus value is searched between first focusing and the second focusing.Specifically , the maximum focusing of focus value is found from second focusing to first focusing based on the second step-length, will be poly- The maximum focusing of coke number carries out image taking as the 3rd focusing.The 3rd focusing now found out is only definition highest Focusing, the image shot using the 3rd focusing is only most clearly.
Wherein, second step-length is less than first step-length.Optionally, second step-length is the 1/2 of the first step-length.
Here, the implementation process of technical scheme is illustrated:
First, the first step, initial position of first camera using the focusing of upper piece image that shoots as focusing x;And inscribe when same, when the first camera is located at focusing initial position x, camera 2 is located on initial position basis At x+ △ x positions after upper increase shift length △ x.
Then, second step, judges whether the definition at the x+ △ x positions residing for second camera is more than the first camera Definition at the x of location.If so, the 3rd step then continued with.If it is not, then detected the presence of as it was previously stated, working as When follow-up continuous three points are in downward trend, an end points using initial position x as coarse scan curve, the first camera Initial position x is repositioned onto, using initial position x as starting point, goes to search the second focusing after the same method towards opposite direction Point.
Secondly, the 3rd step, the first camera be located at the x+ after the shift length △ x for increasing by 2 times on the basis of initial position x When at 2 △ x positions, second camera be located at initial position increase by 3 times of shift length △ x after x+3 △ x positions at, again after Continue and judge continuous three points, whether the definition at x+ △ x, x+2 △ x and x+3 △ x is to increase always, if so, then the first shooting Head and second camera 2 continue to move toward next opening position respectively, judge the definition at each position, until continuous three Untill reducing occurs in the definition of point.
Again, according to the method iteration in second step and the 3rd step, after completing coarse scan process, then shift length △ x are reduced Carefully swept in the curve ranges that coarse scan obtains in the same way, until finding definition highest point as focusing.
Value is focused by regarding two focusings as one group in the present invention to compare, and passes through one compared to prior art The mode that camera is compared one by one, focusing time can be reduced will by about one time.
Embodiment 2
Another aspect according to embodiments of the present invention, additionally provides a kind of mobile terminal, and Fig. 7 is according to embodiments of the present invention Mobile terminal block diagram, as shown in fig. 7, the mobile terminal includes:First camera, second camera (do not show in figure Go out), processor, memory and communication bus, wherein,
First camera and the second camera, it is respectively used to focus to the image of shooting;
The communication bus, for realizing the connection communication between the processor and the memory;
The processor, for performing the dual camera stored in memory focusing program, to realize following steps:
Pair calculated in focusing area per fragment position is respectively separated by first camera and the second camera Focus;
Calculate the focus value between two neighboring focusing;
Focus value in each focusing is compared, shooting focus is determined according to the result of contrast.
Alternatively, the processor is additionally operable to perform dual camera focusing program, to realize following steps:
The focus value P1 of the first focusing is obtained by first camera, second is obtained by the second camera The focus value P2 of focusing;
Wherein, the focal length of first focusing is the initial value pre-set, and second focusing is the starting Value+step-length, the step-length are configured previously according to demand.
Alternatively, the processor is additionally operable to perform dual camera focusing program, to realize following steps:
The focus value P2 with judging the clear of second focusing by way of the size of the focus value P1 Whether clear degree is higher than the definition of first focusing;
In the case where judged result is no, determine first focusing for shooting focus.
Alternatively, the processor is additionally operable to perform dual camera focusing program, to realize following steps:
Judging second focusing by way of the focus value P2 and the focus value P1 size After whether definition is higher than the definition of first focusing, in the case where the judgment result is yes, first shooting Head obtains the focus value P3 of the 3rd focusing with the initial value+2* step-lengths;The second camera is walked with the initial value+3* The long focus value P4 for obtaining the 4th focusing;
The focus value P4 with judging the clear of the 4th focusing by way of the size of the focus value P3 Whether clear degree is higher than the definition of the 3rd focusing;
In the case where judged result is no, determine the 3rd focusing for shooting focus.
Alternatively, the processor is additionally operable to perform dual camera focusing program, to realize following steps:
Judging the 4th focusing by way of the focus value P4 and the focus value P3 size After whether definition is higher than the definition of the 3rd focusing, in the case where the judgment result is yes, according to the starting Value+4* step-lengths continue to obtain the focal length value of focusing, until the focus value that first camera obtains is taken the photograph higher than described second As the focus value that head obtains, determine focusing corresponding to the focus value that first camera obtains for shooting focus.
Embodiment 3
Another aspect according to embodiments of the present invention, additionally provide a kind of computer-readable recording medium, the computer Readable storage medium storing program for executing is stored with one or more program, and one or more of programs can be by one or more processor Perform, to realize the following steps of above-mentioned dual camera focusing method:
S11, the focusing calculated in focusing area per fragment position is respectively separated by the first camera and second camera;
S12, calculate the focus value between two neighboring focusing;
S13, the focus value in each focusing is compared, shooting focus is determined according to the result of contrast.
The embodiment of the present invention, it is respectively separated and is calculated in focusing area per fragment position by the first camera and second camera Focusing;Calculate the focus value between two neighboring focusing;Focus value in each focusing is compared, according to contrast Result determine shooting focus, solve the problems, such as that camera focusing needs the long period in correlation technique, passes through dual camera Focus simultaneously, accelerate focus process, reduce focusing time, focusing time can be reduced will by about one time, improves Consumer's Experience.
It should be noted that herein, term " comprising ", "comprising" or its any other variant are intended to non-row His property includes, so that process, method, article or device including a series of elements not only include those key elements, and And also include the other element being not expressly set out, or also include for this process, method, article or device institute inherently Key element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that including this Other identical element also be present in the process of key element, method, article or device.
The embodiments of the present invention are for illustration only, do not represent the quality of embodiment.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can add the mode of required general hardware platform to realize by software, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on such understanding, technical scheme is substantially done to prior art in other words Going out the part of contribution can be embodied in the form of software product, and the computer software product is stored in a storage medium In (such as ROM/RAM, magnetic disc, CD), including some instructions to cause a station terminal (can be mobile phone, computer, service Device, air conditioner, or network equipment etc.) perform method described in each embodiment of the present invention.
Embodiments of the invention are described above in conjunction with accompanying drawing, but the invention is not limited in above-mentioned specific Embodiment, above-mentioned embodiment is only schematical, rather than restricted, one of ordinary skill in the art Under the enlightenment of the present invention, in the case of present inventive concept and scope of the claimed protection is not departed from, it can also make a lot Form, these are belonged within the protection of the present invention.

Claims (10)

  1. A kind of 1. dual camera focusing method, it is characterised in that including:
    The focusing calculated in focusing area per fragment position is respectively separated by the first camera and second camera;
    Calculate the focus value between two neighboring focusing;
    Focus value in each focusing is compared, shooting focus is determined according to the result of contrast.
  2. 2. according to the method for claim 1, it is characterised in that meter is respectively separated by the first camera and second camera Calculating the focusing in focusing area per fragment position includes:
    The focus value P1 of the first focusing is obtained by first camera, the second focusing is obtained by the second camera The focus value P2 of point;
    Wherein, the focal length of first focusing is the initial value pre-set, and second focusing is the initial value+step Long, the step-length is configured previously according to demand.
  3. 3. according to the method for claim 2, it is characterised in that the focus value in each focusing is compared, according to The result of contrast determines that shooting focus includes:
    The definition of second focusing is judged by way of the focus value P2 and focus value P1 size Whether the definition of first focusing is higher than;
    In the case where judged result is no, determine first focusing for shooting focus.
  4. 4. according to the method for claim 3, it is characterised in that passing through the focus value P2 and the focus value P1 Size mode judge second focusing definition whether higher than first focusing definition after, it is described Method also includes:
    In the case where the judgment result is yes, first camera obtains the 3rd focusing with the initial value+2* step-lengths Focus value P3;The second camera obtains the focus value P4 of the 4th focusing with the initial value+3* step-lengths;
    The definition of the 4th focusing is judged by way of the focus value P4 and focus value P3 size Whether the definition of threeth focusing is higher than;
    In the case where judged result is no, determine the 3rd focusing for shooting focus.
  5. 5. according to the method for claim 4, it is characterised in that passing through the focus value P4 and the focus value P3 Size mode judge the 4th focusing definition whether higher than the 3rd focusing definition after, it is described Method also includes:
    In the case where the judgment result is yes, continued to obtain the focal length value of focusing, Zhi Daosuo according to the initial value+4* step-lengths The focus value for stating the acquisition of the first camera is higher than the focus value that the second camera obtains, and determines that first camera obtains Focus value corresponding to focusing for shooting focus.
  6. 6. a kind of mobile terminal, it is characterised in that the mobile terminal includes:First camera, second camera, processor, Memory and communication bus, wherein,
    First camera and the second camera, it is respectively used to focus to the image of shooting;
    The communication bus, for realizing the connection communication between the processor and the memory;
    The processor, for performing the dual camera stored in memory focusing program, to realize following steps:
    The focusing calculated in focusing area per fragment position is respectively separated by first camera and the second camera;
    Calculate the focus value between two neighboring focusing;
    Focus value in each focusing is compared, shooting focus is determined according to the result of contrast.
  7. 7. mobile terminal according to claim 6, it is characterised in that the processor is additionally operable to perform dual camera focusing Program, to realize following steps:
    The focus value P1 of the first focusing is obtained by first camera, the second focusing is obtained by the second camera The focus value P2 of point;
    Wherein, the focal length of first focusing is the initial value pre-set, and second focusing is the initial value+step Long, the step-length is configured previously according to demand.
  8. 8. mobile terminal according to claim 7, it is characterised in that the processor is additionally operable to perform dual camera focusing Program, to realize following steps:
    The definition of second focusing is judged by way of the focus value P2 and focus value P1 size Whether the definition of first focusing is higher than;
    In the case where judged result is no, determine first focusing for shooting focus.
  9. 9. mobile terminal according to claim 8, it is characterised in that the processor is additionally operable to perform dual camera focusing Program, to realize following steps:
    Judge the clear of second focusing by way of the focus value P2 with the size of the focus value P1 Degree whether higher than first focusing definition after, in the case where the judgment result is yes, first camera with Initial value+2* the step-lengths obtain the focus value P3 of the 3rd focusing;The second camera is obtained with the initial value+3* step-lengths Take the focus value P4 of the 4th focusing;
    The definition of the 4th focusing is judged by way of the focus value P4 and focus value P3 size Whether the definition of threeth focusing is higher than;
    In the case where judged result is no, determine the 3rd focusing for shooting focus.
  10. A kind of 10. computer-readable recording medium, it is characterised in that the computer-readable recording medium storage have one or Multiple programs, one or more of programs can be appointed by one or more computing device with realizing in claim 1-5 The step of one dual camera focusing method.
CN201710912720.9A 2017-09-30 2017-09-30 A kind of dual camera focusing method, mobile terminal and computer-readable recording medium Pending CN107566735A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710912720.9A CN107566735A (en) 2017-09-30 2017-09-30 A kind of dual camera focusing method, mobile terminal and computer-readable recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710912720.9A CN107566735A (en) 2017-09-30 2017-09-30 A kind of dual camera focusing method, mobile terminal and computer-readable recording medium

Publications (1)

Publication Number Publication Date
CN107566735A true CN107566735A (en) 2018-01-09

Family

ID=60984685

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710912720.9A Pending CN107566735A (en) 2017-09-30 2017-09-30 A kind of dual camera focusing method, mobile terminal and computer-readable recording medium

Country Status (1)

Country Link
CN (1) CN107566735A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110243339A (en) * 2019-06-25 2019-09-17 重庆紫光华山智安科技有限公司 A kind of monocular cam localization method, device, readable storage medium storing program for executing and electric terminal
CN112492210A (en) * 2020-12-01 2021-03-12 维沃移动通信有限公司 Photographing method and device, electronic equipment and storage medium
CN114422665A (en) * 2021-12-23 2022-04-29 广东未来科技有限公司 Shooting method based on multiple cameras and related device
CN116233605A (en) * 2023-05-08 2023-06-06 此芯科技(武汉)有限公司 Focusing implementation method and device, storage medium and image pickup equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150215516A1 (en) * 2014-01-27 2015-07-30 Ratheon Company Imaging system and methods with variable lateral magnification
CN106161941A (en) * 2016-07-29 2016-11-23 深圳众思科技有限公司 Dual camera chases after burnt method, device and terminal automatically
CN106412437A (en) * 2016-10-19 2017-02-15 广东欧珀移动通信有限公司 Terminal focusing method and device, and terminal
CN106572305A (en) * 2016-11-03 2017-04-19 乐视控股(北京)有限公司 Image shooting method, image processing method, apparatuses and electronic device
CN106713718A (en) * 2017-02-27 2017-05-24 努比亚技术有限公司 Dual camera-based focusing method and mobile terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150215516A1 (en) * 2014-01-27 2015-07-30 Ratheon Company Imaging system and methods with variable lateral magnification
CN106161941A (en) * 2016-07-29 2016-11-23 深圳众思科技有限公司 Dual camera chases after burnt method, device and terminal automatically
CN106412437A (en) * 2016-10-19 2017-02-15 广东欧珀移动通信有限公司 Terminal focusing method and device, and terminal
CN106572305A (en) * 2016-11-03 2017-04-19 乐视控股(北京)有限公司 Image shooting method, image processing method, apparatuses and electronic device
CN106713718A (en) * 2017-02-27 2017-05-24 努比亚技术有限公司 Dual camera-based focusing method and mobile terminal

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110243339A (en) * 2019-06-25 2019-09-17 重庆紫光华山智安科技有限公司 A kind of monocular cam localization method, device, readable storage medium storing program for executing and electric terminal
CN112492210A (en) * 2020-12-01 2021-03-12 维沃移动通信有限公司 Photographing method and device, electronic equipment and storage medium
CN112492210B (en) * 2020-12-01 2022-04-19 维沃移动通信有限公司 Photographing method and device, electronic equipment and storage medium
CN114422665A (en) * 2021-12-23 2022-04-29 广东未来科技有限公司 Shooting method based on multiple cameras and related device
CN116233605A (en) * 2023-05-08 2023-06-06 此芯科技(武汉)有限公司 Focusing implementation method and device, storage medium and image pickup equipment

Similar Documents

Publication Publication Date Title
CN107463481A (en) Data interactive method, mobile terminal and storage medium
CN107566635A (en) Screen intensity method to set up, mobile terminal and computer-readable recording medium
CN108055411A (en) Flexible screen display methods, mobile terminal and computer readable storage medium
CN107682627A (en) A kind of acquisition parameters method to set up, mobile terminal and computer-readable recording medium
CN107329682A (en) Edge exchange method and mobile terminal
CN107704176A (en) A kind of picture-adjusting method and terminal
CN107730462A (en) A kind of image processing method, terminal and computer-readable recording medium
CN107248072A (en) Barcode scanning method of payment, mobile terminal and computer-readable recording medium
CN107566735A (en) A kind of dual camera focusing method, mobile terminal and computer-readable recording medium
CN107580181A (en) A kind of focusing method, equipment and computer-readable recording medium
CN107566731A (en) A kind of focusing method and terminal, computer-readable storage medium
CN108172161A (en) Display methods, mobile terminal and computer readable storage medium based on flexible screen
CN107682630A (en) Dual camera anti-fluttering method, mobile terminal and computer-readable recording medium
CN107239567A (en) A kind of recognition methods of object scene, equipment and computer-readable recording medium
CN107707821A (en) Modeling method and device, bearing calibration, terminal, the storage medium of distortion parameter
CN107589887A (en) One kind applies startup method and terminal
CN107613208A (en) Adjusting method and terminal, the computer-readable storage medium of a kind of focusing area
CN107509168A (en) WiFi hot spot scannings method and mobile terminal
CN107240072A (en) A kind of screen luminance adjustment method, terminal and computer-readable recording medium
CN107483804A (en) A kind of image pickup method, mobile terminal and computer-readable recording medium
CN107506163A (en) Adjust method, terminal and the computer-readable recording medium of screen display
CN110086993A (en) Image processing method, device, mobile terminal and computer readable storage medium
CN109445945A (en) Memory allocation method, mobile terminal, server and the storage medium of application program
CN108200350A (en) Autozoom image pickup method, mobile terminal and computer readable storage medium
CN107846534A (en) A kind of camera and photographic method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20180109