CN105007420B - A kind of focusing method and mobile terminal - Google Patents
A kind of focusing method and mobile terminal Download PDFInfo
- Publication number
- CN105007420B CN105007420B CN201510411562.XA CN201510411562A CN105007420B CN 105007420 B CN105007420 B CN 105007420B CN 201510411562 A CN201510411562 A CN 201510411562A CN 105007420 B CN105007420 B CN 105007420B
- Authority
- CN
- China
- Prior art keywords
- focusing
- difference value
- phase difference
- range
- target
- 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.)
- Expired - Fee Related
Links
- 238000000034 method Methods 0.000 title claims abstract description 34
- 238000001514 detection method Methods 0.000 claims abstract description 29
- 230000008569 process Effects 0.000 claims description 10
- 238000006073 displacement reaction Methods 0.000 claims description 8
- 238000000926 separation method Methods 0.000 claims description 3
- 238000010586 diagram Methods 0.000 description 10
- 230000000694 effects Effects 0.000 description 9
- 230000001960 triggered effect Effects 0.000 description 6
- 235000012773 waffles Nutrition 0.000 description 6
- 230000005540 biological transmission Effects 0.000 description 4
- 239000000571 coke Substances 0.000 description 3
- 230000009977 dual effect Effects 0.000 description 3
- 238000003384 imaging method Methods 0.000 description 3
- 230000007423 decrease Effects 0.000 description 2
- 230000007613 environmental effect Effects 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 230000007246 mechanism Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000002360 preparation method Methods 0.000 description 2
- 230000009467 reduction Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 239000011521 glass Substances 0.000 description 1
Landscapes
- Studio Devices (AREA)
- Automatic Focus Adjustment (AREA)
Abstract
A kind of focusing method of offer of the embodiment of the present invention and mobile terminal, wherein method include the following steps:When receiving the focusing instruction using phase focusing, current phase difference value is obtained;Detect whether the current phase difference value belongs to preset phase difference value range, the preset phase difference value ranging from triggers the phase difference value range that mobile terminal realizes phase focusing;When the result of detection is no, shooting motor is moved in target focusing range corresponding with the current phase difference value;The position of the shooting motor is adjusted in the target focusing range to determine that target focusing position is focused.The embodiment of the present invention correspondingly also provides a kind of mobile terminal.The embodiment of the present invention can ensure the accuracy of focusing and save focusing time, improve the speed of focusing.
Description
Technical field
The present invention relates to picture imaging techniques fields, and in particular to a kind of focusing method and mobile terminal.
Background technology
With the fast-developing of mobile terminal and gradually universal, mobile terminal has become indispensable in people's daily life
One of tool, the mobile terminal with photographic device is even more to favor by user.In order to obtain preferably shooting experience, people
Requirement to the camera function of mobile terminal is also higher and higher, does not require nothing more than and improves photographic device pixel, also requires to improve camera shooting
The shooting speed of device.Shooting speed is mainly determined by focusing mode.
Currently, most of mobile terminal on the market uses contrast formula focusing mode, passes through drive motor and drive eyeglass
Move back and forth accurately to find out target focusing position, but needs to expend longer time during moving back and forth,
The experience of user is influenced to a certain extent.
Invention content
A kind of focusing method of offer of the embodiment of the present invention and mobile terminal can ensure the accuracy of focusing and save focusing
Time improves the speed of focusing.
First aspect of the embodiment of the present invention provides a kind of focusing method, it may include:
When receiving the focusing instruction using phase focusing, current phase difference value is obtained;
Detect whether the current phase difference value belongs to preset phase difference value range, the preset phase difference value range
The phase difference value range of phase focusing is realized for triggering mobile terminal;
When the result of detection is no, shooting motor is moved to target corresponding with the current phase difference value and is focused
In range;
The position of the shooting motor is adjusted in the target focusing range to determine that target focusing position is focused.
Second aspect of the embodiment of the present invention provides a kind of mobile terminal, it may include:
Acquiring unit, for when receiving the focusing instruction using phase focusing, obtaining current phase difference value;
Detection unit, it is described default for detecting whether the current phase difference value belongs to preset phase difference value range
Phase difference value ranging from trigger mobile terminal realize phase focusing phase difference value range;
Mobile unit, for when the result of detection is no, shooting motor to be moved to and the current phase difference value phase
In corresponding target focusing range;
Unit is adjusted, for adjusting the position of the shooting motor in the target focusing range to determine that target is focused
It focuses position.
In embodiments of the present invention, by when receiving the focusing instruction using phase focusing, obtaining current phase difference
Value, and detect whether current phase difference value belongs to preset phase difference value range, when the result of detection is no, motor will be shot
It is moved to target focusing range corresponding with current phase difference value, and adjusts the position of shooting motor in target focusing range
To determine that target focusing position is focused, focuses at target focusing position to rapidly realize, save focusing time simultaneously
Ensure the accuracy of focusing.
Description of the drawings
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with
Obtain other attached drawings according to these attached drawings.
Fig. 1 is a kind of flow diagram of focusing method provided in an embodiment of the present invention;
Fig. 2 is the flow diagram of another focusing method provided in an embodiment of the present invention;
Fig. 3 is a kind of flow diagram of mobile terminal provided in an embodiment of the present invention;
Fig. 4 is the structural schematic diagram of the mobile unit in embodiment illustrated in fig. 3;
Fig. 5 is the structural schematic diagram of the adjusting unit in embodiment illustrated in fig. 3.
Specific implementation mode
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation describes, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall within the protection scope of the present invention.
A kind of focusing method of offer of the embodiment of the present invention and mobile terminal, can be applied to not be very sufficient in light, carefully
Section is not the scene shot in very abundant environment, for example, when mobile terminal is received and instructed using the focusing that phase focus,
Current phase difference value is obtained, and detects whether the current phase difference value belongs to preset phase difference value range, it is described preset
Phase difference value ranging from triggers the phase difference value range that the mobile terminal realizes phase focusing, when the result of detection is no,
The mobile terminal is moved to motor is shot in target focusing range corresponding with the current phase difference value, and described
The position of the shooting motor is adjusted in target focusing range to determine that target focusing position is focused, to both ensure to focus
Accuracy, and the speed of focusing is improved, even if can be fast light be not very sufficient, details is not in very abundant environment
Speed is accurately focused, and the experience of user is promoted.
It is wearable that mobile terminal in the embodiment of the present invention can include but is not limited to mobile phone, PAD (tablet computer), intelligence
Equipment etc. has the electronic equipment of camera function.
It describes in detail to focusing method provided in an embodiment of the present invention below in conjunction with attached drawing 1- attached drawings 3.
Fig. 1 is referred to, is a kind of flow diagram of focusing method provided in an embodiment of the present invention, this method may include walking
Rapid S101- steps S104.
S101 obtains current phase difference value when receiving the focusing instruction using phase focusing.
Focusing adjusts good focus distance when referring to using camera, focusing is also named to light, focused.Pass through camera Focusing mechanism
Object distance and position apart are changed, it is exactly to focus to make the process of made thing imaging clearly.The personnel that take pictures of profession more favor with special
The photographing device of industry carries out focusing and takes pictures, such as slr camera etc., but for non-professional ordinary user, digital camera
Or the mobile terminal of configuration photographic device just can meet demand.But requirement of the user to the photographic device of mobile terminal be increasingly
Height does not require nothing more than acquisition clearly image, is also required to quickly obtain image, such as on the train run at high speed quickly
It takes pictures.In order to meet requirement of the user to photographic device, the technology in mm professional camera special is applied to be used in originally mobile whole
In the photographic device at end, such as phase focusing.At present on the market, some mobile terminal has used phase focusing mode to carry out
Rapid focus.
Phase focusing is to realize auto-focusing by detecting the phase pushing figure of picture.In the position of sensitive image sensor
A waffle slab being made of parallel lines is placed, lines are light transmission and opaque in succession.After network board on appropriate location with light
Axisymmetrically place two photo detectors.Network board with it is of reciprocating vibration in optical axis vertical direction.When focusing surface and network board weight
When conjunction, two photo detectors behind are reached by the light of waffle slab light transmission lines simultaneously.And when defocus, light beam can only be first
Two photo detectors are reached afterwards, then have phase difference between their output signal.Dephased two signals through circuit at
It can control drive motor to adjust the position of object lens after reason, focusing surface made to be overlapped with the plane of waffle slab, it is automatic to realize
Focusing.Phase focusing speed is fast, precision is high, but when the light in shooting environmental is not very sufficient, scene is not very abundant, phase
Position focusing then cannot achieve, and cause the image effect finally shot bad, to influence user experience.The embodiment of the present invention is to existing
The focusing of some phases is improved, light be not very sufficient, scene be not can still obtain in very abundant environment it is good
Shooting effect.
Specifically, just starting the filming apparatus of mobile terminal when the desired shooting of user, before the filming apparatus can be
Set camera, rear camera, dual camera etc..Optionally, it when user wants to shoot, can click described mobile whole
The display screen at end carries out auto-focusing with the photographic device for triggering the mobile terminal, and the display screen of the mobile terminal can at this time
It can show a rectangle frame.The clicking operation of user is to be instructed to the focusing that the mobile terminal is sent.The present invention is implemented
The photographic device acquiescence of the mobile terminal in example is focused using phase focusing mode.It is focused using phase when receiving
Focusing instruction when, the acquisition for mobile terminal current phase difference value.Optionally, the current phase difference value is in the movement
Phase difference value between two images formed on sensor in terminal.
S102, detects whether the current phase difference value belongs to preset phase difference value range, the preset phase difference
Value ranging from triggering mobile terminal realizes the phase difference value range of phase focusing.
Specifically, the mobile terminal detects whether the current phase difference value belongs to preset phase difference value range, institute
It states preset phase difference value and ranging from triggers the phase difference value range that the mobile terminal realizes phase focusing.Since phase is focused
To in environment light and details have certain requirement, therefore be not that phase focusing can be used to carry out pair in any environment
Coke, when in environment light and details meet the requirements when just can trigger the mobile terminal and focused using phase, can
With understanding be phase difference value at this time can phase-triggered focusing, phase difference value at this time is in the preset phase difference value model
In enclosing.But when the light in environment is not very sufficient, when details is not very abundant, phase difference value at this time is smaller, not described
Within the scope of preset phase difference value, therefore can not phase-triggered focusing.
Shooting motor is moved to mesh corresponding with the current phase difference value by S103 when the result of detection is no
It marks in focusing range.
Specifically, when the result of detection is no, i.e., the described current phase difference value is not belonging to the preset phase difference value
Range, it is to be appreciated that the current phase difference value can not trigger the mobile terminal and be focused using phase.Mesh
Before, in the case where phase can not be used to be focused, focusing mode is switched to by the photographic device of some mobile terminals
Contrast formula is focused.The operation principle of contrast formula focusing is that contrast formula focusing system puies forward the pixel of this part as goal-focus
It takes out, and calculates color-values therein, the averaged color value of goal-focus part is then calculated according to certain algorithm, and
Calculate contrast value.Optionally, difference of the contrast difference between minimum brightness and maximum brightness, contrast difference can also
Referred to as contrast value, contrast amount.The principle of contrast formula focusing system is changed according to the contrast of focal point picture, and contrast is found
Lens location when maximum, that is, the position accurately focused.Specifically, under non-focus state, because of the picture of entire focus
Face is in empty coke-like state, Gaussian Blur effect is similar to, so the color between pixel is relatively uniform;When starting focusing, eyeglass
Start to move, picture is gradually clear, and contrast is begun to ramp up;In focus state.Picture is most clear, contrast highest, but takes the photograph
As device is not aware that, so will continue to moving lens;It continues to move to eyeglass and finds that contrast is begun to decline, further moving lens
Piece finds that contrast further declines, and photographic device, which is known, has already passed by focus, images motor driving eyeglass at this time and retracts to right
Position more highest than degree, to complete to focus.It can be seen that the focusing of contrast formula needs to move back and forth eyeglass to find best pair
Burnt position, although this focusing mode, which can arrive, obtains the higher image of accuracy, the time expended is longer, in certain journey
The experience of user is influenced on degree.Contrast focusing needs eyeglass completely to hold race at least one backward from rear end toward front end or from front end
Time, time-consuming, and therefore, the embodiment of the present invention not only having been saved the time using one kind but also can guarantee accurate when the result of detection is no
The method of degree is focused.
Specifically, when the result of detection is no, the mobile terminal is moved to motor is shot and the current phase
In the corresponding target focusing range of difference.Although cannot directly be carried out pair using phase focusing using the current phase difference value
Coke, but the current phase difference value can determine the target focusing range, can reduce shooting motor driving mirror in this way
The range of piece movement, reduction moves back and forth the mobile time, to improve the speed of focusing.The shooting motor can drive mirror
The movement of piece, during shooting, the mobile shooting motor will drive the movement of eyeglass.
S104 adjusts the position of the shooting motor to determine that target focusing position carries out in the target focusing range
Focusing.
Specifically, after being determined in the target focusing range according to the current phase difference value, the mobile terminal exists
The position of the shooting motor is adjusted in the target focusing range to determine that target focusing position is focused.In the target
It is equally just to focus using contrast formula, but focusing range reduces that the target focusing position is searched in focusing range,
The Distance Shortened moved back and forth finds target focusing position so as to express delivery.Therefore, the mobile terminal is in the target pair
When adjusting the position of the shooting motor in burnt range, the contrast amount of each position, i.e. contrast value are calculated, and obtain the contrast
Position of the amount higher than predetermined threshold value.Optionally, the contrast amount is that the contrast amount is maximum higher than the position of the predetermined threshold value
Corresponding position.Wherein, the predetermined threshold value is depending on environment and target acquisition image.It is higher than when getting the contrast amount
It is target focusing position by the location determination when position of the predetermined threshold value, the target focusing position is accurate focusing
Position, best focal position, the goal-focus position carry out focusing can get the preferable image of effect.
In embodiments of the present invention, by when receiving the focusing instruction using phase focusing, obtaining current phase difference
Value, and detect whether current phase difference value belongs to preset phase difference value range, when the result of detection is no, motor will be shot
It is moved to target focusing range corresponding with current phase difference value, and adjusts the position of shooting motor in target focusing range
To determine that target focusing position is focused, focuses at target focusing position to rapidly realize, save focusing time simultaneously
Ensure the accuracy of focusing.
Fig. 2 is referred to, for the flow diagram of another focusing method provided in an embodiment of the present invention, this method may include
Step S201- steps S207.
S201, when receiving the shooting instruction using phase focusing, obtain two images being formed on a sensor it
Between current phase difference value.
Specifically, when the mobile terminal receives the shooting instruction focused using phase, it is to be appreciated that user
It opens photographic device and clicking operation has been carried out to the display screen under image pickup mode of the mobile terminal, it is described at this time to take the photograph
As device just obtains the current phase difference value between formed on a sensor two images.Wherein, the photographic device can be with
It is front camera, rear camera, dual camera etc..Mobile terminal can open described take the photograph by included camera programm
As device, photographic device can also be called or opened by other application programs, for example, social software, U.S. figure software etc.
Application program.Wherein, image is isolated 2 images by the phase focusing by detaching camera lens and linear transducer, is then led to
Cross linear transducer and detect the distance between two images, i.e. phase difference value, finally by the linear signal of phase-detection with
And phase difference value judges that current focal position is forward or rearward, and accurately tell the camera shooting motor should to drive mirror
Piece is moved to which direction, and when focus exact position, and phase focusing system can accurately be known currently
In focus state.
S202, detects whether the current phase difference value belongs to preset phase difference value range, the preset phase difference
Value ranging from triggering mobile terminal realizes the phase difference value range of phase focusing.
Specifically, the mobile terminal detects whether the current phase difference value belongs to preset phase difference value range, institute
It states preset phase difference value and ranging from triggers the phase difference value range that the mobile terminal realizes phase focusing.Since phase is focused
To in environment light and details have certain requirement, therefore be not that phase focusing can be used to carry out pair in any environment
Coke, when in environment light and details meet the requirements when just can trigger the mobile terminal and focused using phase, can
With understanding be phase difference value at this time can phase-triggered focusing, phase difference value at this time is in the preset phase difference value model
In enclosing.But when the light in environment is not very sufficient, when details is not very abundant, phase difference value at this time is smaller, not described
Within the scope of preset phase difference value, therefore can not phase-triggered focusing.
S203 determines the mobile message of shooting motor according to the current phase difference value when the result of detection is no.
Specifically, when the result of detection is no, i.e., the described current phase difference value is not belonging to the preset phase difference value
Range, it is to be appreciated that the current phase difference value can not trigger the mobile terminal and be focused using phase.Nothing
By the mobile message which kind of focusing mode to be required for determining shooting motor using, i.e., moved to which direction, mobile how many distance,
The shooting motor can drive the movement of eyeglass, and during shooting, the mobile shooting motor will drive eyeglass
It is mobile, to make eyeglass focus at accurate focal position, to complete to shoot.When can use phase focus mode into
When row focusing, the shooting motor is directly moved at focal position according to the current phase difference value by the filming apparatus.
When being focused using contrast formula focusing mode, if eyeglass in rear end, then the shooting motor first moves again toward front end
Rear end is retracted, to determine focal position;If eyeglass is first moved toward rear end and is then moved again toward front end in front end, the shooting motor
It is dynamic, to determine focal position.
Specifically, when the result of detection is no, the mobile terminal determines shooting horse according to the current phase difference value
The mobile message reached, the mobile message include moving direction and displacement distance.The mobile terminal is according to the current phase
The positive and negative determination shooting motor of difference is toward front end movement or rear end movement, optionally, when the current phase difference value
For timing, the shooting motor is moved toward rear end;When the current phase difference value is negative, the shooting motor is moved toward front end
It is dynamic.The mobile terminal determines the displacement distance of the shooting motor according to the absolute value of the current phase difference value.
S204 determines the target focusing range of the shooting motor according to the mobile message.
Specifically, the mobile terminal after determining the moving direction just according to the displacement distance by the shooting
Motor is moved to target location, and the mobile terminal determines the shooting motor according to the target location and pre-determined distance
Target focusing range, the midpoint of the target focusing range is the target location, by before and after the target location away from
From the range for the pre-determined distance as the target focusing range.Wherein, the numerical value religion of the pre-determined distance is small, so that institute
State target focusing range compared to contrast formula focusing moving range for it is much smaller, the occurrence of the pre-determined distance is by the shifting
Manufacturer's setting of dynamic terminal, depending on being concrete condition.
The shooting motor is moved in the target focusing range by S205.
Specifically, once the target focusing range determines, the shooting motor is just moved to institute by the mobile terminal
It states in target focusing range, to facilitate the photographic device of the mobile terminal to search target focusing in the target focusing range
Position, i.e., the position accurately focused.
S206, adjusts the position of the shooting motor in the target focusing range, and calculates in adjustment process everybody
The contrast amount set.
Specifically, the mobile terminal adjusts the position of the shooting motor in the target focusing range, and calculate
The contrast amount of each position in adjustment process, i.e. contrast value in contrast formula focusing mode.It is understood that described mobile whole
It holds in the moving process of the shooting motor, records the contrast amount of position in real time.
S207 obtains the position that the contrast amount is higher than predetermined threshold value, and the contrast amount is higher than the predetermined threshold value
Location determination be target focusing position, focus.
Specifically, contrast amount described in the acquisition for mobile terminal is higher than the position of predetermined threshold value, and the contrast amount is high
It is target focusing position in the location determination of the predetermined threshold value, focuses.Optionally, the contrast amount is default higher than described
The position of threshold value is the position corresponding to the contrast amount maximum.Wherein, the predetermined threshold value regards environment and target acquires image
Depending on.It is target focusing position, institute by the location determination when getting position of the contrast amount higher than the predetermined threshold value
Position, the best focal position that target focusing position is as accurately focused are stated, focusing energy is carried out in the goal-focus position
Get the preferable image of effect.
In embodiments of the present invention, by when receiving the focusing instruction using phase focusing, obtaining current phase difference
Value, and detect whether current phase difference value belongs to preset phase difference value range, when the result of detection is no, motor will be shot
It is moved to target focusing range corresponding with current phase difference value, and adjusts the position of shooting motor in target focusing range
To determine that target focusing position is focused, focuses at target focusing position to rapidly realize, save focusing time simultaneously
The accuracy for ensuring focusing, promotes the experience of user.
It describes in detail to mobile terminal provided in an embodiment of the present invention below in conjunction with attached drawing 3- attached drawings 5.It needs
Bright is the attached mobile terminals shown in fig. 5 of attached drawing 3-, the method for executing Fig. 1 of the present invention and embodiment illustrated in fig. 2, in order to just
In explanation, illustrates only and do not disclosed with the relevant part of the embodiment of the present invention, particular technique details, please refer to Fig. 1 of the present invention
With embodiment shown in Fig. 2.
Fig. 3 is referred to, is a kind of structural schematic diagram of mobile terminal provided by the invention, which may include:
Acquiring unit 101, detection unit 102, mobile unit 103 and adjusting unit 104.
Acquiring unit 101, for when receiving the focusing instruction using phase focusing, obtaining current phase difference value.
Focusing adjusts good focus distance when referring to using camera, focusing is also named to light, focused.Pass through camera Focusing mechanism
Object distance and position apart are changed, it is exactly to focus to make the process of made thing imaging clearly.The personnel that take pictures of profession more favor with special
The photographing device of industry carries out focusing and takes pictures, such as slr camera etc., but for non-professional ordinary user, digital camera
Or the mobile terminal of configuration photographic device just can meet demand.But requirement of the user to the photographic device of mobile terminal be increasingly
Height does not require nothing more than acquisition clearly image, is also required to quickly obtain image, such as on the train run at high speed quickly
It takes pictures.In order to meet requirement of the user to photographic device, the technology in mm professional camera special is applied to be used in originally mobile whole
In the photographic device at end, such as phase focusing.At present on the market, some mobile terminal has used phase focusing mode to carry out
Rapid focus.
Phase focusing is to realize auto-focusing by detecting the phase pushing figure of picture.In the position of sensitive image sensor
A waffle slab being made of parallel lines is placed, lines are light transmission and opaque in succession.After network board on appropriate location with light
Axisymmetrically place two photo detectors.Network board with it is of reciprocating vibration in optical axis vertical direction.When focusing surface and network board weight
When conjunction, two photo detectors behind are reached by the light of waffle slab light transmission lines simultaneously.And when defocus, light beam can only be first
Two photo detectors are reached afterwards, then have phase difference between their output signal.Dephased two signals through circuit at
It can control drive motor to adjust the position of object lens after reason, focusing surface made to be overlapped with the plane of waffle slab, it is automatic to realize
Focusing.Phase focusing speed is fast, precision is high, but when the light in shooting environmental is not very sufficient, scene is not very abundant, phase
Position focusing then cannot achieve, and cause the image effect finally shot bad, to influence user experience.The embodiment of the present invention is to existing
The focusing of some phases is improved, light be not very sufficient, scene be not can still obtain in very abundant environment it is good
Shooting effect.
In the specific implementation, just starting the filming apparatus 10 of mobile terminal, the filming apparatus 10 when the desired shooting of user
Can be front camera, rear camera, dual camera etc..Optionally, when user wants to shoot, institute can be clicked
It states the display screen of mobile terminal and auto-focusing is carried out with the photographic device for triggering the mobile terminal 10, at this time the mobile terminal
Display screen may show a rectangle frame.The clicking operation of user is to be instructed to the focusing that the mobile terminal is sent.
The photographic device acquiescence of the mobile terminal 10 in the embodiment of the present invention is focused using phase focusing mode.When receiving
When being instructed using the focusing of phase focusing, the acquiring unit 101 obtains current phase difference value.Specifically, the acquiring unit
Phase difference value between two images that 101 acquisitions are formed on the sensor in the mobile terminal 10.
Detection unit 102, it is described pre- for detecting whether the current phase difference value belongs to preset phase difference value range
If phase difference value ranging from trigger mobile terminal realize phase focusing phase difference value range.
In the specific implementation, the detection unit 102 detects the current phase difference value that the acquiring unit 101 is got
Whether preset phase difference value range is belonged to, and the preset phase difference value ranging from triggers the mobile terminal and realizes phase pair
Burnt phase difference value range.Due to phase focusing in environment light and details have certain requirement, be not any
Can be focused using phase in environment, when in environment light and details meet the requirements when just can trigger the movement
Terminal is focused using phase, it is to be appreciated that phase difference value at this time can phase-triggered focusing, phase at this time
Potential difference value is within the scope of the preset phase difference value.But when the light in environment is not very sufficient, details is not very abundant
When, phase difference value at this time is smaller, not within the scope of the preset phase difference value, therefore can not phase-triggered focusing.
Mobile unit 103, for when the result of detection is no, shooting motor to be moved to and the current phase difference value
In corresponding target focusing range.
In the specific implementation, when the result that the detection unit 102 detects is no, i.e., the described current phase difference value is not belonging to
The preset phase difference value range, it is to be appreciated that the current phase difference value can not trigger the mobile terminal and use phase
It focuses position.Currently, in the case where phase can not be used to be focused, the photographic device of some mobile terminals
Focusing mode is switched to the focusing of contrast formula.The operation principle of contrast formula focusing, which is contrast formula focusing system, will be used as goal-focus
The pixel extraction of this part come out, and calculate color-values therein, goal-focus portion then calculated according to certain algorithm
The averaged color value divided, and calculate contrast value.Optionally, difference of the contrast difference between minimum brightness and maximum brightness
Value, contrast difference are referred to as contrast value, contrast amount.The principle of contrast formula focusing system is pair according to focal point picture
Change than degree, find lens location when contrast maximum, that is, the position accurately focused.Specifically, in non-focus state
Under, because the picture of entire focus is in empty coke-like state, it is similar to Gaussian Blur effect, so the color between pixel is more equal
It is even;When starting focusing, eyeglass starts to move, and picture is gradually clear, and contrast is begun to ramp up;In focus state.Picture is most clear
It is clear, contrast highest, but photographic device is not aware that, so will continue to moving lens;It continues to move to eyeglass and finds that contrast is opened
Begin to decline, further move eyeglass, it is found that contrast further declines, photographic device, which is known, has already passed by focus, images at this time
Motor driving eyeglass retracts to the highest position of contrast, to complete to focus.It can be seen that the focusing of contrast formula needs to move back
Index glass piece finds best focusing position, although this focusing mode, which can arrive, obtains accuracy higher image, consumption
The time taken is longer, influences the experience of user to a certain extent.Contrast focusing need eyeglass completely from rear end toward front end or
Person holds race at least one time from front end backward, and time-consuming, and therefore, the embodiment of the present invention is when the result of detection is no, using one kind
Not only it had saved the time but also the method that can guarantee accuracy is focused.
In the specific implementation, when the result that the detection unit 102 detects is no, the mobile unit 103 will shoot horse
Up to being moved in target focusing range corresponding with the current phase difference value.Although the current phase cannot be utilized directly
Difference is focused using phase, but the current phase difference value can determine the target focusing range, so just
The range of shooting motor driving eyeglass movement can be reduced, reduction moves back and forth the mobile time, to improve the speed of focusing.
The shooting motor can drive the movement of eyeglass, and during shooting, the mobile shooting motor will drive eyeglass
It is mobile.The concrete structure of the mobile unit 103 refers to Fig. 4.
Fig. 4 is referred to, is the structural schematic diagram of the mobile unit in embodiment illustrated in fig. 3, the mobile unit 103 includes
Information determination unit 1031, range determination unit 1032 and position mobile unit 1033.Wherein, described information determination unit includes
Direction-determining unit 1131 and distance determining unit 1231.
Information determination unit 1031, for when the result of detection is no, being determined and being shot according to the current phase difference value
The mobile message of motor.
In the specific implementation, when the result that the detection unit 102 detects is no, 1031 basis of described information determination unit
The current phase difference value determines the mobile message of shooting motor.Which kind of no matter it is required for determining shooting motor using focusing mode
Mobile message, i.e., moved to which direction, mobile how many distance, the shooting motor can drive the movement of eyeglass, clap
During taking the photograph, the mobile shooting motor will drive the movement of eyeglass, to make eyeglass at accurate focal position into
Row focusing, to complete to shoot.When phase focusing mode can be used to be focused, the filming apparatus is directly worked as according to
The shooting motor is moved at focal position by preceding phase difference value.When being focused using contrast formula focusing mode, if mirror
Piece first moves toward front end in rear end, then the shooting motor and then retracts rear end again, to determine focal position;If eyeglass is preceding
End, then the shooting motor first move and then moved again toward front end by past rear end, to determine focal position.The mobile message includes
Moving direction and displacement distance, therefore described information determination unit 1031 includes direction-determining unit 1131 and distance determining unit
1231。
Direction-determining unit 1131, for the positive and negative determining mobile side for shooting motor according to the current phase difference value
To.
In the specific implementation, positive and negative determining shooting motor of the direction-determining unit 1131 according to the current phase difference value
Moving direction.Optionally, when the current phase difference value is timing, the shooting motor is moved toward rear end;When described current
When phase difference value is negative, the shooting motor is moved toward front end.
Distance determining unit 1231, the shifting for determining the shooting motor according to the absolute value of the current phase difference value
Dynamic distance.
In the specific implementation, the distance determining unit 1231 determines the bat according to the absolute value of the current phase difference value
Take the photograph the displacement distance of motor.
Range determination unit 1032, the target focusing range for determining the shooting motor according to the mobile message.
In the specific implementation, described information determination unit 1031 after determining the moving direction just according to the movement away from
It is moved to target location from by the shooting motor, the range determination unit 1032 is according to the target location and presets
Distance determines the target focusing range of the shooting motor, and the midpoint of the target focusing range is the target location, will
The target location longitudinal separation is the range of the pre-determined distance as the target focusing range.Wherein, described default
The numerical value religion of distance is small, so that it is much smaller for moving range of the target focusing range compared to the focusing of contrast formula, it is described pre-
If the occurrence of distance is set by the manufacturer of the mobile terminal, depending on being concrete condition.
Position mobile unit 1033, for the shooting motor to be moved in the target focusing range.
In the specific implementation, once the target focusing range determines that the position mobile unit 1033 is just by the shooting
Motor is moved in the target focusing range, to facilitate the photographic device of the mobile terminal 10 in the target focusing range
Interior lookup target focusing position, i.e., the position accurately focused.
Unit 104 is adjusted, for adjusting the position of the shooting motor in the target focusing range to determine target
Focusing position is focused.
In the specific implementation, the position for adjusting unit 104 and adjusting the shooting motor in the target focusing range
To determine that target focusing position is focused, it is to be appreciated that the adjusting unit 104 is micro- in the target focusing range
It adjusts to search preparation focusing position.The concrete structure for adjusting unit 104 can be found in Fig. 5.
Fig. 5 is referred to, is the structural schematic diagram of the adjusting unit in embodiment illustrated in fig. 3, the adjusting unit 104 includes
Contrast amount computing unit 1041 and target determination unit 1042.
Contrast amount computing unit 1041, the position for adjusting the shooting motor in the target focusing range, and
Calculate the contrast amount of each position in adjustment process.
In the specific implementation, the contrast amount computing unit 1041 adjusts the shooting motor in the target focusing range
Position, and calculate the contrast amount of each position in adjustment process, i.e. contrast value in contrast formula focusing mode.It is appreciated that
It is that the contrast amount computing unit 1041 records the contrast amount of position in real time in the moving process of the shooting motor.
Target determination unit 1042 is higher than the position of predetermined threshold value for obtaining the contrast amount, and by the contrast amount
Location determination higher than the predetermined threshold value is target focusing position, is focused.
In the specific implementation, the target determination unit 1042 obtains the position that the contrast amount is higher than predetermined threshold value, and will
The contrast amount is target focusing position higher than the location determination of the predetermined threshold value, is focused.Optionally, the contrast amount
It is the position corresponding to the contrast amount maximum higher than the position of the predetermined threshold value.Wherein, the predetermined threshold value regard environment and
Target acquires depending on image.It is mesh by the location determination when getting position of the contrast amount higher than the predetermined threshold value
Mark focusing position, position that the target focusing position is as accurately focused, best focal position, in the goal-focus position
It sets focus and can get the preferable image of effect.
In embodiments of the present invention, by when receiving the focusing instruction using phase focusing, obtaining current phase difference
Value, and detect whether current phase difference value belongs to preset phase difference value range, when the result of detection is no, motor will be shot
It is moved to target focusing range corresponding with current phase difference value, and adjusts the position of shooting motor in target focusing range
To determine that target focusing position is focused, focuses at target focusing position to rapidly realize, save focusing time simultaneously
Ensure the accuracy of focusing.
One of ordinary skill in the art will appreciate that realizing all or part of flow in above-described embodiment method, being can be with
Relevant hardware is instructed to complete by computer program, the program can be stored in a computer read/write memory medium
In, the program is when being executed, it may include such as the flow of the embodiment of above-mentioned each method.Wherein, the storage medium can be magnetic
Dish, CD, read-only memory (Read-Only Memory, ROM) or random access memory (Random Access
Memory, RAM) etc..
The above disclosure is only the preferred embodiments of the present invention, cannot limit the right model of the present invention with this certainly
It encloses, therefore equivalent changes made in accordance with the claims of the present invention, is still within the scope of the present invention.
Claims (6)
1. a kind of focusing method, which is characterized in that including:
When receiving the focusing instruction using phase focusing, current phase difference value is obtained;
Detect whether the current phase difference value belongs to preset phase difference value range, the preset phase difference value ranging from touches
Send out the phase difference value range that mobile terminal realizes phase focusing;
When the result of detection is no, the mobile message of shooting motor is determined according to the current phase difference value;
Determine that the target focusing range of the shooting motor, the midpoint of the target focusing range are according to the mobile message
According to the mobile message by the target location that is moved to of shooting motor, the target location longitudinal separation be it is default away from
From the ranging from described target focusing range, the target focusing range be less than contrast formula focusing moving range;
The shooting motor is moved in the target focusing range;
The position of the shooting motor is adjusted in the target focusing range, and calculates the contrast of each position in adjustment process
Amount;
The position that the contrast amount is higher than predetermined threshold value is obtained, and the contrast amount is higher than to the location determination of the predetermined threshold value
For target focusing position, focus.
2. according to the method described in claim 1, it is characterized in that, described ought receive the shooting instruction focused using phase
When, current phase difference value is obtained, including:
When receiving the shooting instruction using phase focusing, the current phase between two images formed on a sensor is obtained
Potential difference value.
3. according to the method described in claim 1, it is characterized in that, the mobile message includes moving direction and displacement distance;
The mobile message that shooting motor is determined according to the current phase difference value, including:
According to the moving direction of the positive and negative determining shooting motor of the current phase difference value;
The displacement distance of the shooting motor is determined according to the absolute value of the current phase difference value.
4. a kind of mobile terminal, which is characterized in that including:
Acquiring unit, for when receiving the focusing instruction using phase focusing, obtaining current phase difference value;
Detection unit, for detecting whether the current phase difference value belongs to preset phase difference value range, the preset phase
Potential difference value ranging from triggers the phase difference value range that mobile terminal realizes phase focusing;
Information determination unit, for when the result of detection is no, the shifting of shooting motor to be determined according to the current phase difference value
Dynamic information;
Range determination unit, the target focusing range for determining the shooting motor according to the mobile message, the target
The midpoint of focusing range is the target location for being moved to the shooting motor according to the mobile message, the target location
Locate the ranging from described target focusing range that longitudinal separation is pre-determined distance, the target focusing range is less than the focusing of contrast formula
Moving range;
Position mobile unit, for the shooting motor to be moved in the target focusing range;
Unit is adjusted, the adjusting unit includes:
Contrast amount computing unit, the position for adjusting the shooting motor in the target focusing range, and calculate adjusting
The contrast amount of each position in the process;
Target determination unit is higher than the position of predetermined threshold value for obtaining the contrast amount, and by the contrast amount higher than described
The location determination of predetermined threshold value is target focusing position, is focused.
5. mobile terminal according to claim 4, which is characterized in that the acquiring unit, which is specifically used for working as, receives use
When the shooting instruction of phase focusing, the current phase difference value between two images formed on a sensor is obtained.
6. mobile terminal according to claim 4, which is characterized in that the mobile message include moving direction and it is mobile away from
From;
Described information determination unit includes:
Direction-determining unit, for the positive and negative determining moving direction for shooting motor according to the current phase difference value;
Distance determining unit, the displacement distance for determining the shooting motor according to the absolute value of the current phase difference value.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510411562.XA CN105007420B (en) | 2015-07-14 | 2015-07-14 | A kind of focusing method and mobile terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510411562.XA CN105007420B (en) | 2015-07-14 | 2015-07-14 | A kind of focusing method and mobile terminal |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105007420A CN105007420A (en) | 2015-10-28 |
CN105007420B true CN105007420B (en) | 2018-09-04 |
Family
ID=54379921
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510411562.XA Expired - Fee Related CN105007420B (en) | 2015-07-14 | 2015-07-14 | A kind of focusing method and mobile terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105007420B (en) |
Families Citing this family (20)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105721775B (en) * | 2016-02-29 | 2018-09-18 | 广东欧珀移动通信有限公司 | Control method, control device and electronic device |
CN105549301B (en) * | 2016-02-29 | 2018-02-27 | 广东欧珀移动通信有限公司 | Control method, control device and electronic installation |
CN105657277B (en) * | 2016-02-29 | 2019-02-05 | Oppo广东移动通信有限公司 | Control method, control device and electronic device |
CN105791682A (en) * | 2016-02-29 | 2016-07-20 | 广东欧珀移动通信有限公司 | Control method, control device and electronic device |
CN105704378A (en) * | 2016-02-29 | 2016-06-22 | 广东欧珀移动通信有限公司 | Control method, control device and electronic device |
CN106027889B (en) * | 2016-05-20 | 2019-04-12 | Oppo广东移动通信有限公司 | Control method, control device and electronic device |
CN106101556B (en) | 2016-07-29 | 2017-10-20 | 广东欧珀移动通信有限公司 | Image combining method, device and the mobile terminal of mobile terminal |
US10554877B2 (en) | 2016-07-29 | 2020-02-04 | Guangdong Oppo Mobile Telecommunications Corp., Ltd. | Image synthesis method and apparatus for mobile terminal, and mobile terminal |
CN106101554B (en) * | 2016-07-29 | 2017-08-08 | 广东欧珀移动通信有限公司 | camera focusing method, device and terminal |
CN106353747A (en) * | 2016-09-06 | 2017-01-25 | 乐视控股(北京)有限公司 | Distance measurement method and distance measurement device |
CN106385534A (en) * | 2016-09-06 | 2017-02-08 | 努比亚技术有限公司 | Focusing method and terminal |
CN106454100B (en) * | 2016-10-24 | 2019-07-19 | Oppo广东移动通信有限公司 | Focusing method, device and mobile terminal |
CN106331240A (en) * | 2016-10-26 | 2017-01-11 | 维沃移动通信有限公司 | Mobile terminal |
CN106603911A (en) * | 2016-11-29 | 2017-04-26 | 广东欧珀移动通信有限公司 | Control method, control apparatus, and electronic apparatus |
CN107179596B (en) * | 2017-05-24 | 2019-09-17 | Oppo广东移动通信有限公司 | Focusing method and Related product |
CN107465881B (en) * | 2017-09-30 | 2020-06-26 | 努比亚技术有限公司 | Dual-camera focusing method, mobile terminal and computer readable storage medium |
CN108184055A (en) * | 2017-12-28 | 2018-06-19 | 上海传英信息技术有限公司 | A kind of focusing method and focusing mechanism based on intelligent terminal |
KR102697423B1 (en) * | 2018-09-21 | 2024-08-22 | 엘지이노텍 주식회사 | Camera module and method of operating the same |
CN114827462B (en) * | 2022-04-15 | 2024-04-16 | 深圳市道通智能航空技术股份有限公司 | Focusing method, focusing device, electronic equipment and unmanned aerial vehicle |
CN117998203B (en) * | 2024-04-03 | 2024-09-06 | 荣耀终端有限公司 | Image processing method, electronic equipment and storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104052920A (en) * | 2013-03-12 | 2014-09-17 | 佳能株式会社 | Focus Detecting Apparatus, Control Method Thereof, And Image-pickup Apparatus |
CN104221362A (en) * | 2012-03-28 | 2014-12-17 | 富士胶片株式会社 | Imaging device and imaging assistance method |
Family Cites Families (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1684503B1 (en) * | 2005-01-25 | 2016-01-13 | Canon Kabushiki Kaisha | Camera and autofocus control method therefor |
JP2007310009A (en) * | 2006-05-16 | 2007-11-29 | Olympus Imaging Corp | Digital camera and camera system |
JP2009036986A (en) * | 2007-08-01 | 2009-02-19 | Olympus Imaging Corp | Photographing device and control method for photographing device |
JP5317562B2 (en) * | 2008-07-17 | 2013-10-16 | キヤノン株式会社 | Phase difference detection device, imaging device, phase difference detection method, phase difference detection program |
JP5468178B2 (en) * | 2011-03-31 | 2014-04-09 | 富士フイルム株式会社 | IMAGING DEVICE, IMAGING DEVICE CONTROL METHOD, AND PROGRAM |
JP6000520B2 (en) * | 2011-07-25 | 2016-09-28 | キヤノン株式会社 | Imaging apparatus and control method and program thereof |
JP6207303B2 (en) * | 2012-09-10 | 2017-10-04 | キヤノン株式会社 | Control device, actuator provided with control device, image shake correction device, replacement lens, imaging device, and automatic stage |
US9197809B2 (en) * | 2013-05-01 | 2015-11-24 | Canon Kabushiki Kaisha | Image pickup apparatus, method of controlling image pickup apparatus, and non-transitory computer-readable storage medium |
-
2015
- 2015-07-14 CN CN201510411562.XA patent/CN105007420B/en not_active Expired - Fee Related
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104221362A (en) * | 2012-03-28 | 2014-12-17 | 富士胶片株式会社 | Imaging device and imaging assistance method |
CN104052920A (en) * | 2013-03-12 | 2014-09-17 | 佳能株式会社 | Focus Detecting Apparatus, Control Method Thereof, And Image-pickup Apparatus |
Also Published As
Publication number | Publication date |
---|---|
CN105007420A (en) | 2015-10-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105007420B (en) | A kind of focusing method and mobile terminal | |
US10848680B2 (en) | Zooming control apparatus, image capturing apparatus and control methods thereof | |
US9313419B2 (en) | Image processing apparatus and image pickup apparatus where image processing is applied using an acquired depth map | |
JP5895270B2 (en) | Imaging device | |
EP2141537A1 (en) | Image pickup apparatus, method of controlling the same, computer program code, and storage medium | |
TWI515470B (en) | Auto-focus system for multiple lens and method thereof | |
JP2013219615A (en) | Imaging apparatus and method for controlling the same | |
CN101183206A (en) | Method for calculating distance and actuate size of shot object | |
JP2008288975A (en) | Imaging apparatus, imaging method and imaging program | |
JP2009251557A (en) | Imaging apparatus | |
CN110708463B (en) | Focusing method, focusing device, storage medium and electronic equipment | |
TW201541143A (en) | Auto-focus system for multiple lens and method thereof | |
JP2007328360A (en) | Automatic focusing camera and photographing method | |
JP2001116979A (en) | Automatic focusing camera and photographing method | |
JP2013130761A (en) | Imaging device, method for controlling the same, and program | |
JP6645711B2 (en) | Image processing apparatus, image processing method, and program | |
JP2013130762A (en) | Imaging device, method for controlling the same, and program | |
JP2016197150A (en) | Imaging device and control method of the same, program, and recording medium | |
US20200021745A1 (en) | Imaging apparatus | |
JP2014106324A (en) | Autofocus device and imaging device | |
JP5023750B2 (en) | Ranging device and imaging device | |
JP2016142924A (en) | Imaging apparatus, method of controlling the same, program, and storage medium | |
JP5832618B2 (en) | Imaging apparatus, control method thereof, and program | |
JP2013061665A (en) | Imaging apparatus and camera body | |
JP5420034B2 (en) | Imaging apparatus, control method therefor, program, and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP01 | Change in the name or title of a patent holder |
Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Patentee after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Patentee before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. |
|
CP01 | Change in the name or title of a patent holder | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20180904 |
|
CF01 | Termination of patent right due to non-payment of annual fee |