CN109862271A - Phase difference focusing method, electronic equipment and computer storage medium - Google Patents

Phase difference focusing method, electronic equipment and computer storage medium Download PDF

Info

Publication number
CN109862271A
CN109862271A CN201910146665.6A CN201910146665A CN109862271A CN 109862271 A CN109862271 A CN 109862271A CN 201910146665 A CN201910146665 A CN 201910146665A CN 109862271 A CN109862271 A CN 109862271A
Authority
CN
China
Prior art keywords
phase
camera
focus
photograph
image
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.)
Granted
Application number
CN201910146665.6A
Other languages
Chinese (zh)
Other versions
CN109862271B (en
Inventor
张耀芳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Chuanggong Telecom Technology Co Ltd
Original Assignee
Shanghai Chuanggong Telecom Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Chuanggong Telecom Technology Co Ltd filed Critical Shanghai Chuanggong Telecom Technology Co Ltd
Priority to CN201910146665.6A priority Critical patent/CN109862271B/en
Publication of CN109862271A publication Critical patent/CN109862271A/en
Application granted granted Critical
Publication of CN109862271B publication Critical patent/CN109862271B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Studio Devices (AREA)

Abstract

The present embodiments relate to image taking technology fields, disclose a kind of phase difference focusing method, include: the first phase for obtaining image to be taken the photograph using the first camera and second camera arranged along first level line, the second phase of image to be taken the photograph is obtained using the third camera and the first camera arranged along the first vertical line;Obtain the phase difference of first phase and second phase;Judge phase difference whether in preset field depth;If so, calculating focus phase according to first phase and the second phase;Focal position is moved to according to the first camera of focus phase controlling, second camera and third camera.A kind of electronic equipment i.e. computer storage medium is additionally provided in embodiment of the present invention.Phase difference focusing method, electronic equipment and computer storage medium provided by the invention make it possible to horizontal stripe scene of accurately focusing.

Description

Phase difference focusing method, electronic equipment and computer storage medium
Technical field
The present embodiments relate to image taking technology field, in particular to a kind of phase difference focusing method, electronic equipment And computer storage medium.
Background technique
Existing in image taking, commonly the mode of focusing is divided into: phase focusing and continuous focusing;Wherein, continuous focusing (CAF) the advantages of is that focus effects are preferable under each brightness, but disadvantage is that focusing speed is slow;The advantages of phase focusing (PDAF) It is fast for focusing speed, but disadvantage is the scene containing nicking that can only focus, and dark place focusing is bad.Therefore currently used to do Method is that continuous focusing and phase focusing combine, and is focused at brighter place using phase, utilizes continuous focusing compared with dark place, so both The focusing speed at bright place can be improved, and the focusing accuracy of dark place can be improved.
However, it is found by the inventors that at least there are the following problems in the prior art: current continuous focusing and phase focusing phase In conjunction with mode cannot achieve accurate focusing horizontal stripe scene.
Summary of the invention
Be designed to provide a kind of phase difference focusing method, electronic equipment and the computer storage of embodiment of the present invention are situated between Matter makes it possible to horizontal stripe scene of accurately focusing.
In order to solve the above technical problems, embodiments of the present invention provide a kind of phase difference focusing method, comprising: utilize The first camera and second camera along the arrangement of first level line obtain the first phase of image to be taken the photograph, using vertical along first The third camera and the first camera of line arrangement obtain the second phase of image to be taken the photograph;Obtain first phase and second phase Phase difference;Judge phase difference whether in preset field depth;If so, being calculated according to first phase and the second phase Focus phase;Focal position is moved to according to the first camera of focus phase controlling, second camera and third camera.
Embodiments of the present invention additionally provide a kind of electronic equipment, comprising: along the first camera shooting of first level line arrangement The third camera that head and second camera and the first camera are arranged along the first vertical line, electronic equipment realize such as above-mentioned reality Apply the phase difference focusing method of mode.
Embodiments of the present invention additionally provide a kind of a kind of electronic equipment, comprising: along the first of the arrangement of first level line Camera and second camera, the third camera arranged with the first camera along the first vertical line, with third camera along the The 4th camera and the 4th camera and second camera of two horizontal lines arrangement are arranged along the second vertical line, and electronic equipment is real Now such as the phase difference focusing method of above embodiment.
Embodiments of the present invention additionally provide a kind of computer readable storage medium, are stored with computer program, described The phase difference focusing method of above embodiment is realized when computer program is executed by processor.
Embodiment of the present invention in terms of existing technologies, provides a kind of phase difference focusing method, focal position by First phase and second phase determine that first phase utilizes the first camera arranged along first level line and the second camera shooting jointly Head obtains, and second phase obtained using the third camera and the first camera arranged along the first vertical line;Due to left and right The accurate focusing to horizontal stripe scene may be implemented in the camera of arrangement, and camera arranged up and down may be implemented to nicking field The accurate focusing of scape, therefore, according to the focus phase determined jointly by first phase and second phase, to control the first camera shooting Head, second camera and third camera are moved to focal position, realize under various complex scenes to horizontal stripe scene With the accurate focusing of nicking scene;And since the phase difference of first phase and second phase is in preset field depth, really Protect imaging clearly.
In addition, before obtaining the phase difference of first phase and second phase, further includes: arrange using along the second horizontal line Third camera and the 4th camera obtain the third phase of image to be taken the photograph, utilize the second camera shooting arranged along the second vertical line Head and the 4th camera obtain the 4th phase of image to be taken the photograph;Whether identical as third phase judge first phase, and judges Whether two phase is identical as the 4th phase, if it is all the same, then execute the step for obtaining the phase difference of first phase and second phase Suddenly;After calculating focus phase according to first phase and second phase, further includes: according to the 4th camera of focus phase controlling It is moved to focal position.Increase the 4th camera in the program, is imaged with the first camera, second camera and third Head group is in pairs up and down, double or so camera group, the focusing checking mechanism of horizontal stripe and nicking scene is realized, to realize at certain When one frame data exception, it still is able to normally complete focusing.
In addition, after judging whether first phase is identical as third phase, further includes: if first phase and third phase are not It is identical, then utilize the first phase that image to be taken the photograph is reacquired along the first camera and second camera of the arrangement of first level line Position and the third phase that image to be taken the photograph is reacquired using the third camera and the 4th camera arranged along the second horizontal line, Until first phase is identical as third phase.The first phase and third phase of image to be taken the photograph are obtained in the program by repetition, Guarantee that first phase is identical as third phase, to realize the unification of focal position under horizontal stripe scene.
In addition, after judging whether second phase is identical as the 4th phase, further includes: if second phase and the 4th phase are not It is identical, then utilize the second phase that image to be taken the photograph is reacquired along the third camera of the first vertical line arrangement and the first camera Position and the 4th phase that image to be taken the photograph is reacquired using the second camera and the 4th camera arranged along the second vertical line, Until second phase is identical as the 4th phase.The second phase and the 4th phase of image to be taken the photograph are obtained in the program by repetition, Guarantee that second phase is identical as the 4th phase, to realize the unification of focal position under nicking scene.
In addition, focus phase is calculated according to first phase and second phase, specifically: calculate first phase and second phase Average value, using average value as focus phase.
In addition, obtaining the first phase of image to be taken the photograph using the first camera and second camera arranged along first level line Position, specifically include: using along the first camera and second camera that first level line is arranged any one as main camera, Another is as secondary camera;It is treated with secondary camera and takes the photograph image and focus, and mobile main camera, make main camera Focus is identical as the secondary focus of camera, obtains first phase according to focus.The of left and right arrangement is shown in particular in the program How one camera and second camera specifically obtain first phase.
In addition, obtaining the second phase of image to be taken the photograph using the third camera and the first camera arranged along the first vertical line Position, specifically include: using along the third camera and the first camera that the first vertical line arrange any one camera as lead Camera, the secondary camera of another conduct;It is treated with secondary camera and takes the photograph image and focus, and mobile main camera, make to lead The focus of camera is identical as the secondary focus of camera, obtains second phase according to focus.It is shown in particular in the program up and down How the third camera and the first camera of arrangement specifically obtain second phase.
Detailed description of the invention
One or more embodiments are illustrated by the picture in corresponding attached drawing, these exemplary theorys The bright restriction not constituted to embodiment, the element in attached drawing with same reference numbers label are expressed as similar element, remove Non- to have special statement, composition does not limit the figure in attached drawing.
Fig. 1 is flow diagram in the phase difference focusing method of first embodiment according to the present invention;
Fig. 2 is flow diagram in the phase difference focusing method of second embodiment according to the present invention;
Fig. 3 is the schematic diagram of the electronic equipment of third embodiment according to the present invention;
Fig. 4 is the schematic diagram of the electronic equipment of the 4th embodiment according to the present invention.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with attached drawing to the present invention Each embodiment be explained in detail.However, it will be understood by those skilled in the art that in each embodiment party of the present invention In formula, in order to make the reader understand this application better, many technical details are proposed.But even if without these technical details And various changes and modifications based on the following respective embodiments, the application technical solution claimed also may be implemented.
The first embodiment of the present invention is related to a kind of phase difference focusing methods, and the core of present embodiment is, provide A kind of phase difference focusing method, using the first camera and second camera arranged along first level line obtains image to be taken the photograph First phase, the second phase of image to be taken the photograph is obtained using the third camera and the first camera arranged along the first vertical line Position;Whether the phase difference for obtaining first phase and second phase, judge phase difference in preset field depth;If so, root Focus phase is calculated according to first phase and the second phase;According to the first camera of focus phase controlling, second camera with And third camera is moved to focal position.Focal position is determined that first phase is utilized by first phase and second phase jointly The first camera and second camera along the arrangement of first level line obtain, and second phase, which is utilized, arranges along the first vertical line Third camera and the first camera obtain;Since the camera of left and right arrangement may be implemented to the accurate right of horizontal stripe scene The accurate focusing to nicking scene may be implemented in coke, camera arranged up and down, therefore, according to by first phase and the second phase The focus phase that position determines jointly, is moved to focal position to control the first camera, second camera and third camera, Realize the accurate focusing under various complex scenes to horizontal stripe scene and nicking scene;And due to first phase and second The phase difference of phase is in preset field depth, it is ensured that imaging clearly.
The realization details of the phase difference focusing method of present embodiment is specifically described below, the following contents is only The realization details for understanding and providing is provided, the necessary of this programme is not implemented.
The flow diagram of phase difference focusing method in present embodiment is as shown in Figure 1:
Step 101: obtaining the of image to be taken the photograph using the first camera and second camera arranged along first level line One phase obtains the second phase of image to be taken the photograph using the third camera and the first camera arranged along the first vertical line.
Specifically, the first of image to be taken the photograph is obtained using the first camera and second camera arranged along first level line Phase specifically includes: using along the first camera and second camera that first level line is arranged any one as main camera shooting Head, the secondary camera of another conduct;It is treated with secondary camera and takes the photograph image and focus, and mobile main camera, make main camera shooting The focus of head is identical as the secondary focus of camera, obtains first phase according to focus.
Using any one in the first camera and second camera as main camera, another work in present embodiment For secondary camera, due to mainly using secondary camera focusing after, directly by the focal adjustments of main camera and secondary camera Focus is identical, it is thereby achieved that the rapid focus of the first camera and second camera, so as to quickly obtain the first camera shooting The first phase of focal position when head and second camera focusing.And since the first camera and second camera are along first level Line arrangement, therefore can realize quick, the accurate focusing of horizontal stripe scene.
Specifically, the second of image to be taken the photograph is obtained using the third camera and the first camera arranged along the first vertical line Phase specifically includes: using along the third camera and the first camera that the first vertical line is arranged any one camera as Main camera, the secondary camera of another conduct;It is treated with secondary camera and takes the photograph image and focus, and mobile main camera, made The focus of main camera is identical as the secondary focus of camera, obtains second phase according to focus.
Using any one in the first camera and third camera as main camera, another work in present embodiment For secondary camera, due to mainly using secondary camera focusing after, directly by the focal adjustments of main camera and secondary camera Focus is identical, it is thereby achieved that the rapid focus of the first camera and third camera, so as to quickly obtain the first camera shooting The second phase of focal position when head and third camera focusing.And since the first camera and third camera are vertical along first Line arrangement, therefore can realize quick, the accurate focusing of nicking scene.
First is shared when from the above, it is seen that horizontal stripe scene and nicking scene being focused in present embodiment to take the photograph As head, while realizing the focusing of horizontal, vertical striped scene, additionally it is possible to simplify the structure of equipment.
Step 102: obtaining the phase difference of first phase and second phase.
Specifically, as secondary camera might not first take the photograph when due to horizontal stripe scene and nicking scene As head, therefore, focal position when horizontal stripe scene and nicking scene are focused is likely to not identical, i.e. first phase and the Two phase is simultaneously unequal.
Step 103: phase difference is judged whether in preset field depth, if so, entering step 104;If it is not, then should Process terminates.
Specifically, the so-called depth of field ((Depth of Field) refer to after the completion of focusing, before and after focus in the range of institute The clear image of presentation, this distance range one in front and one in back is the depth of field.Therefore, to realize blur-free imaging, then horizontal stripe field The difference of the distance between focus when the focus and nicking scene that scape focusing is are focused cannot be beyond preset field depth, i.e., The difference of first phase and second phase need in preset field depth, such as: preset field depth is ± 50, then the The difference of one phase and second phase need to be within ± 50.For preset field depth and without limit in present embodiment It is fixed, it can be according to actual photographed situation self-setting.
If it is determined that the difference of first phase and second phase then executes step in preset field depth in present embodiment Rapid 104 calculate focus phase according to first phase and second phase;If process terminates not in preset field depth, this Directly terminate process in embodiment for simplified flowchart, but in actual photographed, if the difference of first phase and second phase In no longer preset field depth, step 101 execution is often returned to.
Step 104: focus phase is calculated according to first phase and second phase.
Specifically, the average value for calculating first phase and second phase, using average value as focus phase.Due to the first phase Position with the phase difference of second phase in preset field depth, therefore using the average value of first phase and second phase as conjunction When burnt phase, photo is shot necessarily clearly with the focus phase.The calculation of certain focus phase is not limited to this This in embodiment is a kind of, can also calculate focus phase by distributing different weighted values for first phase and second phase Position.Such as: assuming that first phase is 100, second phase 140, preset field depth is ± 50, then first phase and the The phase difference of two phase is in preset field depth.If at this time using average value as focus phase, then focus phase is 120;If being calculated according to first phase weight 0.2, second phase weight 0.8, then focus phase is 132.It either " will The average value of first phase and second phase is as focus phase " still " different power is distributed for first phase and second phase Weight values calculate focus phase " within the protection scope of present embodiment.Wherein, how weighted value specifically distributes by user Self-setting.
Step 105: focus is moved to according to the first camera of focus phase controlling, second camera and third camera Position.
Specifically, after having determined focus phase, the first camera of motor control, second camera and third camera It is moved to focal position, then completes the focusing of three cameras.
Compared with prior art, embodiment of the present invention provides a kind of phase difference focusing method, and focal position is by first Phase and second phase determine jointly, first phase using the first camera and second camera arranged along first level line come It obtains, second phase is obtained using the third camera and the first camera arranged along the first vertical line;Since left and right is arranged Camera the accurate focusing to horizontal stripe scene may be implemented, camera arranged up and down may be implemented to nicking scene Accurate focusing, therefore, according to the focus phase determined jointly by first phase and second phase, to control the first camera, the Two cameras and third camera are moved to focal position, realize under various complex scenes to horizontal stripe scene and vertical bar The accurate focusing of line scene;And since the phase difference of first phase and second phase is in preset field depth, it is ensured that imaging Clearly.
Second embodiment of the present invention is related to a kind of phase difference focusing method.Second embodiment is to the first embodiment party The improvement of formula, mainly thes improvement is that, increases the 4th camera, with the first camera, second camera and third Camera group is in pairs up and down, double or so camera group, realizes the focusing checking mechanism of horizontal stripe and nicking scene, so that it is guaranteed that When wherein abnormal (such as: data frame is lost extremely etc.) occurs in a certain phase when focusing under cross/nicking scene, it still is able to just Often complete the focusing of horizontal stripe scene.
The flow diagram of phase difference focusing method in present embodiment is as shown in Fig. 2, specifically include:
Step 201: obtaining the of image to be taken the photograph using the first camera and second camera arranged along first level line One phase obtains the second phase of image to be taken the photograph using the third camera and the first camera arranged along the first vertical line.
Above-mentioned steps 201 are roughly the same with the step 101 in first embodiment, and details are not described herein.
Step 202: obtaining the of image to be taken the photograph using the third camera arranged along the second horizontal line and the 4th camera Three phases obtain the 4th phase of image to be taken the photograph using the second camera and the 4th camera arranged along the second vertical line.
Specifically, along the second horizontal line arrangement third camera and the 4th camera obtain third phase mode with The mode for obtaining first phase along the first camera and second camera of the arrangement of first level line is roughly the same;It is vertical along first The mode that the third camera and the first camera of line arrangement obtain second phase is imaged with along the second of the arrangement of the second vertical line Head and the 4th camera acquisition the mode of the 4th phase it is roughly the same, in present embodiment for specific acquisition process without It is described in detail.
Step 203: judging whether first phase is identical as third phase.If so, entering step 204;If it is not, then entering Step 209.
Specifically, first phase and third phase are carried out to horizontal stripe scene to defocused obtained phase value.When obtaining When taking that wherein abnormal (such as: data frame is lost extremely etc.) occurs in a certain phase, there are also the values of another phase to keep normal, thus When ensuring that abnormal (such as: data frame is lost extremely etc.) occurs in wherein a certain phase when focusing under horizontal stripe scene, still can Enough normally complete the focusing of horizontal stripe scene.Therefore, before calculating phase difference, it is ensured that first phase is identical as third phase, Realize the unification of focal position under horizontal stripe scene.
If it is determined that first phase is identical as third phase in present embodiment, thens follow the steps 204 and continue to judge the second phase Whether position is identical as the 4th phase;If it is determined that first phase is not identical as third phase, 209 reacquisitions first are thened follow the steps Phase and second phase are until first phase is identical as third phase.
Step 204: judging whether second phase is identical as the 4th phase.If so, entering step 205;If it is not, then entering Step 210.
Specifically, second phase and the 4th phase are carried out to vertical bar scene to defocused obtained phase value.When obtaining When taking that wherein abnormal (such as: data frame is lost extremely etc.) occurs in a certain phase, there are also the values of another phase to keep normal, thus When ensuring that abnormal (such as: data frame is lost extremely etc.) occurs in wherein a certain phase when focusing under nicking scene, still can Enough normally complete the focusing of nicking scene.Therefore, before calculating phase difference, it is ensured that second phase is identical as the 4th phase, Realize the unification of focal position under nicking scene.
If it is determined that second phase is identical as the 4th phase in present embodiment, then follow the steps 205 acquisition first phase with The phase difference of second phase;If it is determined that second phase and the 4th phase be not identical, 210 reacquisition second phase are thened follow the steps With the 4th phase until second phase is identical as the 4th phase.
Step 205: obtaining the phase difference of first phase and second phase.
Step 206: judging phase difference whether in preset field depth.If so, entering step 207;If it is not, then should Process terminates.
Step 207: focus phase is calculated according to first phase and second phase.
Step 208: focus is moved to according to the first camera of focus phase controlling, second camera and third camera Position.
Above-mentioned steps 205 are roughly the same to step 105 with the step 102 in first embodiment to step 208, herein not It repeats again.
Step 209: focal position is moved to according to the 4th camera of focus phase controlling.
Specifically, drive the 4th camera of motor control to be moved to focal position after obtaining focus phase, complete to the The focusing of four cameras.It is worth noting that being only to write to facilitate that step 209 is placed in after step 208 in present embodiment It executes, but actually step 208 and step 209 have no specific sequencing relationship, step 209 can be held before step 208 Row, can also be performed simultaneously with step 208.
Step 210: reacquiring first phase and second phase until first phase is identical as third phase.
Specifically, utilizing the first camera shooting along the arrangement of first level line if first phase is not identical as third phase Head and second camera reacquire the first phase of image to be taken the photograph and using the third camera arranged along the second horizontal line and 4th camera reacquires the third phase of image to be taken the photograph, until first phase is identical as third phase.Pass through in the program Repetition obtains the first phase and third phase of image to be taken the photograph, and guarantees that first phase is identical as third phase, to realize horizontal stripe The unification of focal position under line scene.After step 210 is finished, return step 204 is continued to execute.
Step 211: reacquiring second phase and the 4th phase until second phase is identical as the 4th phase.
Specifically, utilizing the third camera shooting along the arrangement of the first vertical line if second phase and the 4th phase be not identical Head and the first camera reacquire the second phase of image to be taken the photograph and using the second camera arranged along the second vertical line and 4th camera reacquires the 4th phase of image to be taken the photograph, until second phase is identical as the 4th phase.Pass through in the program Repetition obtains the second phase and the 4th phase of image to be taken the photograph, and guarantees that second phase is identical as the 4th phase, to realize vertical bar The unification of focal position under line scene.After step 211 is finished, return step 205 is continued to execute.
It is executed it should be noted that only being write in present embodiment and facilitating for step 202 to be placed in after step 201, but Actually step 201 and step 202 have no specific sequencing relationship, and step 202 also executes before step 201.Equally , step 203 and step 204 be also to write to facilitate for step 204 to be placed in after step 203 and execute, actually step 203 and Step 204 has no specific sequencing relationship, and step 204 can be executed before step 203 or is performed simultaneously with step 203.
Compared with prior art, a kind of phase difference focusing method is provided in embodiment of the present invention, is obtaining the first phase Position with before the phase difference of second phase, further includes: utilization the third camera and the 4th camera arranged along the second horizontal line The third phase for obtaining image to be taken the photograph obtains figure to be taken the photograph using the second camera and the 4th camera arranged along the second vertical line 4th phase of picture;Whether identical as third phase judge first phase, and judge whether second phase is identical as the 4th phase, If it is all the same, then the step of executing the phase difference for obtaining first phase and second phase;According to first phase and the second phase Position calculates after focus phase, further includes: is moved to focal position according to the 4th camera of focus phase controlling.Increase in the program Add the 4th camera, and the first camera, second camera and third camera group be in pairs up and down, double or so camera Group realizes the focusing checking mechanism of horizontal stripe and nicking scene, so that it is guaranteed that wherein a certain when focusing under cross/nicking scene Phase appearance exception (such as: data frame is lost extremely etc.) when, it still is able to normally complete the focusing of horizontal stripe scene.
The step of various methods divide above, be intended merely to describe it is clear, when realization can be merged into a step or Certain steps are split, multiple steps are decomposed into, as long as including identical logical relation, all in the protection scope of this patent It is interior;To adding inessential modification in algorithm or in process or introducing inessential design, but its algorithm is not changed Core design with process is all in the protection scope of the patent.
Third embodiment of the invention is related to a kind of electronic equipment, as shown in Figure 3, comprising: along the arrangement of first level line The third camera 33 that first camera 31 and second camera 32 and the first camera 31 are arranged along the first vertical line, electronics Equipment realizes the phase difference focusing method in first embodiment.
Four embodiment of the invention is related to a kind of electronic equipment, as shown in Figure 4, comprising: along the arrangement of first level line First camera 31 and second camera 32, the third camera 33 arranged with the first camera 31 along the first vertical line, with the The 4th camera 34 and the 4th camera 34 and second camera 32 that three cameras 33 are arranged along the second horizontal line are perpendicular along second Straight line arrangement, electronic equipment realize the phase difference focusing method of above-mentioned first and/or second embodiment.
Embodiment further provides a kind of computer readable storage mediums by of the invention the 5th, are stored with computer program, When the computer program is executed by processor in fact above-mentioned first and/or second embodiment phase difference focusing method.
That is, it will be understood by those skilled in the art that implement the method for the above embodiments be can be with Relevant hardware is instructed to complete by program, which is stored in a storage medium, including some instructions are to make It obtains an equipment (can be single-chip microcontroller, chip etc.) or processor (processor) executes side described in each embodiment of the application The all or part of the steps of method.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic or disk etc. are various can store journey The medium of sequence code.
It will be understood by those skilled in the art that the respective embodiments described above are to realize specific embodiments of the present invention, And in practical applications, can to it, various changes can be made in the form and details, without departing from the spirit and scope of the present invention.

Claims (10)

1. a kind of phase difference focusing method characterized by comprising
The first phase that image to be taken the photograph is obtained using the first camera and second camera arranged along first level line, utilizes edge The third camera and first camera of the arrangement of first vertical line obtain the second phase of image to be taken the photograph;
Obtain the phase difference of the first phase Yu the second phase;
Judge the phase difference whether in preset field depth;
If so, calculating focus phase according to the first phase and the second phase;
It is moved to according to the first camera described in the focus phase controlling, the second camera and the third camera Focal position.
2. phase difference focusing method according to claim 1, which is characterized in that obtain the first phase and institute described Before the phase difference for stating second phase, further includes:
The third phase of the image to be taken the photograph is obtained using the third camera arranged along the second horizontal line and the 4th camera Position obtains the 4th of the image to be taken the photograph the using the second camera arranged along the second vertical line and the 4th camera Phase;
Whether identical as the third phase judge the first phase, and judge the second phase whether with the 4th phase Position is identical, if it is all the same, then the step of executing the phase difference for obtaining the first phase and the second phase;
It is described calculate according to the first phase and the second phase focus phase after, further includes:
The focal position is moved to according to the 4th camera described in the focus phase controlling.
3. phase difference focusing method according to claim 2, which is characterized in that it is described judge the first phase whether with After the third phase is identical, further includes:
If the first phase and the third phase be not identical, the first camera and the along the arrangement of first level line is utilized Two cameras reacquire the first phase of the image to be taken the photograph and utilize the third camera arranged along the second horizontal line The third phase that the image to be taken the photograph is reacquired with the 4th camera, until the first phase and the third phase phase Together.
4. phase difference focusing method according to claim 2, which is characterized in that it is described judge the second phase whether with After 4th phase is identical, further includes:
If the second phase and the 4th phase be not identical, the third camera along the arrangement of the first vertical line and institute are utilized The first camera is stated to reacquire the second phase of the image to be taken the photograph and take the photograph using arrange along the second vertical line described second As head and the 4th camera reacquire the 4th phase of the image to be taken the photograph, up to the second phase and the described 4th Phase is identical.
5. phase difference focusing method according to claim 1, which is characterized in that described according to the first phase and described Second phase calculates focus phase, specifically:
The average value for calculating the first phase and the second phase, using the average value as the focus phase.
6. phase difference focusing method according to claim 1, which is characterized in that the utilization was arranged along first level line First camera and second camera obtain the first phase of image to be taken the photograph, and specifically include:
Using it is described along first level line arrangement the first camera and second camera along any one as main camera, in addition One as secondary camera;
It is focused with the secondary camera to the image to be taken the photograph, and the mobile main camera, makes the main camera Focus is identical as the secondary focus of camera, obtains the first phase according to the focus.
7. phase difference focusing method according to claim 1, which is characterized in that utilize the third arranged along the first vertical line Camera and first camera obtain the second phase of image to be taken the photograph, and specifically include:
Using along the third camera and first camera that the first vertical line is arranged any one camera as main camera shooting Head, the secondary camera of another conduct;
It is focused with the secondary camera to the image to be taken the photograph, and the mobile main camera, makes the main camera Focus is identical as the secondary focus of camera, obtains the second phase according to the focus.
8. a kind of electronic equipment characterized by comprising along first level line arrangement the first camera and second camera, The third camera arranged with first camera along the first vertical line, the electronic equipment realize such as claim 1 and Phase difference focusing method described in any one of 5 to 7.
9. a kind of electronic equipment characterized by comprising along first level line arrangement the first camera and second camera, The third camera arranged with first camera along the first vertical line is arranged with the third camera along the second horizontal line The 4th camera and the 4th camera and the second camera arrange along the second vertical line, the electronic equipment reality The now phase difference focusing method as described in any one of claims 1 to 7.
10. a kind of computer storage medium, is stored with computer program, which is characterized in that the computer program is by processor The phase difference focusing method as described in any one of claims 1 to 7 is realized when execution.
CN201910146665.6A 2019-02-27 2019-02-27 Phase difference focusing method, electronic device and computer storage medium Active CN109862271B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910146665.6A CN109862271B (en) 2019-02-27 2019-02-27 Phase difference focusing method, electronic device and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910146665.6A CN109862271B (en) 2019-02-27 2019-02-27 Phase difference focusing method, electronic device and computer storage medium

Publications (2)

Publication Number Publication Date
CN109862271A true CN109862271A (en) 2019-06-07
CN109862271B CN109862271B (en) 2021-03-16

Family

ID=66899162

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910146665.6A Active CN109862271B (en) 2019-02-27 2019-02-27 Phase difference focusing method, electronic device and computer storage medium

Country Status (1)

Country Link
CN (1) CN109862271B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110769162A (en) * 2019-11-28 2020-02-07 维沃移动通信有限公司 Electronic equipment and focusing method
CN112866548A (en) * 2019-11-12 2021-05-28 Oppo广东移动通信有限公司 Phase difference acquisition method and device and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5892578A (en) * 1997-05-12 1999-04-06 Canon Kabushiki Kaisha Focus detection device
CN106254682A (en) * 2016-09-22 2016-12-21 维沃移动通信有限公司 A kind of photographic method and mobile terminal
CN106488137A (en) * 2016-11-29 2017-03-08 广东欧珀移动通信有限公司 Dual camera focusing method, device and terminal unit
CN106791373A (en) * 2016-11-29 2017-05-31 广东欧珀移动通信有限公司 Focusing process method, device and terminal device
CN107395990A (en) * 2017-08-31 2017-11-24 珠海市魅族科技有限公司 Phase focusing method and device, terminal, computer installation and readable storage medium storing program for executing
US20170359536A1 (en) * 2016-06-09 2017-12-14 Lg Electronics Inc. Moving picture photographing apparatus having dual camera

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5892578A (en) * 1997-05-12 1999-04-06 Canon Kabushiki Kaisha Focus detection device
US20170359536A1 (en) * 2016-06-09 2017-12-14 Lg Electronics Inc. Moving picture photographing apparatus having dual camera
CN106254682A (en) * 2016-09-22 2016-12-21 维沃移动通信有限公司 A kind of photographic method and mobile terminal
CN106488137A (en) * 2016-11-29 2017-03-08 广东欧珀移动通信有限公司 Dual camera focusing method, device and terminal unit
CN106791373A (en) * 2016-11-29 2017-05-31 广东欧珀移动通信有限公司 Focusing process method, device and terminal device
CN107395990A (en) * 2017-08-31 2017-11-24 珠海市魅族科技有限公司 Phase focusing method and device, terminal, computer installation and readable storage medium storing program for executing

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112866548A (en) * 2019-11-12 2021-05-28 Oppo广东移动通信有限公司 Phase difference acquisition method and device and electronic equipment
CN112866548B (en) * 2019-11-12 2022-06-14 Oppo广东移动通信有限公司 Phase difference acquisition method and device and electronic equipment
CN110769162A (en) * 2019-11-28 2020-02-07 维沃移动通信有限公司 Electronic equipment and focusing method
CN110769162B (en) * 2019-11-28 2021-07-13 维沃移动通信有限公司 Electronic equipment and focusing method
US11856294B2 (en) 2019-11-28 2023-12-26 Vivo Mobile Communication Co., Ltd. Electronic device and focusing method for electronic device

Also Published As

Publication number Publication date
CN109862271B (en) 2021-03-16

Similar Documents

Publication Publication Date Title
US10997696B2 (en) Image processing method, apparatus and device
US9501834B2 (en) Image capture for later refocusing or focus-manipulation
US9569854B2 (en) Image processing method and apparatus
KR101643607B1 (en) Method and apparatus for generating of image data
JP5988119B2 (en) Backlight detection method and device
US20170324950A1 (en) Methods and apparatus for controlling light field capture
US20130063571A1 (en) Image processing apparatus and image processing method
CN109905600A (en) Imaging method, imaging device and computer readable storage medium
CN110533694B (en) Image processing method, device, terminal and storage medium
US9706104B2 (en) Image auto-focusing method and camera using same
KR20150142038A (en) Reference image selection for motion ghost filtering
CN112200035B (en) Image acquisition method, device and vision processing method for simulating crowded scene
US20210350559A1 (en) Image depth estimation method and apparatus, electronic device, and storage medium
Peng et al. Bokehme: When neural rendering meets classical rendering
CN109862271A (en) Phase difference focusing method, electronic equipment and computer storage medium
KR101025405B1 (en) Focus controling image generation system and method thereof and image generation apparatus employing the same
CN106651797A (en) Determination method and apparatus for effective region of signal lamp
CN104331890B (en) A kind of global disparity method of estimation and system
Miangoleh et al. Realistic saliency guided image enhancement
CN105657262B (en) A kind of image processing method and device
CN104601873B (en) focusing method
CN102708559B (en) Blur difference estimation using multi-kernel convolution
CN104408710B (en) Global parallax estimation method and system
CN106506971A (en) A kind of focusing method and mobile terminal
CN111080546A (en) Picture processing method and device

Legal Events

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