CN105827945A - Real-time focusing method and mobile terminal - Google Patents

Real-time focusing method and mobile terminal Download PDF

Info

Publication number
CN105827945A
CN105827945A CN201510833641.XA CN201510833641A CN105827945A CN 105827945 A CN105827945 A CN 105827945A CN 201510833641 A CN201510833641 A CN 201510833641A CN 105827945 A CN105827945 A CN 105827945A
Authority
CN
China
Prior art keywords
focusing
area ratio
current value
distance
photographic head
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
CN201510833641.XA
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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication 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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN201510833641.XA priority Critical patent/CN105827945A/en
Publication of CN105827945A publication Critical patent/CN105827945A/en
Pending legal-status Critical Current

Links

Landscapes

  • Studio Devices (AREA)
  • Automatic Focus Adjustment (AREA)

Abstract

The invention provides a real-time focusing method applied to a mobile terminal. The mobile terminal comprises a camera. The camera includes a first lens and a first focusing motor. The real-time focusing method comprises the steps of firstly, after the preliminary contrast focusing process, calculating to obtain a second current value of the first focusing motor according to a preset algorithm according to the first current value of a first focusing motor, the first area ratio of a first target object in the preview interface of a first camera, and the second area ratio of the first target object in the preview interface of the first camera during the movement process; moving the first focusing motor to the position of a second focusing motor obtained according to the second current value to complete the real-time focusing process. The invention also provides a mobile terminal. According to the real-time focusing method provided in the embodiment of the present invention, the problem in the prior art that the real-time focusing cannot be realized due to the slow focusing speed and the slow response speed during the focusing process can be solved. The focusing speed is increased, and the real-time and clear effect of the first target object during the real-time focusing process can be realized.

Description

A kind of method of real-time focusing and mobile terminal
Technical field
The present invention relates to communication technical field, and more particularly, to a kind of method of real-time focusing and mobile terminal.
Background technology
For traditional camera, i.e. there is no PDAF (PhaseDetectionAuto-Focus, phase-detection auto-focusing) photographic head of function, have the application of object tracking algorithm at present, i.e. after certain object in touching photographic head preview interface, a display box occurs around this object, when this object moves, display box can follow the trail of this object, when this object stops, then focuses with this object for focusing object.
When following the trail of object, focusing mode commonly used contrast focusing mode, i.e. moved by contrast FV value (FocusValue, to coke number) judgment object, and by the most static between FV value judgment object and photographic head, thus trigger new focusing.This contrast focusing mode response time is slow, and focus process by FV value search peak and finds the most clear position, and focus process is the slowest.Concrete, contrast focus process is as follows: camera touches the tracking object in preview interface after starting, and carries out contrast focusing;When object moves, detection FV value change, and whether detect FV value more than a threshold value;When FV value is more than a threshold value, scene changes, and now, waits that object is static, i.e. waits that scene is stable, after scene is stable, triggers new contrast and focuses and complete focusing.
For above-mentioned focusing mode, owing to needing whether to be changed by FV value detection scene in focus process and whether scene is stable, and need to find the most clear position of photographic head by statistics FV value, therefore have that focusing response time is slow and slow-footed problem of focusing, thus cause there is the problem that can not focus in real time.Additionally, the problem that the focusing of this contrast stretches before and after there is picture simultaneously, reduce Consumer's Experience.
It addition, for having the photographic head of PDAF function, owing to preview interface touch area is little, and the details of touch area is less, and therefore phase detection information is less, and PFAF function easily lost efficacy, it is impossible to realize real-time tracking focusing;Additionally, when surrounding is dark, phase detection information amount is the most less, PDAF function the most easily lost efficacy, and now, can not realize real-time tracking focusing equally.
Summary of the invention
The embodiment of the present invention provides method and the mobile terminal of a kind of real-time focusing, to solve the problem that can not focus in real time that existing contrast focusing mode causes in focus process slowly due to focusing low-response and focusing speed.
First aspect, a kind of method that The embodiment provides real-time focusing, it is applied to mobile terminal, described mobile terminal includes that photographic head, described photographic head include the first camera lens and the first focusing motor, and the method for described real-time focusing includes:
First object object in photographic head preview interface is carried out preliminary contrast focusing, and preserves the first current value of the first focusing motor described in when preliminary contrast has been focused and described first object object occupies the first area ratio of described photographic head preview interface;
Obtain described first object object in moving process, occupy the second area ratio of described photographic head preview interface;
According to described first current value, the first area ratio and second area ratio, it is calculated the second current value of described first focusing motor according to preset algorithm;
According to described second current value, determine the second focusing motor position with described second current values match;
Described first focusing motor is moved to described second focusing motor position, completes to focus in real time.
On the other hand, embodiments of the invention additionally provide a kind of mobile terminal, and including photographic head, described photographic head includes the first camera lens and the first focusing motor, and described mobile terminal also includes:
Focusing module, for the first object object in photographic head preview interface being carried out preliminary contrast focusing, and preserve described in when preliminary contrast has been focused the first current value of the first focusing motor and described first object object occupies the first area ratio of described photographic head preview interface;
First acquisition module, occupies the second area ratio of described photographic head preview interface for obtaining described first object object in moving process;
Computing module, the second area ratio that the first current value, the first area ratio and the first acquisition module for preserving according to the first Focusing module acquires, the second current value of described first focusing motor it is calculated according to preset algorithm;
Determine module, for according to calculated second current value of described computing module, determining the second focusing motor position with described second current values match;
Focusing module, for moving described first focusing motor to described the second focusing motor position determining that module determines, completes to focus in real time.
So, the method of a kind of real-time focusing that the present invention provides, first current value of the first focusing motor preserved when can focus according to preliminary contrast, the first object object of the first area ratio and acquisition that first object object occupies photographic head preview interface occupies the second area ratio of photographic head preview interface in moving process, it is calculated the second current value by preset algorithm, then the second focusing motor position with the second current values match is determined according to the second current value, finally the first focusing motor is moved to the second focusing motor position, thus complete to focus in real time.The present invention is calculated the second current value by preset algorithm, real-time one step focusing is completed according to the second current value, solve the existing problem that can not focus in real time caused slowly in focus process due to focusing low-response and focusing speed, improve focusing speed, reach first object object real-time effect the most clearly during focusing in real time, having improve focusing and experiencing.
Accompanying drawing explanation
In order to be illustrated more clearly that the technical scheme of the embodiment of the present invention, in describing the embodiment of the present invention below, the required accompanying drawing used is briefly described, apparently, accompanying drawing in describing below is only some embodiments of the present invention, for those of ordinary skill in the art, on the premise of not paying creative work, it is also possible to obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 represents the flow chart of the method for focusing in real time that the first embodiment of the present invention provides;
Fig. 2 represents the flow chart of the method for focusing in real time that the second embodiment of the present invention provides;
Fig. 3 represents the optical imagery figure in the second embodiment of the present invention;
Fig. 4 represents the structured flowchart of the mobile terminal provided in the third embodiment of the present invention;
Fig. 5 represents another structured flowchart of the mobile terminal provided in the third embodiment of the present invention;
Fig. 6 represents the structural representation of the mobile terminal provided in the fourth embodiment of the present invention;
Fig. 7 represents the structural representation of the mobile terminal provided in the fifth embodiment of the present invention.
Detailed description of the invention
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is a part of embodiment of the present invention rather than whole embodiments.Based on the embodiment in the present invention, the every other embodiment that those of ordinary skill in the art are obtained under not making creative work premise, broadly fall into the scope of protection of the invention.
First embodiment:
The present embodiment is applied to mobile terminal, and mobile terminal includes that photographic head, photographic head include the first camera lens and the first focusing motor.Concrete, as it is shown in figure 1, the flow chart of the method for focusing in real time provided for the first embodiment of the present invention, the method includes:
Step 101, carries out preliminary contrast focusing to the first object object in photographic head preview interface, and preserves when preliminary contrast has been focused first and focus the first current value of motor and first object object occupies the first area ratio of photographic head preview interface.
In this step, concrete, after the photographic head starting mobile terminal, the photographic head preview interface of viewing photographic head, when finding the first object object needing to follow the trail of in photographic head preview interface, the first object object in photographic head preview interface can be touched to obtain first object object, thus carry out preliminary contrast focusing.
Additionally, when preliminary contrast has been focused, the first current value of preservation the first focusing motor and first object object occupy the first area ratio of photographic head preview interface.It addition, when preliminary contrast has been focused, the first focusing motor is positioned at the first focusing motor position with the first current values match.
Concrete, the first focusing motor can be that voice coil motor, stepper motor and piezo-electric motor etc. drive motor.
Concrete, it should be noted that at this, during when preserving preliminary contrast and having focused, first object object occupies the first area ratio of photographic head preview interface, owing to the size of photographic head preview interface is determined by the first camera lens, the most in this step, first object object occupies the actual area ratio being first object object and occupying the scene found a view in photographic head preview interface of area ratio of photographic head preview interface.Such as, assume the automobile in original scene of finding a view is institute in photographic head preview interface, i.e. automobile occupies whole photographic head preview interface, and first object object is the car plate of automobile, then first object object occupies the area ratio of photographic head preview interface is the area ratio that car plate occupies automobile.The most such as, assume that the scene of finding a view in photographic head preview interface becomes garden, i.e. garden occupies whole photographic head preview interface, and first object object is the car plate of automobile in garden, then first object object occupies the area ratio of photographic head preview interface is the area ratio that car plate occupies whole garden.
Step 102, obtains first object object and occupies the second area ratio of photographic head preview interface in moving process.
In this step, concrete, during first object object moves, often can calculate first object object and occupy the second area ratio of photographic head preview interface by frame, to avoid first object object translational speed too fast, the phenomenon of mistake in computation occur.
It should be noted that at this, owing to the size of photographic head preview interface is determined by the first camera lens, therefore, in step, first object object occupies the actual area ratio being first object object and occupying the scene found a view in photographic head preview interface of area ratio of photographic head preview interface.
Step 103, according to the first current value, the first area ratio and second area ratio, is calculated the second current value of the first focusing motor according to preset algorithm.
Concrete, this step, according to the second area ratio of the first current value, the first area ratio and the acquisition preserved, is calculated the second current value of the first focusing motor so that mobile terminal can obtain the second current value faster by preset algorithm.
Step 104, according to the second current value, determines the second focusing motor position with the second current values match.
In this step, concrete, there is a small-sized strength magnetic field in photographic head, the driving of photographic head can produce magnetic force aspect active force by the electric current controlled within the first focusing motor, so that the first focusing motor can drive the first camera lens to move.Drive control the internal electric current of the first focusing motor from 0 to maximum time, the first focusing motor can drive the first camera lens to move to maximum displacement from original place, i.e. the size of electric current is directly proportional to the first displacement focusing motor and the first camera lens.Therefore, in this step, it is possible to according to the second current value of the first focusing motor, determine the second focusing motor position with the second current values match.
Step 105, moves the first focusing motor to the second focusing motor position, completes to focus in real time.
In this step, concrete, when moving the first focusing motor to the second focusing motor position, correspondingly, the first camera lens can be stablized on the imaging surface that the second current value is corresponding, thus completes to focus in real time.
The present embodiment is calculated the second current value by preset algorithm, then determines the second focusing motor position with the second current values match according to the second current value, finally moves the first focusing motor to the second focusing motor position, thus complete to focus in real time.The present embodiment is calculated the second current value by preset algorithm, real-time one step focusing is completed according to the second current value, solve the existing problem that can not focus in real time caused slowly in focus process due to focusing low-response and focusing speed, improve focusing speed, reach first object object real-time effect the most clearly during focusing in real time, having improve focusing and experiencing.
Optionally, in order to avoid tradition focusing mode needs front and back to search for when focusing thus picture is caused to there is the problem stretched, concrete, after obtaining the second area ratio that first object object occupies photographic head preview interface in moving process in a step 102, it is also possible to judge the focusing direction of the first focusing motor.
Concrete, it is judged that the principle in the focusing direction of the first focusing motor is as follows:
The focusing direction of the first focusing motor is the change direction of the current value of the first focusing motor.The present embodiment can judge the change direction of current value according to second area ratio.
The change direction of current value is judged particularly as follows: after getting second area ratio according to second area ratio, the change direction of second area ratio can be first determined whether, and the change direction of current value is judged according to the change direction of second area ratio, if second area ratio is to the direction change increased, then may determine that first object object is moving to the direction by the first camera lens, now, then current value increases;If second area ratio is to the direction change reduced, then may determine that first object object is moving to the direction away from the first camera lens, now, then current value reduces.
In the present embodiment, owing to the change direction of current value is focusing direction, therefore the first focusing motor is moved the position can being driven into the second current value by the change direction according to current value by the present embodiment, solve the problem of stretching before and after tradition focusing mode needs front and back to search for when focusing thus causes picture to exist, reach while lifting focusing speed and every frame can judge focusing direction, the technique effect stretched before and after there is not picture, improve focusing and experiencing.
Additionally, optional, in step 105 the first focusing motor is moved to the second focusing motor position, complete in real time defocused, it can also be ensured that the focusing precision of the first focusing motor.Concrete, it is ensured that the process of the focusing precision of the first focusing motor is as follows:
Complete in real time defocused, can first obtain in real time to defocused focusing definition values, then according to the focusing definition values obtained, it is judged that whether first object object remains static;If first object object is kept in motion, then continues to obtain first object object in moving process, occupy the second area ratio of photographic head preview interface;If first object object remains static, then it is finely adjusted Jiao by contrast focusing mode.Concrete, being finely adjusted Jiao by contrast focusing mode can be the position being finely tuned the first focusing motor in default focusing range by contrast focusing mode, and wherein, presetting focusing range is (1-5%) × P1≤ P≤(1+5%) × P1, wherein, P represents default focusing range, P1Represent the second focusing motor position.
Concrete, when judging whether first object object remains static, can be in the way of introducing contrast focusing, by contrast to coke number be main, area ratio be changed to auxiliary by the way of judge whether first object object remains static, i.e. can first pass through contrast whether coke number is changed to judge whether first object object remains static, whether be remained static by the area ratio auxiliary judgment first object object that whether changes the most again.
The present embodiment by according to complete focusing definition judgment first object object when focusing in real time remain static time, introduce contrast focusing mode and be finely adjusted Jiao, solve and be confined to the module of photographic head there is concordance difference, and due to reasons such as the object distance difference depth of field also differ, the problem being not easy to find optimal clear position accurately, reach slight at photographic head preview interface jitter amplitude, focusing precision is ensured while when user perceptibility is low, and realize the technique effect of shape library, improve focusing and experiencing.
Second embodiment:
As in figure 2 it is shown, be the flow chart of steps of the method for focusing in real time in the second embodiment of the present invention, the method in this embodiment includes:
Step 201, carries out preliminary contrast focusing to the first object object in photographic head preview interface, and preserves when preliminary contrast has been focused first and focus the first current value of motor and first object object occupies the first area ratio of photographic head preview interface.
In this step, concrete, after the photographic head starting mobile terminal, the photographic head preview interface of viewing photographic head, when finding the first object object needing to follow the trail of in photographic head preview interface, the first object object in photographic head preview interface can be touched to obtain first object object, thus carry out preliminary contrast focusing.
Additionally, when preliminary contrast has been focused, the first current value of preservation the first focusing motor and first object object occupy the first area ratio of photographic head preview interface.It addition, when preliminary contrast has been focused, the first focusing motor is positioned at the first focusing motor position with the first current values match.
Concrete, the first focusing motor can be that voice coil motor, stepper motor and piezo-electric motor etc. drive motor.
Concrete, it should be noted that at this, during when preserving preliminary contrast and having focused, first object object occupies the first area ratio of photographic head preview interface, owing to the size of photographic head preview interface is determined by the first camera lens, the most in this step, first object object occupies the actual area ratio being first object object and occupying the scene found a view in photographic head preview interface of area ratio of photographic head preview interface.Such as, assume the automobile in original scene of finding a view is institute in preview interface, i.e. automobile occupies whole photographic head preview interface, and first object object is the car plate of automobile, then first object object occupies the area ratio of photographic head preview interface is the area ratio that car plate occupies automobile.The most such as, assume that the scene of finding a view in photographic head preview interface becomes garden, i.e. garden occupies whole photographic head preview interface, and first object object is the car plate of automobile in garden, then first object object occupies the area ratio of photographic head preview interface is the area ratio that car plate occupies whole garden.
Step 202, obtains first object object and occupies the second area ratio of photographic head preview interface in moving process.
In this step, concrete, during first object object moves, often can calculate first object object and occupy the second area ratio of photographic head preview interface by frame, to avoid first object object translational speed too fast, the phenomenon of mistake in computation occur.
It should be noted that at this, owing to the size of photographic head preview interface is determined by the first camera lens, therefore, in step, first object object occupies the actual area ratio being first object object and occupying the scene found a view in photographic head preview interface of area ratio of photographic head preview interface.
Step 203, according to the first current value, is calculated the first object distance when preliminary contrast has been focused by preset algorithm.
In this step, concrete, the first current value and optics Gauss formula can be passed throughThe first object distance when preliminary contrast has been focused is obtained by preset algorithm.In optics Gauss formula, u represents the first object distance, and v represents the first image distance, and f represents focal length, and f is constant, and the value of f determines according to the specification of the first camera lens.
Concrete, from Gauss formula it can be seen that in Gauss formula, common possessions is away from, image distance and focal length three amount, and wherein, the focal length of photographic head is a known quantity.Additionally, due to the first focusing motor has linear characteristic, therefore, the image distance of photographic head can be converted to by the current value of the first focusing motor, and i.e. in the case of the current value of known drive mechanism, the image distance of photographic head equally obtains.
Therefore, in this step, according to the first current value, when obtaining the first object distance when preliminary contrast has been focused, first the first current value can be converted to the first image distance when preliminary contrast has been focused so that the first image distance in Gauss formula becomes known quantity, then according to Gauss formulaIt is calculated the first object distance when preliminary contrast has been focused.
Step 204, according to the first object distance, the first area ratio and second area ratio, is calculated the first object object the second object distance in moving process by preset algorithm.
In this step, concrete, can be according to object distance formulaIt is calculated the first object object the second object distance in moving process, wherein, in formula, L2Represent the first object object the second object distance in moving process, L1Represent the first object distance, P1Represent the first area ratio, P2Represent second area ratio.
Below to formulaExplain.
As it is shown on figure 3, be optical imagery figure.In order to make it easy to understand, optical imagery figure in figure 3 is set up following variable:
The scene width of finding a view assumed when preliminary contrast has been focused in photographic head preview interface is S1(Fig. 3 middle conductor CD), it is P that first object object occupies the first area ratio of photographic head preview interface when preliminary contrast has been focused1, i.e. first object object occupies the first area ratio of scene of finding a view when preliminary contrast has been focused is P1, the first object object the first object distance when preliminary contrast has been focused is L1
Assume first object object in moving process, the scene width of finding a view in photographic head preview interface is S2(Fig. 3 middle conductor AB), additionally, A in the drawings1B1For the picture of AB, it is P that first object object occupies the second area ratio of photographic head preview interface in moving process2, i.e. first object object occupies the second area ratio of scene of finding a view in moving process is P2, the first object object the second object distance in moving process is L2, the angle of visibility of photographic head is θ.
It is appreciated that in figure 3:
L 1 × t a n θ = S 1 2 - - - ( 1 )
L 2 × t a n θ = S 2 2 - - - ( 2 )
Therefore, according to above-mentioned (1) and (2) two formula, it can be deduced that:
L 1 L 2 = S 1 S 2 - - - ( 3 )
Furthermore, it is possible to occupy the area ratio of photographic head preview interface according to first object object, learn:
The developed width S=S of first object object1×P1=S2×P2, i.e.
S 1 S 2 = P 2 P 1 - - - ( 4 )
According to above-mentioned formula (3) and formula (4), can shift onto out
Therefore, when the first object distance, the first area ratio and second area ratio are known quantity, can be according to object distance formulaFormula is calculated the first object object the second object distance in moving process.
Step 205, according to the second object distance, is calculated the second current value by preset algorithm.
In this step, concrete, can be according to optics Gauss formulaIt is calculated the first object object the second image distance in moving process, then the second image distance is converted to the second current value.In Gauss formula, u represents the second object distance, and v represents the first object object the second image distance in moving process, and f represents focal length, and f is constant, and the value of f determines according to the specification of described first camera lens.
Concrete, from Gauss formula it can be seen that in Gauss formula, common possessions is away from, image distance and focal length three amount, and wherein, focal length is a known quantity.Again due to known second object distance, therefore the second image distance can be pushed over out from Gauss formula according to focal length and the second object distance.Additionally, due to the first focusing motor has linear characteristic, therefore, the current value of the first focusing motor can be converted to by image distance, and i.e. in the case of known image distance, the current value of the first focusing motor equally obtains.
Step 206, according to the second current value, determines the second focusing motor position with the second current values match.
In this step, concrete, there is a small-sized strength magnetic field in photographic head, the driving of photographic head can produce magnetic force aspect active force by the electric current controlled within the first focusing motor, so that the first focusing motor can drive the first camera lens to move.Drive control the internal electric current of the first focusing motor from 0 to maximum time, the first focusing motor can drive the first camera lens to move to maximum displacement from original place, i.e. the size of electric current is directly proportional to the first displacement focusing motor and the first camera lens.Therefore, in this step, it is possible to according to the second current value of the first focusing motor, determine the second focusing motor position with the second current values match.
Step 207, moves the first focusing motor to the second focusing motor position, completes to focus in real time.
In this step, concrete, when moving the first focusing motor to the second focusing motor position, correspondingly, the first camera lens can be stablized on the imaging surface that the second current value is corresponding, thus completes to focus in real time.
The present embodiment is calculated the second current value by optics Gauss formula, then determines the second focusing motor position with the second current values match according to the second current value, finally moves the first focusing motor to the second focusing motor position, thus complete to focus in real time.The present invention is calculated the second current value by Gauss formula, photographic head is made can be more quickly obtained the second current value, so that photographic head can complete real-time one step focusing according to the second current value, solve the existing problem that can not focus in real time caused slowly in focus process due to focusing low-response and focusing speed, improve focusing speed, reach first object object real-time effect the most clearly during focusing in real time, having improve focusing and experiencing.
3rd embodiment:
As shown in Figure 4, the structured flowchart of the mobile terminal provided for the third embodiment of the present invention.Mobile terminal 400 shown in Fig. 4 includes: Focusing module the 401, first acquisition module 402, computing module 403, determine module 404 and focusing module 405.
Focusing module 401, for the first object object in photographic head preview interface being carried out preliminary contrast focusing, and preserve described in when preliminary contrast has been focused the first current value of the first focusing motor and described first object object occupies the first area ratio of described photographic head preview interface.
Wherein, after the photographic head starting mobile terminal, the photographic head preview interface of viewing photographic head, when finding the first object object needing to follow the trail of in photographic head preview interface, the first object object in photographic head preview interface can be touched to obtain first object object, thus carry out preliminary contrast focusing.Additionally, when preliminary contrast has been focused, the first current value of preservation the first focusing motor and first object object occupy the first area ratio of photographic head preview interface.It addition, when preliminary contrast has been focused, the first focusing motor is positioned at the first focusing motor position with the first current values match.
First acquisition module 402, occupies the second area ratio of described photographic head preview interface for obtaining described first object object in moving process.
Wherein, the first acquisition module, during first object object moves, often can calculate first object object and occupies the second area ratio of photographic head preview interface by frame, the phenomenon of mistake in computation occur to avoid first object object translational speed too fast.
Computing module 403, the second area ratio that the first current value, the first area ratio and the first acquisition module for preserving according to the first Focusing module acquires, the second current value of described first focusing motor it is calculated according to preset algorithm.
Wherein, the second area ratio that the first current value, the first area ratio and the first acquisition module that computing module preserves according to the first Focusing module obtains, the second current value of the first focusing motor it is calculated so that mobile terminal can obtain the second current value faster by preset algorithm.
Determine module 404, for according to calculated second current value of described computing module, determining the second focusing motor position with described second current values match.
Focusing module 405, for moving described first focusing motor to described the second focusing motor position determining that module determines, completes to focus in real time.
Wherein, mobile module is when moving the first focusing motor to the second focusing motor position, and correspondingly, the first camera lens can be stablized on the imaging surface that the second current value is corresponding, thus completes to focus in real time.
Computing module in the present embodiment is calculated the second current value by preset algorithm, it is then determined that module determines the second focusing motor position with the second current values match according to the second current value, first focusing motor is moved to the second focusing motor position by last mobile module, thus completes to focus in real time.The present invention is calculated the second current value by preset algorithm, real-time one step focusing is completed according to the second current value, solve the existing problem that can not focus in real time caused slowly in focus process due to focusing low-response and focusing speed, improve focusing speed, reach first object object real-time effect the most clearly during focusing in real time, having improve focusing and experiencing.
Optionally, computing module 403 includes the first object distance calculating sub module the 4031, second object distance calculating sub module 4032 and the first Current calculation submodule 4033, first object distance calculating sub module 4031, for according to the first current value, is calculated the first object distance when preliminary contrast has been focused by preset algorithm;Second object distance calculating sub module 4032, for according to the first object distance, the first area ratio and second area ratio, is calculated the first object object the second object distance in moving process by preset algorithm;First Current calculation submodule 4033, for according to the second object distance, is calculated the second current value by preset algorithm.
Optionally, the first object distance calculating sub module 4031 includes the first image distance computation subunit 40311 and the first object distance computation subunit 40312, and the first image distance computation subunit 40311 for being converted to the first image distance when preliminary contrast has been focused by the first current value;First object distance computation subunit 40312 is for according to optics Gauss formulaObtaining the first object distance when preliminary contrast has been focused, wherein, in Gauss formula, u represents the first object distance, and v represents the first image distance, and f represents that focal length, described f are constant, and the value of described f determines according to the specification of described first camera lens.
Optionally, the second object distance calculating sub module 4032 includes the second object distance computation subunit 40321, for according to object distance formulaIt is calculated the first object object the second object distance in moving process, wherein, in formula, L2Represent the first object object the second object distance in moving process, L1Represent the first object distance, P1Represent the first area ratio, P2Represent second area ratio.
Optionally, the first Current calculation submodule 4033 includes the second image distance computation subunit 40331 and the first Current calculation subelement 40332, and the second image distance computation subunit 40331 is for according to optics Gauss formulaBeing calculated the first object object the second image distance in moving process, wherein, u represents the second object distance, v represents the first object object the second image distance in moving process, f represents that focal length, described f are constant, and the value of described f determines according to the specification of described first camera lens;First Current calculation subelement 40332 is for being converted to the second current value by the second image distance.
The present embodiment is calculated the second current value by optics Gauss formula so that photographic head can more be quickly obtained the second current value, thus reached photographic head and can complete the technique effect of real-time one step focusing according to the second current value.
As it is shown in figure 5, concrete, on the basis of Fig. 4, optionally, mobile terminal 400 also includes the secondth acquisition module 406, judge module 407 and micro-focusing module 408, and described second acquisition module 406 is for having obtained focusing definition values when focusing in real time;Described judge module 407 is for the focusing definition values acquired according to described second acquisition module 406, it is judged that whether described first object object remains static;If described first object object is kept in motion, it indicates that described first acquisition module 402 performs to obtain the step of the second area ratio that described first object object occupies described photographic head preview interface in moving process;If described first object object remains static, it indicates that described micro-focusing module 408 is finely adjusted Jiao by contrast focusing mode.
Optionally, micro-focusing module 408 specifically for, in default focusing range, finely tune the position of the first focusing motor by contrast focusing mode, described default focusing range is (1-5%) × P1≤ P≤(1+5%) × P1, wherein, P represents default focusing range, P1Represent the second focusing motor position.
The present embodiment by according to complete focusing definition judgment first object object when focusing in real time remain static time, introduce contrast focusing mode and be finely adjusted Jiao, solve and be confined to the module of photographic head there is concordance difference, and due to reasons such as the object distance difference depth of field also differ, the problem being not easy to find optimal clear position accurately, reach slight at photographic head preview interface jitter amplitude, focusing precision is ensured while when user perceptibility is low, and realize the technique effect of shape library, improve focusing and experiencing.
Mobile terminal in above-described embodiment is capable of each process that in the embodiment of the method for Fig. 1 to Fig. 3, mobile terminal realizes, and for avoiding repeating, repeats no more here.In the mobile terminal that the above embodiment of the present invention provides, it is calculated the second current value by computing module, photographic head is made can be more quickly obtained the second current value, so that photographic head can complete real-time one step focusing according to the second current value, solve the existing problem that can not focus in real time caused slowly due to focus low-response and focusing speed in focus process and improve focusing speed, reach first object object real-time effect the most clearly during focusing in real time.In addition, the present embodiment by according to complete focusing definition judgment first object object when focusing in real time remain static time, introduce contrast focusing mode and be finely adjusted Jiao, solve and be confined to the module of photographic head there is concordance difference, and due to reasons such as the object distance difference depth of field also differ, the problem being not easy to find optimal clear position accurately, reach slight at photographic head preview interface jitter amplitude, focusing precision is ensured while when user perceptibility is low, and realize the technique effect of shape library, improve focusing and experiencing.
4th embodiment:
As shown in Figure 6, for the structured flowchart of mobile terminal in the fourth embodiment of the present invention.Mobile terminal 600 shown in Fig. 6 includes: at least one processor 601, memorizer 602, at least one network interface 604, other user interfaces 603.Each assembly in mobile terminal 600 is coupled by bus system 605.It is understood that bus system 605 is for realizing the connection communication between these assemblies.Bus system 605, in addition to including data/address bus, also includes power bus, controls bus and status signal bus in addition.But for the sake of understanding explanation, in figure 6 various buses are all designated as bus system 605.
Wherein, user interface 603 can include display, keyboard or pointing device (such as, mouse, trace ball (trackball), touch-sensitive plate or touch screen, image first-class, wherein, photographic head includes camera lens and focusing motor.
The memorizer 602 being appreciated that in the embodiment of the present invention can be volatile memory or nonvolatile memory, maybe can include volatibility and nonvolatile memory.Wherein, nonvolatile memory can be read only memory (Read-OnlyMemory, ROM), programmable read only memory (ProgrammableROM, PROM), Erasable Programmable Read Only Memory EPROM (ErasablePROM, EPROM), Electrically Erasable Read Only Memory (ElectricallyEPROM, EEPROM) or flash memory.Volatile memory can be random access memory (RandomAccessMemory, RAM), and it is used as External Cache.nullBy exemplary but be not restricted explanation,The RAM of many forms can use,Such as static RAM (StaticRAM,SRAM)、Dynamic random access memory (DynamicRAM,DRAM)、Synchronous Dynamic Random Access Memory (SynchronousDRAM,SDRAM)、Double data speed synchronous dynamic RAM (DoubleDataRateSDRAM,DDRSDRAM)、Enhancement mode Synchronous Dynamic Random Access Memory (EnhancedSDRAM,ESDRAM)、Synchronized links dynamic random access memory (SynchlinkDRAM,And direct rambus random access memory (DirectRambusRAM SLDRAM),DRRAM).The memorizer 602 of the system and method that the embodiment of the present invention describes is intended to include but not limited to these and the memorizer of other applicable type any.
In some embodiments, memorizer 602 stores following element, executable module or data structure, or their subset, or their superset: operating system 6021 and application program 6022.
Wherein, operating system 6021, comprise various system program, such as ccf layer, core library layer, driving layer etc., be used for realizing various basic business and processing hardware based task.Application program 6022, comprises various application program, and such as media player (MediaPlayer), browser (Browser) etc., be used for realizing various applied business.The program realizing embodiment of the present invention method may be embodied in application program 6022.
In embodiments of the present invention, in memorizer 602, storage has preset algorithm, formula, calculated value, ratio and the default focusing range etc. in the present invention.By calling program or the instruction of memorizer 602 storage, concrete, can be program or the instruction of storage in application program 6022.
In embodiments of the present invention, photographic head in user interface 603 carries out preliminary contrast focusing to the first object object in photographic head preview interface, and memorizer 602 preserves described in when preliminary contrast has been focused the first current value of the first focusing motor and described first object object occupies the first area ratio of described photographic head preview interface;
Photographic head in user interface 603 obtains described first object object and occupies the second area ratio of described photographic head preview interface in moving process;
Processor 601, according to described first current value, the first area ratio and second area ratio, is calculated the second current value of described first focusing motor according to the preset algorithm of storage in memorizer 602;
Processor 601, according to described second current value, determines the second focusing motor position with described second current values match;
Described first focusing motor is moved to described second focusing motor position by the photographic head in user interface 603, completes to focus in real time.
The method that the invention described above embodiment discloses can apply in processor 601, or is realized by processor 601.Processor 601 is probably a kind of IC chip, has the disposal ability of signal.During realizing, each step of said method can be completed by the instruction of the integrated logic circuit of the hardware in processor 601 or software form.Above-mentioned processor 601 can be general processor, digital signal processor (DigitalSignalProcessor, DSP), special IC (ApplicationSpecificIntegratedCircuit, ASIC), field programmable gate array (FieldProgrammableGateArray, FPGA) or other PLDs, discrete gate or transistor logic, discrete hardware components.Can realize or perform disclosed each method, step and the logic diagram in the embodiment of the present invention.The processor etc. that general processor can be microprocessor or this processor can also be any routine.Hardware decoding processor can be embodied directly in conjunction with the step of the method disclosed in the embodiment of the present invention to have performed, or combine execution by the hardware in decoding processor and software module and complete.Software module may be located at random access memory, flash memory, read only memory, in the storage medium that this area such as programmable read only memory or electrically erasable programmable memorizer, depositor is ripe.This storage medium is positioned at memorizer 602, and processor 601 reads the information in memorizer 602, completes the step of said method in conjunction with its hardware.Additionally, memorizer 602 internal memory contains the preset algorithm used in said method, formula, calculating are arrived value, ratio and default focusing range etc..
It is understood that these embodiments that the embodiment of the present invention describes can realize by hardware, software, firmware, middleware, microcode or a combination thereof.Hardware is realized, processing unit can be implemented in one or more special IC (ApplicationSpecificIntegratedCircuit, ASIC), digital signal processor (DigitalSignalProcessor, DSP), digital signal processing appts (DSPDevice, DSPD), programmable logic device (ProgrammableLogicDevice, PLD), field programmable gate array (FieldProgrammableGateArray, FPGA), general processor, controller, microcontroller, microprocessor, in other electronic unit performing the application function or a combination thereof.
Software is realized, the technology of the embodiment of the present invention can be realized by the module (such as process, function etc.) performing embodiment of the present invention function.Software code is storable in performing in memorizer and by processor.Memorizer can within a processor or realize outside processor.
Alternatively, processor 601, according to the first current value, is calculated the first object distance when preliminary contrast has been focused by the preset algorithm of storage in memorizer 602;According to the first object distance, the first area ratio and second area ratio, it is calculated the first object object the second object distance in moving process by preset algorithm;According to the second object distance, it is calculated the second current value by preset algorithm.
First current value is converted to the first image distance when preliminary contrast has been focused by processor 601;According to optics Gauss formulaObtaining the first object distance when preliminary contrast has been focused, wherein, in Gauss formula, u represents the first object distance, and v represents the first image distance, and f represents that focal length, described f are constant, and the value of described f determines according to the specification of described first camera lens.
Processor 601 is according to object distance formulaIt is calculated the first object object the second object distance in moving process, wherein, in formula, L2Represent the first object object the second object distance in moving process, L1Represent the first object distance, P1Represent the first area ratio, P2Represent second area ratio.
Processor 601 is according to optics Gauss formulaBeing calculated the first object object the second image distance in moving process, wherein, u represents the second object distance, v represents the first object object the second image distance in moving process, f represents that focal length, described f are constant, and the value of described f determines according to the specification of described first camera lens;Second image distance is converted to the second current value.
Alternatively, as another embodiment, the photographic head in user interface 603 has obtained focusing definition values when focusing in real time;
Processor 601 is according to the described focusing definition values obtained, it is judged that whether described first object object remains static;
If described first object object is kept in motion, then the photographic head in user interface 603 performs to obtain the step of the second area ratio that described first object object occupies described photographic head preview interface in moving process;
If described first object object remains static, then the photographic head in user interface 603 is finely adjusted Jiao by contrast focusing mode.
Wherein, being finely adjusted the burnt position specially being finely tuned the first focusing motor in default focusing range by contrast focusing mode by contrast focusing mode, described default focusing range is (1-5%) × P1≤ P≤(1+5%) × P1, wherein, P represents default focusing range, P1Represent the second focusing motor position.
Mobile terminal 600 is capable of each process that in previous embodiment, mobile terminal realizes, and for avoiding repeating, repeats no more here.
The mobile terminal provided in the above embodiment of the present invention, it is calculated the second current value by preset algorithm, then the second focusing motor position with the second current values match is determined according to the second current value, finally the first focusing motor is moved to the second focusing motor position, thus complete to focus in real time.The present embodiment is calculated the second current value by preset algorithm, real-time one step focusing is completed according to the second current value, solve the existing problem that can not focus in real time caused slowly in focus process due to focusing low-response and focusing speed, improve focusing speed, reach first object object real-time effect the most clearly during focusing in real time.In addition, the present embodiment by according to complete focusing definition judgment first object object when focusing in real time remain static time, introduce contrast focusing mode and be finely adjusted Jiao, solve and be confined to the module of photographic head there is concordance difference, and due to reasons such as the object distance difference depth of field also differ, the problem being not easy to find optimal clear position accurately, reach slight at photographic head preview interface jitter amplitude, focusing precision is ensured while when user perceptibility is low, and realize the technique effect of shape library, improve focusing and experiencing.
Fig. 7 is the structural representation of the mobile terminal of fifth embodiment of the invention.Specifically, the mobile terminal 700 in Fig. 7 can be mobile phone, panel computer, personal digital assistant (PersonalDigitalAssistant, PDA) or vehicle-mounted computer etc..
Include that radio frequency (RadioFrequency, RF) circuit 710, memorizer 720, input block 730, display unit 740, photographic head 750, processor 760, voicefrequency circuit 770, WiFi (WirelessFidelity) module 780, power supply 790, photographic head 750 include camera lens and focusing motor the mobile end 700 in Fig. 7.
Wherein, in memorizer 720, storage has preset algorithm, formula, calculated value, ratio and the default focusing range etc. in the present invention.Input block 730 can be used for receiving numeral or the character information of user's input, and produces the signal input relevant with the user setup of mobile terminal 700 and function control.Specifically, in the embodiment of the present invention, this input block 730 can include contact panel 731.Contact panel 731, also referred to as touch screen, image first-class.Wherein, touch screen can collect user thereon or neighbouring touch operation (such as user uses any applicable object such as finger, stylus or adnexa operation on contact panel 731), and drives corresponding attachment means according to formula set in advance.Optionally, contact panel 731 can include touch detecting apparatus and two parts of touch controller.Wherein, the touch orientation of touch detecting apparatus detection user, and detect the signal that touch operation brings, transmit a signal to touch controller;Touch controller receives touch information from touch detecting apparatus, and is converted into contact coordinate, then gives this processor 760, and can receive order that processor 760 sends and be performed.Furthermore, it is possible to use the polytypes such as resistance-type, condenser type, infrared ray and surface acoustic wave to realize contact panel 731.Except contact panel 731, input block 730 can also include other input equipments 732, and other input equipments 732 can include but not limited to one or more in physical keyboard, function key (such as volume control button, switch key etc.), trace ball, mouse, action bars etc..
Wherein, display unit 740 can be used for showing the information inputted by user or the information being supplied to user and the various menu interfaces of mobile terminal 700.Display single 740 can include display floater 741, optionally, the form such as LCD or Organic Light Emitting Diode (OrganicLight-EmittingDiode, OLED) can be used to configure display floater 741.
It should be noted that, contact panel 731 can cover display floater 741, formed and touch display screen, when this touch display screen detects thereon or after neighbouring touch operation, send processor 760 to determine the type of touch event, display screen on provide corresponding visual output according to the type of touch event touching with preprocessor 760.
Touch display screen and include Application Program Interface viewing area and conventional control viewing area.The arrangement mode of this Application Program Interface viewing area and this conventional control viewing area does not limit, can be arranged above and below, left-right situs etc. can distinguish the arrangement mode of two viewing areas.This Application Program Interface viewing area is displayed for the interface of application program.Each interface can comprise the interface elements such as icon and/or the widget desktop control of at least one application program.This Application Program Interface viewing area can also be the empty interface not comprising any content.This conventional control viewing area is for showing the control that utilization rate is higher, such as, and the application icon etc. such as settings button, interface numbering, scroll bar, phone directory icon.
Wherein, processor 760 is the control centre of mobile terminal 700, utilize various interface and the various piece of the whole mobile phone of connection, it is stored in the software program in first memory 721 and/or module by running or performing, and call the data being stored in second memory 722, perform the various functions of mobile terminal 700 and process data, thus mobile terminal 700 is carried out integral monitoring.Optionally, processor 760 can include one or more processing unit.
In embodiments of the present invention, photographic head 750 carries out preliminary contrast focusing to the first object object in photographic head preview interface, and preserves the first current value of the first focusing motor described in when preliminary contrast has been focused and described first object object occupies the first area ratio of described photographic head preview interface;
Photographic head 750 obtains described first object object and occupies the second area ratio of described photographic head preview interface in moving process;
In embodiments of the present invention, by calling the software program stored in this first memory 721, processor 760, according to described first current value, the first area ratio and second area ratio, is calculated the second current value of described first focusing motor according to the preset algorithm of storage in second memory 722;
Processor 760, according to described second current value, determines the second focusing motor position with described second current values match;
Described first focusing motor is moved to described second focusing motor position by photographic head 750, completes to focus in real time.
Alternatively, processor 760, according to the first current value, is calculated the first object distance when preliminary contrast has been focused by the preset algorithm of storage in second memory 722;According to the first object distance, the first area ratio and second area ratio, it is calculated the first object object the second object distance in moving process by preset algorithm;According to the second object distance, it is calculated the second current value by preset algorithm.
First current value is converted to the first image distance when preliminary contrast has been focused by processor 760;According to optics Gauss formulaObtaining the first object distance when preliminary contrast has been focused, wherein, in Gauss formula, u represents the first object distance, and v represents the first image distance, and f represents that focal length, described f are constant, and the value of described f determines according to the specification of described first camera lens.
Processor 760 is according to object distance formulaIt is calculated the first object object the second object distance in moving process, wherein, in formula, L2Represent the first object object the second object distance in moving process, L1Represent the first object distance, P1Represent the first area ratio, P2Represent second area ratio.
Processor 760 is according to optics Gauss formulaBeing calculated the first object object the second image distance in moving process, wherein, u represents the second object distance, v represents the first object object the second image distance in moving process, f represents that focal length, described f are constant, and the value of described f determines according to the specification of described first camera lens;Second image distance is converted to the second current value.
Alternatively, as another embodiment, photographic head 750 has obtained focusing definition values when focusing in real time;
Processor 760 is according to the described focusing definition values obtained, it is judged that whether described first object object remains static;
If described first object object is kept in motion, then photographic head 750 performs to obtain the step of the second area ratio that described first object object occupies described photographic head preview interface in moving process;
If described first object object remains static, then photographic head 750 is finely adjusted Jiao by contrast focusing mode.
Wherein, being finely adjusted the burnt position specially being finely tuned the first focusing motor in default focusing range by contrast focusing mode by contrast focusing mode, described default focusing range is (1-5%) × P1≤ P≤(1+5%) × P1, wherein, P represents default focusing range, P1Represent the second focusing motor position.
Mobile terminal 700 is capable of each process that in previous embodiment, mobile terminal realizes, and for avoiding repeating, repeats no more here.
Visible, the mobile terminal provided in the above embodiment of the present invention, preset algorithm is calculated the second current value, then the second focusing motor position with the second current values match is determined according to the second current value, finally the first focusing motor is moved to the second focusing motor position, thus complete to focus in real time.The present embodiment is calculated the second current value by preset algorithm, real-time one step focusing is completed according to the second current value, solve the existing problem that can not focus in real time caused slowly in focus process due to focusing low-response and focusing speed, improve focusing speed, reach first object object real-time effect the most clearly during focusing in real time.In addition, the present embodiment by according to complete focusing definition judgment first object object when focusing in real time remain static time, introduce contrast focusing mode and be finely adjusted Jiao, solve and be confined to the module of photographic head there is concordance difference, and due to reasons such as the object distance difference depth of field also differ, the problem being not easy to find optimal clear position accurately, reach slight at photographic head preview interface jitter amplitude, focusing precision is ensured while when user perceptibility is low, realize the technique effect of shape library, improve focusing and experience.
Those of ordinary skill in the art are it is to be appreciated that combine unit and the algorithm steps of each example that the disclosed embodiments in the embodiment of the present invention describe, it is possible to being implemented in combination in of electronic hardware or computer software and electronic hardware.These functions perform with hardware or software mode actually, depend on application-specific and the design constraint of technical scheme.Professional and technical personnel can use different methods to realize described function to each specifically should being used for, but this realization is it is not considered that beyond the scope of this invention.
Those skilled in the art is it can be understood that arrive, for convenience and simplicity of description, the specific works process of the system of foregoing description, device and unit, it is referred to the corresponding process in preceding method embodiment, does not repeats them here.
In embodiment provided herein, it should be understood that disclosed apparatus and method, can realize by another way.Such as, device embodiment described above is only schematically, such as, the division of described unit, be only a kind of logic function to divide, actual can have when realizing other dividing mode, the most multiple unit or assembly can in conjunction with or be desirably integrated into another system, or some features can ignore, or do not perform.Another point, shown or discussed coupling each other or direct-coupling or communication connection can be the INDIRECT COUPLING by some interfaces, device or unit or communication connection, can be electrical, machinery or other form.
The described unit illustrated as separating component can be or may not be physically separate, and the parts shown as unit can be or may not be physical location, i.e. may be located at a place, or can also be distributed on multiple NE.Some or all of unit therein can be selected according to the actual needs to realize the purpose of the present embodiment scheme.
It addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, it is also possible to be that unit is individually physically present, it is also possible to two or more unit are integrated in a unit.
If described function is using the form realization of SFU software functional unit and as independent production marketing or use, can be stored in a computer read/write memory medium.Based on such understanding, part or the part of this technical scheme that prior art is contributed by technical scheme the most in other words can embody with the form of software product, this computer software product is stored in a storage medium, including some instructions with so that a computer equipment (can be personal computer, server, or the network equipment etc.) perform all or part of step of method described in each embodiment of the present invention.And aforesaid storage medium includes: the various media that can store program code such as USB flash disk, portable hard drive, ROM, RAM, magnetic disc or CDs.
The above; being only the detailed description of the invention of the present invention, but protection scope of the present invention is not limited thereto, any those familiar with the art is in the technical scope that the invention discloses; change can be readily occurred in or replace, all should contain within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with scope of the claims.

Claims (14)

1. a method for real-time focusing, is applied to mobile terminal, and described mobile terminal includes that photographic head, described photographic head include the first camera lens and the first focusing motor, it is characterised in that the method for described real-time focusing includes:
First object object in photographic head preview interface is carried out preliminary contrast focusing, and preserves the first current value of the first focusing motor described in when preliminary contrast has been focused and described first object object occupies the first area ratio of described photographic head preview interface;
Obtain described first object object in moving process, occupy the second area ratio of described photographic head preview interface;
According to described first current value, the first area ratio and second area ratio, it is calculated the second current value of described first focusing motor according to preset algorithm;
According to described second current value, determine the second focusing motor position with described second current values match;
Described first focusing motor is moved to described second focusing motor position, completes to focus in real time.
Method the most according to claim 1, it is characterised in that described according to described first current value, the first area ratio and second area ratio, is calculated the step of the second current value of described first focusing motor according to preset algorithm, including:
According to described first current value, it is calculated the first object distance when preliminary contrast has been focused by preset algorithm;
According to described first object distance, the first area ratio and second area ratio, it is calculated the described first object object the second object distance in moving process by preset algorithm;
According to described second object distance, it is calculated described second current value by preset algorithm.
Method the most according to claim 2, it is characterised in that described according to described first current value, is calculated the step of the first object distance when preliminary contrast has been focused by preset algorithm, including:
Described first current value is converted to the first image distance when preliminary contrast has been focused;
According to optics Gauss formulaObtaining the first object distance when preliminary contrast has been focused, wherein, in described Gauss formula, u represents described first object distance, and v represents described first image distance, and f represents focal length, and f is constant, and the value of f determines according to the specification of described first camera lens.
Method the most according to claim 2, it is characterised in that described be calculated the step of the described first object object the second object distance in moving process by preset algorithm according to described first object distance, the first area ratio and second area ratio, including:
According to object distance computing formulaIt is calculated the described first object object the second object distance in moving process, wherein, in formula, L2Represent the described first object object the second object distance in moving process, L1Represent described first object distance, P1Represent described first area ratio, P2Represent described second area ratio.
Method the most according to claim 2, it is characterised in that described be calculated the step of described second current value by preset algorithm according to described second object distance, including:
According to optics Gauss formulaBeing calculated the described first object object the second image distance in moving process, wherein, u represents described second object distance, v represents the described first object object the second image distance in moving process, f represents focal length, and f is constant, and the value of f determines according to the specification of described first camera lens;
Described second image distance is converted to described second current value.
Method the most according to claim 1, it is characterised in that described motor of focusing described first moves to described second focusing motor position, farther includes after completing the step focused in real time:
Obtain focusing definition values when focusing in real time;
According to the described focusing definition values obtained, it is judged that whether described first object object remains static;
If described first object object is kept in motion, then perform to obtain the step of the second area ratio that described first object object occupies described photographic head preview interface in moving process;
If described first object object remains static, then it is finely adjusted Jiao by contrast focusing mode.
Method the most according to claim 6, it is characterised in that the described step being finely adjusted Jiao by contrast focusing mode, including:
Finely tuned the position of the first focusing motor in default focusing range by contrast focusing mode, described default focusing range is (1-5%) × P1≤ P≤(1+5%) × P1, wherein, P represents described default focusing range, P1Represent described second focusing motor position.
8. a mobile terminal, including photographic head, described photographic head includes the first camera lens and the first focusing motor, it is characterised in that described mobile terminal also includes:
Focusing module, for the first object object in photographic head preview interface being carried out preliminary contrast focusing, and preserve described in when preliminary contrast has been focused the first current value of the first focusing motor and described first object object occupies the first area ratio of described photographic head preview interface;
First acquisition module, occupies the second area ratio of described photographic head preview interface for obtaining described first object object in moving process;
Computing module, the second area ratio that the first current value, the first area ratio and the first acquisition module for preserving according to the first Focusing module acquires, the second current value of described first focusing motor it is calculated according to preset algorithm;
Determine module, for according to calculated second current value of described computing module, determining the second focusing motor position with described second current values match;
Focusing module, for moving described first focusing motor to described the second focusing motor position determining that module determines, completes to focus in real time.
Mobile terminal the most according to claim 8, it is characterised in that described computing module includes:
First object distance calculating sub module, for according to described first current value, is calculated the first object distance when preliminary contrast has been focused by preset algorithm;
Second object distance calculating sub module, for according to described first object distance, the first area ratio and second area ratio, is calculated the described first object object the second object distance in moving process by preset algorithm;
First Current calculation submodule, for according to described second object distance, is calculated described second current value by preset algorithm.
Mobile terminal the most according to claim 9, it is characterised in that described first object distance calculating sub module includes:
First image distance computation subunit, for being converted to the first image distance when preliminary contrast has been focused by described first current value;
First object distance computation subunit, for according to optics Gauss formulaObtaining the first object distance when preliminary contrast has been focused, wherein, in described Gauss formula, u represents described object distance, and v represents described first image distance, and f represents focal length, and f is constant, and the value of f determines according to the specification of described first camera lens.
11. mobile terminals according to claim 9, it is characterised in that described second object distance calculating sub module includes:
Second object distance computation subunit, for according to object distance computing formulaIt is calculated the described first object object the second object distance in moving process, wherein, in formula, L2Represent the described first object object the second object distance in moving process, L1Represent described first object distance, P1Represent described first area ratio, P2Represent described second area ratio.
12. mobile terminals according to claim 9, it is characterised in that described first Current calculation submodule includes:
Second image distance computation subunit, for according to optics Gauss formulaBeing calculated the described first object object the second image distance in moving process, wherein, u represents described object distance, and v represents described image distance, and f represents focal length, and f is constant, and the value of f determines according to the specification of described first camera lens;
First Current calculation subelement, for being converted to described second current value by described second image distance.
13. mobile terminals according to claim 8, it is characterised in that described mobile terminal also includes the second acquisition module, judge module and micro-focusing module, described second acquisition module is for having obtained focusing definition values when focusing in real time;Described judge module is for the focusing definition values acquired according to described second acquisition module, it is judged that whether described first object object remains static;If described first object object is kept in motion, it indicates that described first acquisition module performs to obtain the step of the second area ratio that described first object object occupies described photographic head preview interface in moving process;If described first object object remains static, it indicates that described micro-focusing module is finely adjusted Jiao by contrast focusing mode.
14. mobile terminals according to claim 13, it is characterised in that described micro-focusing module specifically for, in default focusing range, finely tune the position of the first focusing motor by contrast focusing mode, described default focusing range is (1-5%) × P1≤ P≤(1+5%) × P1, wherein, P represents described default focusing range, P1Represent described second focusing motor position.
CN201510833641.XA 2015-11-25 2015-11-25 Real-time focusing method and mobile terminal Pending CN105827945A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510833641.XA CN105827945A (en) 2015-11-25 2015-11-25 Real-time focusing method and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510833641.XA CN105827945A (en) 2015-11-25 2015-11-25 Real-time focusing method and mobile terminal

Publications (1)

Publication Number Publication Date
CN105827945A true CN105827945A (en) 2016-08-03

Family

ID=56513467

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510833641.XA Pending CN105827945A (en) 2015-11-25 2015-11-25 Real-time focusing method and mobile terminal

Country Status (1)

Country Link
CN (1) CN105827945A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107483820A (en) * 2017-08-23 2017-12-15 福建星瑞格软件有限公司 A kind of quick focus method and device of the focusing of contrast formula
CN107846546A (en) * 2016-09-18 2018-03-27 中兴通讯股份有限公司 Focusing compensating device and its method, the camera shooting terminal of a kind of camera module
CN109922180A (en) * 2019-03-28 2019-06-21 联想(北京)有限公司 Control method and electronic equipment
CN113242387A (en) * 2021-06-11 2021-08-10 广州立景创新科技有限公司 Camera module, focusing adjustment system and focusing method
CN113938596A (en) * 2020-06-29 2022-01-14 北京字节跳动网络技术有限公司 Method and device for shooting image

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008052225A (en) * 2006-08-28 2008-03-06 Olympus Imaging Corp Camera, focus control method, and program
CN101339349A (en) * 2007-07-04 2009-01-07 三洋电机株式会社 Imaging apparatus and automatic focus control method
CN104931957A (en) * 2015-06-01 2015-09-23 广东欧珀移动通信有限公司 Distance measurement method and device based on mobile terminal

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008052225A (en) * 2006-08-28 2008-03-06 Olympus Imaging Corp Camera, focus control method, and program
CN101339349A (en) * 2007-07-04 2009-01-07 三洋电机株式会社 Imaging apparatus and automatic focus control method
CN104931957A (en) * 2015-06-01 2015-09-23 广东欧珀移动通信有限公司 Distance measurement method and device based on mobile terminal

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107846546A (en) * 2016-09-18 2018-03-27 中兴通讯股份有限公司 Focusing compensating device and its method, the camera shooting terminal of a kind of camera module
CN107483820A (en) * 2017-08-23 2017-12-15 福建星瑞格软件有限公司 A kind of quick focus method and device of the focusing of contrast formula
CN109922180A (en) * 2019-03-28 2019-06-21 联想(北京)有限公司 Control method and electronic equipment
CN113938596A (en) * 2020-06-29 2022-01-14 北京字节跳动网络技术有限公司 Method and device for shooting image
CN113242387A (en) * 2021-06-11 2021-08-10 广州立景创新科技有限公司 Camera module, focusing adjustment system and focusing method

Similar Documents

Publication Publication Date Title
CN105827945A (en) Real-time focusing method and mobile terminal
CN105827952A (en) Photographing method for removing specified object and mobile terminal
US20110271182A1 (en) Eletronic apparatus and control method thereof
CN106506957A (en) A kind of photographic method and mobile terminal
CN105827951A (en) Moving object photographing method and mobile terminal
CN105959553A (en) Camera switching method and terminal
KR101132598B1 (en) Method and device for controlling screen size of display device
CN105827754A (en) High dynamic-range image generation method and mobile terminal
CN106791357A (en) A kind of image pickup method and mobile terminal
CN106101544A (en) A kind of image processing method and mobile terminal
KR101895883B1 (en) Method and apparatus for improving touch sensitivity of touchscreen panel
CN107172346A (en) A kind of weakening method and mobile terminal
CN105827944A (en) Focusing method and mobile terminal
CN105827963A (en) Scene changing detection method during shooting process and mobile terminal
CN106354374A (en) Icon moving method and mobile terminal
CN106126108A (en) A kind of breviary map generalization method and mobile terminal
KR20180102211A (en) Target disambiguation and correction
CN106454086A (en) Image processing method and mobile terminal
CN106095280A (en) A kind of photographic method and mobile terminal
CN104918125A (en) Method and device for switching channels
KR101380992B1 (en) Method and apparatus for controlling contents on electronic book using bezel
CN106161940A (en) A kind of image processing method and mobile terminal
CN106412671A (en) Video playing method and mobile terminal
CN104407774A (en) Screen switching equipment and method as well as mobile terminal
CN105242853A (en) Focusing method and electronic equipment

Legal Events

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

Application publication date: 20160803

RJ01 Rejection of invention patent application after publication