CN107172410A - Dual camera focusing method and device - Google Patents
Dual camera focusing method and device Download PDFInfo
- Publication number
- CN107172410A CN107172410A CN201710575465.3A CN201710575465A CN107172410A CN 107172410 A CN107172410 A CN 107172410A CN 201710575465 A CN201710575465 A CN 201710575465A CN 107172410 A CN107172410 A CN 107172410A
- Authority
- CN
- China
- Prior art keywords
- camera
- dac value
- parallax
- image
- distance
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/67—Focus control based on electronic image sensor signals
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Studio Devices (AREA)
Abstract
The present invention provides a kind of dual camera focusing method and device, applied to electronic equipment.Electronic equipment includes the first camera and second camera, and electronic equipment also includes a database, and database includes parallax and the corresponding DAC value of parallax.Methods described includes:The time difference between the multiple image gathered through the first camera and the multiple image gathered through second camera is calculated, the time difference corresponding two field pictures for meeting preparatory condition are found;Target parallax is obtained according to two field pictures;The DAC value of the first camera corresponding with target parallax is searched, and motor is adjusted according to target DAC value corresponding with target parallax, current DAC value, to complete focusing.Thus, focusing is rapidly completed, still can be focused under dim light, while cost can also be reduced.
Description
Technical field
The present invention relates to communication technical field, in particular to a kind of dual camera focusing method and device.
Background technology
On existing smart mobile phone, most of focusing modes are all based on Contrast Detection method and phase-detection method, and this two
The mode of kind all has weak point.Focusing mode based on Contrast Detection method, focusing speed is slow, obscures before this, Ran Houqing
Chu, then obscure, original clear position is eventually passed back to, Consumer's Experience effect is poor.Although having been lifted in phase-detection method speed,
But since it is desired that in the photosensitive pixel of sensor, the phase difference that a part is used for doing detection incident ray is individually taken out, to count
The position of focusing is calculated, can so be had the disadvantage that:Add hardware cost and the overall image quality of influence, and phase-detection method
Dependence to light is stronger, thus can focus and fail under dim light.
The content of the invention
In order to overcome above-mentioned deficiency of the prior art, the technical problems to be solved by the invention are to provide a kind of double shootings
Head focusing method and device, it can be rapidly completed focusing, still can be focused under dim light, while can also reduce into
This.
Present pre-ferred embodiments provide a kind of dual camera focusing method, applied to electronic equipment, the electronic equipment
Including the first camera and second camera, the electronic equipment also includes a database, and the database includes parallax and regarded
The corresponding DAC value of difference, methods described includes:
Calculate through first camera gather multiple image with through the second camera gather multiple image it
Between time difference, find the time difference corresponding two field pictures for meeting preparatory condition;
Target parallax is obtained according to the two field pictures;
Search the DAC value of corresponding with the target parallax first camera, and according to the target parallax pair
Target DAC value, the current DAC value answered are adjusted to motor, to complete focusing.
Present pre-ferred embodiments also provide a kind of dual camera focusing mechanism, applied to electronic equipment, and the electronics is set
Standby to include the first camera and second camera, the electronic equipment also includes a database, the database include parallax and
The corresponding DAC value of parallax, described device includes:
Image collection module, for calculate through first camera gather multiple image with through the second camera
Time difference between the multiple image of collection, find the time difference corresponding two field pictures for meeting preparatory condition;
Disparity computation module, for obtaining target parallax according to the two field pictures;
Focusing module, the DAC value for searching corresponding with the target parallax first camera, and according to institute
State the corresponding target DAC value of target parallax, current DAC value to be adjusted motor, to complete focusing.
In terms of existing technologies, the invention has the advantages that:
Present pre-ferred embodiments provide a kind of dual camera focusing method and device, applied to electronic equipment.Wherein, institute
Stating electronic equipment includes the first camera and second camera, and the electronic equipment also includes a database, the database bag
Include parallax and the corresponding DAC value of parallax.The electronic equipment gathers multiple image through first camera, is taken the photograph through described second
As head collection multiple image, and then the multiple image gathered through first camera is calculated with being gathered through the second camera
Multiple image between time difference.The time difference obtained according to calculating finds time difference corresponding two frame for meeting preparatory condition
Image.Two field pictures progress is handled and obtains target parallax.Electronic equipment is looked into according to the target parallax in database
Look for, obtain the DAC value of first camera corresponding with the target parallax, and according to mesh corresponding with the target parallax
Mark DAC value, current DAC value are adjusted to motor, to complete focusing.Thus, focusing is rapidly completed, under dim light still
It can focus, while cost can also be reduced.
To enable the above-mentioned purpose of invention, feature and advantage to become apparent, present pre-ferred embodiments cited below particularly, and
Coordinate appended accompanying drawing, be described in detail below.
Brief description of the drawings
In order to illustrate the technical solution of the embodiments of the present invention more clearly, below will be attached to what is used required in embodiment
Figure is briefly described, it will be appreciated that the following drawings illustrate only certain embodiments of the present invention, therefore is not construed as pair
The restriction of scope, for those of ordinary skill in the art, on the premise of not paying creative work, can also be according to this
A little accompanying drawings obtain other related accompanying drawings.
Fig. 1 is the block diagram for the electronic equipment that present pre-ferred embodiments are provided.
Fig. 2 is one of schematic flow sheet of dual camera focusing method that present pre-ferred embodiments are provided.
Fig. 3 is the schematic flow sheet of the sub-step that step S120 includes in Fig. 2.
Fig. 4 is the schematic flow sheet of the sub-step that step S140 includes in Fig. 2.
Fig. 5 is the two of the schematic flow sheet for the dual camera focusing method that present pre-ferred embodiments are provided.
Fig. 6 is the schematic flow sheet of the part sub-step that step S110 includes in Fig. 5.
Fig. 7 is the schematic flow sheet of another part sub-step that step S110 includes in Fig. 5.
Fig. 8 is the similar triangles positioning schematic that present pre-ferred embodiments are provided.
Fig. 9 is one of block diagram of dual camera focusing mechanism that present pre-ferred embodiments are provided.
Figure 10 is the two of the block diagram for the dual camera focusing mechanism that present pre-ferred embodiments are provided.
Figure 11 is the block diagram of creation module in Figure 10.
Icon:100- electronic equipments;The cameras of 101- first;102- second cameras;110- memories;120- storage controls
Device processed;130- processors;200- dual camera focusing mechanisms;210- creation modules;211- measures submodule;212- detects submodule
Block;213- setting up submodule;214- position acquisition submodules;215- parallax acquisition submodules;216- preserves submodule;220- schemes
As acquisition module;230- disparity computation modules;240- Focusing modules.
Embodiment
Below in conjunction with accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Ground is described, it is clear that described embodiment is only a part of embodiment of the invention, rather than whole embodiments.Generally exist
The component of the embodiment of the present invention described and illustrated in accompanying drawing can be arranged and designed with a variety of configurations herein.Cause
This, the detailed description of the embodiments of the invention to providing in the accompanying drawings is not intended to limit claimed invention below
Scope, but it is merely representative of the selected embodiment of the present invention.Based on embodiments of the invention, those skilled in the art are not doing
The every other embodiment obtained on the premise of going out creative work, belongs to the scope of protection of the invention.
It should be noted that:Similar label and letter represents similar terms in following accompanying drawing, therefore, once a certain Xiang Yi
It is defined in individual accompanying drawing, then it further need not be defined and explained in subsequent accompanying drawing.Meanwhile, the present invention's
In description, term " first ", " second " etc. are only used for distinguishing description, and it is not intended that indicating or implying relative importance.
Below in conjunction with the accompanying drawings, some embodiments of the present invention are elaborated.It is following in the case where not conflicting
Feature in embodiment and embodiment can be mutually combined.
Fig. 1 is refer to, Fig. 1 is the block diagram for the electronic equipment 100 that present pre-ferred embodiments are provided.It is of the invention real
Apply electronic equipment 100 described in example may be, but not limited to, smart mobile phone, tablet personal computer etc..The electronic equipment 100 includes:
First camera 101, second camera 102, memory 110, storage control 120, processor 130 and dual camera focusing
Device 200.
First camera 101, second camera 102, memory 110, storage control 120 and processor 130 are each
Directly or indirectly it is electrically connected between element, to realize the transmission or interaction of data.For example, these elements can lead to each other
Cross one or more communication bus or signal wire is realized and is electrically connected with.Be stored with dual camera focusing mechanism in memory 110
200, the dual camera focusing mechanism 200, which includes at least one, to be stored in institute in the form of software or firmware (firmware)
State the software function module in memory 110.The processor 130 is stored in the software program in memory 110 by operation
And module, the dual camera focusing mechanism 200 in such as embodiment of the present invention, so as to perform at various function application and data
Reason, that is, realize the dual camera focusing method in the embodiment of the present invention.
Wherein, the memory 110 may be, but not limited to, random access memory (Random Access
Memory, RAM), read-only storage (Read Only Memory, ROM), programmable read only memory (Programmable
Read-Only Memory, PROM), erasable read-only memory (Erasable Programmable Read-Only
Memory, EPROM), electricallyerasable ROM (EEROM) (Electric Erasable Programmable Read-Only
Memory, EEPROM) etc..Wherein, memory 110 be used for storage program, the processor 130 after execute instruction is received,
Perform described program.The processor 130 and other access of possible component to memory 110 can be in the storage controls
Carried out under the control of device 120.
The processor 130 is probably a kind of IC chip, the disposal ability with signal.Above-mentioned processor
130 can be general processor, including central processing unit (Central Processing Unit, CPU), network processing unit
(Network Processor, NP) etc..It can also be digital signal processor (DSP), application specific integrated circuit (ASIC), scene
Programmable gate array (FPGA) or other PLDs, discrete gate or transistor logic, discrete hardware group
Part.It can realize or perform disclosed each method, step and the logic diagram in the embodiment of the present invention.General processor can be with
It is microprocessor or the processor can also be any conventional processor etc..
Wherein, first camera 101 and second camera 102 are used for the image for gathering made thing body, so as to complete
Focusing.In the present embodiment, first camera 101 is main camera, and the second camera 102 is secondary camera, is led to
Cross the database that stores in the image and the electronic equipment 100 of collection and send control instruction to motor, so that described the
One camera 101 completes focusing.
In the embodiment of the present embodiment, first camera 101 is identical with the focal length of second camera 102.
It is appreciated that the structure shown in Fig. 1 be only signal, electronic equipment 100 may also include it is more more than shown in Fig. 1 or
Less component, or with the configuration different from shown in Fig. 1.Each component shown in Fig. 1 can using hardware, software or its
Combination is realized.
Refer to Fig. 2, Fig. 2 be the dual camera focusing method that present pre-ferred embodiments are provided schematic flow sheet it
One.Methods described is applied to electronic equipment 100.The electronic equipment 100 includes the first camera 101 and second camera 102.
The electronic equipment 100 also includes a database, and the database includes parallax and the corresponding DAC value of parallax.Taken the photograph below to double
As the idiographic flow of head focusing method is described in detail.
Step S120, calculates the multiple image gathered through first camera 101 with being adopted through the second camera 102
Time difference between the multiple image of collection, find the time difference corresponding two field pictures for meeting preparatory condition.
In the present embodiment, first camera 101 and second camera 102 receive the operation of input, are turned off the light in sudden strain of a muscle
An at least two field picture is gathered in the case of synchronization respectively.After image is obtained, first camera 101 passes through an interface (ratio
Such as, Iface) image of collection is sent to the first video front to be handled.Similarly, the second camera 102 passes through
The image of collection is sent to the second video front to be handled by one interface (such as, Iface).Wherein, first video
Can also exist between front end and second video front automatic exposure (Automatic Exposure Control, automatically
Spectrum assignment) synchronizing signal.
In the embodiment of the present embodiment, first video front can also be by first camera of reception
101 images obtained are sent to a display unit, with the current shooting image of preview.
The image procossing that first video front sends first camera 101 is yuv data, and extracts described
Y data in yuv data.Similarly, the image procossing that second video front sends the second camera 102 is YUV
Data, and extract the Y data in the yuv data.
Wherein, YUV is a kind of colour coding method.In present vitascan, three pipe colour phhotograpies are generally used
Machine or colored CCD (Charge-coupledDevice, charge coupled cell) video camera carry out capture, then obtained colour
Picture signal obtains RGB after amplification correction through color separation, respectively, then obtains luminance signal Y and two aberration letters by matrixing
Number R-Y (i.e. U), B-Y (i.e. V), last transmitting terminal are encoded three signals of brightness and aberration respectively, are sent with same channel
Go out.Y data namely refers to brightness.
It refer to Fig. 3, Fig. 3 is the schematic flow sheet of the sub-step that step S120 includes in Fig. 2.The step S120 can be with
Including sub-step S121 and sub-step S122.
Sub-step S121, the time point of the every two field picture obtained according to first camera 101 and the described second shooting
The time point of the first 102 every two field pictures obtained obtains the time difference.
In the present embodiment, when needing focusing, temporally by the image obtained through first camera 101 and through institute
The image of the acquisition of second camera 102 is stated as one group of image, that is to say, that every group of image includes being obtained by two cameras respectively
The image taken.Thus, at least one set of image is obtained.It is the first camera of correspondence that current Y data can be distinguished according to different sessions
101 still correspond to second camera 102.It can also be obtained simultaneously according to session per two field picture corresponding time point.And then will be through
The time point for every two field picture that first camera 101 is obtained and every two field picture through the second camera 102 acquisition
Time point is calculated, to obtain every group of image corresponding time difference.
Such as, when needing focusing, image a1, a2 is obtained by the first camera 101, figure is obtained by second camera 102
As b1, b2.Then it is grouped according to the time, first group of image includes a1 and b1, and the time difference of first group of image is acquisition image a1, b1
Time point difference;Second group of image includes a2 and b2, and the time difference of second group of image is poor for acquisition image a2, b2 time point
Value.
Sub-step S122, the poor threshold value of obtained time difference and preset time is compared, when yielding less than described default
Between poor threshold value time difference corresponding two field pictures.
In the present embodiment, often obtain one group of image and then calculate the time difference for obtaining this group of image, and by the time difference
It is compared with the poor threshold value of preset time.When being more than preset time difference threshold value in the time difference, this group of image is characterized not
Meet preparatory condition, because focusing needs promptness, one group of image for not meeting preparatory condition, that is to say, that when having crossed
Between the image put, be worth in the absence of calculating, therefore the image of preparatory condition will not met and abandon, and obtain next group of image.
When the time difference is less than the preset time poor threshold value, characterize that this group of image is eligible, that is, obtain two frame figures of needs
Picture.Further, after the two field pictures of needs are obtained, stopping is used through the first camera 101 and second camera 102
In the image of focusing.Wherein, the poor threshold value of the preset time can be configured according to actual conditions, such as, 0.5s.
In one embodiment, it can be obtained in a preset time period through the first camera 101 and second camera 102
Obtain multiple series of images.After the time difference for calculating every group of image, it is poor to filter out the shortest time, obtains the corresponding two frames figure of shortest time difference
Picture.
Step S130, target parallax is obtained according to the two field pictures.
The two field pictures are handled, distance value of the made thing body respectively in two field pictures is obtained, by two away from
Subtracted each other from value and obtain target parallax.
Step S140, searches the DAC value of corresponding with the target parallax first camera 101, and according to institute
State the corresponding target DAC value of target parallax, current DAC value to be adjusted motor, to complete focusing.
It refer to Fig. 3, Fig. 3 is the schematic flow sheet of the sub-step that step S140 includes in Fig. 2.The step S140 can be with
Including sub-step S141, sub-step S142 and sub-step S143.
Sub-step S141, target DAC value is compared with current DAC value, judges the target DAC value and current DAC
Whether value is identical.
In the present embodiment, the relation of parallax, object distance and focal length is preserved in the database.Wherein, the object distance is
Refer to the distance between line between made thing body and first camera 101 and the second camera 102.Focal length refers to parallel
Light it is incident when from optical center of lens to light the focus of aggregation distance, in being also camera, from center of lens to egative film or CCD etc. into
The distance of image plane.
In the embodiment of the present embodiment, the focal length is represented with DAC value.Wherein, DAC value represents the position of motor.
Motor refers to automatic focusing mechanism, and the auto-focusing of camera can be achieved, it is not necessary to twist the focusing ring on camera lens manually to complete
Focusing.
It can also be handled or be carried out by the first camera 101 and second camera 102 by the image to acquisition
The modes such as measurement obtain object away from, and then according to target parallax, object away from and the distance between two cameras in the number
According to computing and lookup is carried out in storehouse, the corresponding target DAC value of the target parallax is obtained.By first camera of acquisition
101 current DAC value is compared with the target DAC value, obtains comparison result.
When comparison result is that the target DAC value is identical with current DAC value, step S142 is performed.
Sub-step S142, is not adjusted to current DAC value.
In the present embodiment, because target DAC value is identical with current DAC value, characterize first camera 101 and completed
Focusing, made thing body is had been located on the focal length of the first camera 101, therefore current DAC value need not be adjusted again.
When comparison result is that the target DAC value is different from current DAC value, sub-step S143 is performed.
Sub-step S143, sends control signal current DAC value is adjusted into the target DAC value to motor.
In the present embodiment, because target DAC value is different from current DAC value, characterize first camera 101 and do not complete
Focusing.Accordingly, it would be desirable to adjust the DAC value of first camera 101.
, can be by a module (such as, Stats modules) for controlling operation status of motor in the embodiment of the present embodiment
Calculate target DAC value.When target DAC value is different from current DAC value, adjust instruction is sent to motor, by current DAC value
The target DAC value is adjusted to, so that first camera 101 completes focusing.
In an embodiment of the present embodiment, the AWB values of first camera 101 can also be obtained, so that auxiliary
Completion is helped to focus and image.Wherein, AWB (Automatic White Balance, AWB) refers to that video camera can root
According to the light conditions by its camera lens and white balance sensor, the color temperature value of subject is detected automatically, and shooting is judged with this
Condition.And select immediate tone to set, it is corrected for by color temperature correction circuit, white balance automatic control circuit automatically will be white
Balance is transferred to suitable position.
Refer to Fig. 4, Fig. 4 be the dual camera focusing method that present pre-ferred embodiments are provided schematic flow sheet it
Two.Methods described can also include step S110.
Step S110, when completing focusing, gathers different parallaxes and the corresponding DAC value of parallax to create database.
In the present embodiment, before practical application, demarcation, that is, the pass set up between focal length and object distance are completed first
System, and the relation between focal length and object distance is stored in database.Wherein, focal length is represented with DAC value.
By the first camera 101 and second camera 102 using similar triangle theory measure made thing body with it is described
Object distance between first camera 101 and the second camera 102 between line, and then according to the pass of second distance and focal length
System, you can determine focusing position.
It refer to Fig. 6, Fig. 6 is the schematic flow sheet of the part sub-step that step S110 includes in Fig. 5.The step S110
Sub-step S111, sub-step S112 and sub-step S116 can be included.
Sub-step S111, measures the first distance of first camera 101 and second camera 102.
Sub-step S112, when completing focusing, detection obtains made thing body and first camera 101 and described second
The corresponding DAC value of second distance and second distance between camera 102 between line.
In the present embodiment, complete to defocused, object distance can be obtained by way of measurement, that is to say, that obtain being clapped
Second distance between object and first camera 101 and the second camera 102 between line, while record is described
The corresponding DAC value of second distance.
Sub-step S116, according to the first distance, second distance, the corresponding DAC value of second distance and parallax to obtain parallax
With the relation of DAC value, and the first distance, second distance, the corresponding DAC value of second distance and parallax are stored in database.
Wherein, parallax represents same made thing body in the image obtained through the first camera 101 and through second camera 102
Distance on the image of acquisition.
It refer to Fig. 7, Fig. 7 is the schematic flow sheet of another part sub-step that step S110 includes in Fig. 5.The step
S110 can also include sub-step S113, sub-step S114 and sub-step S115.
Sub-step S113, sets up the first coordinate system on the first image obtained through first camera 101, and in warp
The first coordinate system is set up on the second image that the second camera 102 is obtained.
Sub-step S114, obtains position and made thing body position in second image of the made thing body in the first image
Put.
In the present embodiment, it is possible to use image recognition technology identifies the made thing in the first image and the second image
Body.
Sub-step S115, according to position in the first image of the first coordinate system, the second coordinate system, made thing body and is clapped
Position of the object in the second image obtains parallax.
Fig. 8 is refer to, Fig. 8 is the similar triangles positioning schematic that present pre-ferred embodiments are provided.First by surveying
Measure c1、c2Between first apart from d1.When focusing completion, that is, made thing body is located at c1Focal length on i.e. it is most clear
Position on when, obtain made thing body p and c1、c2Second distance d between line2And the focal length f represented with DAC value.Complete
After above-mentioned steps, two images are obtained by shooting, coordinate system are set up on two images respectively, and then can know by image
Other technology searches out made thing body p.Existed according to position in the first image of two coordinate systems and made thing body p and made thing body
Position in second image obtain made thing body on the first image apart from xlAnd distance of the made thing body on the second image
xr, xl、xrDifference be parallax d.Thus, according to first apart from d1, second distance d2, parallax d and focal length f pass through the derivation of equation
Obtain parallax d and focal length f relation.Wherein, c1Represent the first camera 101, c2Represent second camera 102.The derivation of equation is such as
Under:
L+d1=xl+T+(L-xr)
T=d1+xr-xl
Wherein, L represents photosensitive region, and T represents the space length of position of the made thing body on corresponding image.
In different second distance d2In the case of, collection multiple series of images carries out above-mentioned computing, and is stored in database, with
Increase the accuracy of database.
Thus, in practical application, according to first apart from d1, measured by the first camera 101 and second camera 102
Second distance d2, the parallax d that calculates can obtain corresponding focal length.It is corresponding to be adjusted to the focal length by controlling motor
DAC value, you can complete rapid focus, still can focus, while not increasing hardware cost, can also lead under dim light
Cross and save the resource of Statistical Comparison degree to reduce cost.
Fig. 9 is refer to, Fig. 9 is the block diagram for the dual camera focusing mechanism 200 that present pre-ferred embodiments are provided
One of.The dual camera focusing mechanism 200 is applied to electronic equipment 100.The electronic equipment 100 includes the first camera
101 and second camera 102, the electronic equipment 100 also includes a database, and the database includes parallax and parallax correspondence
DAC value.The dual camera focusing mechanism 200 includes image collection module 220, disparity computation module 230 and Focusing module
240。
Image collection module 220, for calculate through first camera 101 gather multiple image with through described second
Time difference between the multiple image that camera 102 is gathered, find the time difference corresponding two field pictures for meeting preparatory condition.
Described image acquisition module 220 calculate through first camera 101 gather multiple image with through described second
The time difference for the multiple image that camera 102 is gathered, find the mode for the time difference corresponding two field pictures for meeting preparatory condition
Including:
The time point of the every two field picture obtained according to first camera 101 obtains with the second camera 102
Time point per two field picture obtains the time difference;
The poor threshold value of obtained time difference and preset time is compared, yield less than the poor threshold value of the preset time when
Between poor corresponding two field pictures..
In the present embodiment, described image acquisition module 220 is used to perform the step S120 in Fig. 2, on described image
The specific descriptions of acquisition module 220 are referred to the description of step S120 in Fig. 2.
Disparity computation module 230, for obtaining target parallax according to the two field pictures.
In the present embodiment, the disparity computation module 230 is used to perform the step S130 in Fig. 2, on the parallax
The specific descriptions of computing module 230 are referred to the description of step S130 in Fig. 2.
Focusing module 240, the DAC value for searching first camera 101 corresponding with the target parallax, and root
Motor is adjusted according to target DAC value corresponding with the target parallax, current DAC value, to complete focusing.
The Focusing module 240 is carried out according to target DAC value corresponding with the target parallax, current DAC value to motor
The mode of adjustment includes:
Target DAC value is compared with current DAC value;
If the target DAC value is identical with current DAC value, current DAC value is not adjusted;
If the target DAC value is different from current DAC value, send control signal to adjust current DAC value to motor
For the target DAC value.
In the present embodiment, the Focusing module 240 is used to perform the step S140 in Fig. 2, on the Focusing module
240 specific descriptions are referred to the description of step S140 in Fig. 2.
Figure 10 is refer to, Figure 10 is the square frame signal for the dual camera focusing mechanism 200 that present pre-ferred embodiments are provided
The two of figure.The dual camera focusing mechanism 200 can also include creation module 210.
Creation module 210, for when completing focusing, gathering different parallaxes and the corresponding DAC value of parallax to create data
Storehouse.
Figure 11 is refer to, Figure 11 is the block diagram of creation module 210 in Figure 10.The creation module 210 includes:
Measure submodule 211, the first distance for measuring first camera 101 and second camera 102;
Detection sub-module 212, for when completing focusing, detection obtain made thing body and first camera 101 with
Second distance and the corresponding DAC value of second distance between the second camera 102 between line;
Submodule 216 is preserved, for being obtained according to the first distance, second distance, the corresponding DAC value of second distance and parallax
Data are stored in the relation of parallax and DAC value, and by the first distance, second distance, the corresponding DAC value of second distance and parallax
In storehouse.
Wherein, parallax represents same made thing body in the image obtained through the first camera 101 and through second camera 102
Distance on the image of acquisition.
Referring once again to Figure 11, the creation module 210 can also include:
Setting up submodule 213, for setting up the first coordinate on the first image obtained through first camera 101
System, and set up the first coordinate system on the second image obtained through the second camera 102;
Position acquisition submodule 214, for obtaining position and made thing body of the made thing body in the first image second
Position in image;
Parallax acquisition submodule 215, for according to the first coordinate system, the second coordinate system, made thing body in the first image
Position in the second image of position and made thing body obtain parallax.
In the present embodiment, the creation module 210 is used to perform the step S150 in Fig. 5, on the creation module
210 specific descriptions are referred to the description of step S150 in Fig. 5.
In summary, present pre-ferred embodiments provide a kind of dual camera focusing method and device, are set applied to electronics
It is standby.Wherein, the electronic equipment includes the first camera and second camera, and the electronic equipment also includes a database, institute
Stating database includes parallax and the corresponding DAC value of parallax.The electronic equipment gathers multiple image, warp through first camera
The second camera gathers multiple image, so calculate the multiple image that is gathered through first camera with through described second
Time difference between the multiple image of camera collection.The time difference obtained according to calculating finds the time difference for meeting preparatory condition
Corresponding two field pictures.Two field pictures progress is handled and obtains target parallax.Electronic equipment is according to the target parallax in data
Searched in storehouse, obtain the DAC value of first camera corresponding with the target parallax, and regarded according to the target
The corresponding target DAC value of difference, current DAC value are adjusted to motor, to complete focusing.Thus, focusing is rapidly completed, even in
Still it can be focused under dim light, while cost can also be reduced.
The preferred embodiments of the present invention are the foregoing is only, are not intended to limit the invention, for the skill of this area
For art personnel, the present invention can have various modifications and variations.Within the spirit and principles of the invention, that is made any repaiies
Change, equivalent substitution, improvement etc., should be included in the scope of the protection.
Claims (10)
1. a kind of dual camera focusing method, it is characterised in that applied to electronic equipment, the electronic equipment includes the first shooting
Head and second camera, the electronic equipment also include a database, and the database includes parallax and the corresponding DAC of parallax
Value, methods described includes:
Calculate between the multiple image through first camera collection and the multiple image through second camera collection
Time difference, find the time difference corresponding two field pictures for meeting preparatory condition;
Target parallax is obtained according to the two field pictures;
The DAC value of first camera corresponding with the target parallax is searched, and according to corresponding with the target parallax
Target DAC value, current DAC value are adjusted to motor, to complete focusing.
2. according to the method described in claim 1, it is characterised in that basis target DAC corresponding with the target parallax
The step of value, current DAC value are adjusted to motor includes:
Target DAC value is compared with current DAC value;
If the target DAC value is identical with current DAC value, current DAC value is not adjusted;
If the target DAC value is different from current DAC value, send control signal current DAC value is adjusted into institute to motor
State target DAC value.
3. according to the method described in claim 1, it is characterised in that described to calculate the multiframe figure gathered through first camera
Picture and the time difference of the multiple image gathered through the second camera, find time difference corresponding two frame for meeting preparatory condition
The step of image, includes:
Every two field picture that the time point of the every two field picture obtained according to first camera obtains with the second camera
Time point obtains the time difference;
The poor threshold value of obtained time difference and preset time is compared, the time difference of the poor threshold value of the preset time is yielded less than
Corresponding two field pictures.
4. according to the method described in claim 1, it is characterised in that methods described also includes:
When completing focusing, gather different parallaxes and the corresponding DAC value of parallax to create database;
It is described when completing focusing, gathering the step of different parallaxes and the corresponding DAC value of parallax are to create database includes:
Measure the first distance of first camera and second camera;
When completing focusing, detection is obtained between made thing body and first camera and the second camera between line
Second distance and the corresponding DAC value of second distance;
According to the first distance, second distance, the corresponding DAC value of second distance and parallax to obtain the relation of parallax and DAC value, and
First distance, second distance, the corresponding DAC value of second distance and parallax are stored in database, wherein, parallax represents same
Distance of the made thing body on the image obtained through the first camera and the image obtained through second camera.
5. method according to claim 4, it is characterised in that described according to the first distance, second distance, second distance pair
Before the step of relation of the DAC value and parallax answered to obtain parallax and DAC value, methods described also includes:
The first coordinate system is set up on the first image obtained through first camera, and is obtained through the second camera
The second image on set up the first coordinate system;
Obtain position and made thing body position in second image of the made thing body in the first image;
According to position in the first image of the first coordinate system, the second coordinate system, made thing body and made thing body in the second image
In position obtain parallax.
6. a kind of dual camera focusing mechanism, it is characterised in that applied to electronic equipment, the electronic equipment includes the first shooting
Head and second camera, the electronic equipment also include a database, and the database includes parallax and the corresponding DAC of parallax
Value, described device includes:
Image collection module, for calculating the multiple image gathered through first camera with being gathered through the second camera
Multiple image between time difference, find the time difference corresponding two field pictures for meeting preparatory condition;
Disparity computation module, for obtaining target parallax according to the two field pictures;
Focusing module, the DAC value for searching corresponding with the target parallax first camera, and according to the mesh
The corresponding target DAC value of mark parallax, current DAC value are adjusted to motor, to complete focusing.
7. device according to claim 6, it is characterised in that the Focusing module is according to corresponding with the target parallax
Target DAC value, current DAC value include to the mode that motor is adjusted:
Target DAC value is compared with current DAC value;
If the target DAC value is identical with current DAC value, current DAC value is not adjusted;
If the target DAC value is different from current DAC value, send control signal current DAC value is adjusted into institute to motor
State target DAC value.
8. device according to claim 6, it is characterised in that described image acquisition module is calculated through first camera
The multiple image of collection and the time difference of the multiple image gathered through the second camera, find the time for meeting preparatory condition
The mode of the corresponding two field pictures of difference includes:
Every two field picture that the time point of the every two field picture obtained according to first camera obtains with the second camera
Time point obtains the time difference;
The poor threshold value of obtained time difference and preset time is compared, the time difference of the poor threshold value of the preset time is yielded less than
Corresponding two field pictures.
9. device according to claim 6, it is characterised in that described device also includes:
Creation module, for when completing focusing, gathering different parallaxes and the corresponding DAC value of parallax to create database;
The creation module includes:
Measure submodule, the first distance for measuring first camera and second camera;
Detection sub-module, for when completing focusing, detection to obtain made thing body and taken the photograph with first camera with described second
As the second distance and the corresponding DAC value of second distance between line between head;
Submodule is preserved, for obtaining parallax according to the first distance, second distance, the corresponding DAC value of second distance and parallax
With the relation of DAC value, and the first distance, second distance, the corresponding DAC value of second distance and parallax are stored in database,
Wherein, parallax represents same made thing body on the image obtained through the first camera and the image obtained through second camera
Distance.
10. device according to claim 9, it is characterised in that the creation module also includes:
Setting up submodule, for setting up the first coordinate system on the first image obtained through first camera, and through institute
The first coordinate system is set up on the second image for stating second camera acquisition;
Position acquisition submodule, for obtaining position and made thing body of the made thing body in the first image in the second image
Position;
Parallax acquisition submodule, for according to position in the first image of the first coordinate system, the second coordinate system, made thing body and
Position of the made thing body in the second image obtains parallax.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710575465.3A CN107172410A (en) | 2017-07-14 | 2017-07-14 | Dual camera focusing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710575465.3A CN107172410A (en) | 2017-07-14 | 2017-07-14 | Dual camera focusing method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107172410A true CN107172410A (en) | 2017-09-15 |
Family
ID=59824184
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710575465.3A Pending CN107172410A (en) | 2017-07-14 | 2017-07-14 | Dual camera focusing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107172410A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107920209A (en) * | 2017-12-27 | 2018-04-17 | 国网通用航空有限公司 | A kind of high speed camera autofocus system, method and processor, computer equipment |
WO2019129077A1 (en) * | 2017-12-27 | 2019-07-04 | 华为技术有限公司 | Focusing method and electronic device |
CN113727093A (en) * | 2021-08-23 | 2021-11-30 | 重庆市天实精工科技有限公司 | Method for burning DAC (digital-to-analog converter) by USB (universal serial bus) camera |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102955349A (en) * | 2011-08-23 | 2013-03-06 | 深圳市掌网立体时代视讯技术有限公司 | Stereoscopic image shooting method and stereoscopic image shooting device capable of automatically adjusting image parallax |
CN102984530A (en) * | 2011-09-02 | 2013-03-20 | 宏达国际电子股份有限公司 | Image processing system and automatic focusing method |
CN103246130A (en) * | 2013-04-16 | 2013-08-14 | 广东欧珀移动通信有限公司 | Focusing method and device |
CN104297896A (en) * | 2014-09-01 | 2015-01-21 | 联想(北京)有限公司 | Focusing method and electronic equipment |
CN104639927A (en) * | 2013-11-11 | 2015-05-20 | 财团法人资讯工业策进会 | Method for shooting stereoscopic image and electronic device |
CN105120148A (en) * | 2015-08-14 | 2015-12-02 | 深圳市金立通信设备有限公司 | An automatic focusing method and a terminal |
WO2017099854A1 (en) * | 2015-12-10 | 2017-06-15 | Google Inc. | Stereo autofocus |
-
2017
- 2017-07-14 CN CN201710575465.3A patent/CN107172410A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102955349A (en) * | 2011-08-23 | 2013-03-06 | 深圳市掌网立体时代视讯技术有限公司 | Stereoscopic image shooting method and stereoscopic image shooting device capable of automatically adjusting image parallax |
CN102984530A (en) * | 2011-09-02 | 2013-03-20 | 宏达国际电子股份有限公司 | Image processing system and automatic focusing method |
CN103246130A (en) * | 2013-04-16 | 2013-08-14 | 广东欧珀移动通信有限公司 | Focusing method and device |
CN104639927A (en) * | 2013-11-11 | 2015-05-20 | 财团法人资讯工业策进会 | Method for shooting stereoscopic image and electronic device |
CN104297896A (en) * | 2014-09-01 | 2015-01-21 | 联想(北京)有限公司 | Focusing method and electronic equipment |
CN105120148A (en) * | 2015-08-14 | 2015-12-02 | 深圳市金立通信设备有限公司 | An automatic focusing method and a terminal |
WO2017099854A1 (en) * | 2015-12-10 | 2017-06-15 | Google Inc. | Stereo autofocus |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107920209A (en) * | 2017-12-27 | 2018-04-17 | 国网通用航空有限公司 | A kind of high speed camera autofocus system, method and processor, computer equipment |
WO2019129077A1 (en) * | 2017-12-27 | 2019-07-04 | 华为技术有限公司 | Focusing method and electronic device |
CN113727093A (en) * | 2021-08-23 | 2021-11-30 | 重庆市天实精工科技有限公司 | Method for burning DAC (digital-to-analog converter) by USB (universal serial bus) camera |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107948519B (en) | Image processing method, device and equipment | |
CN111028189B (en) | Image processing method, device, storage medium and electronic equipment | |
CN109089047B (en) | Method and device for controlling focusing, storage medium and electronic equipment | |
US20160227100A1 (en) | Dual camera systems and methods for rapid 3a convergence and high dynamic range exposure metering | |
US20150278996A1 (en) | Image processing apparatus, method, and medium for generating color image data | |
JP2023036625A (en) | Imaging apparatus | |
CN105847693A (en) | Shooting method and system based on two-camera focusing | |
CN103227928B (en) | White balance adjusting method and device | |
CN107704798B (en) | Image blurring method and device, computer readable storage medium and computer device | |
CN109685853B (en) | Image processing method, image processing device, electronic equipment and computer readable storage medium | |
CN112004029B (en) | Exposure processing method, exposure processing device, electronic apparatus, and computer-readable storage medium | |
CN107172410A (en) | Dual camera focusing method and device | |
CN108053438B (en) | Depth of field acquisition method, device and equipment | |
US9866764B2 (en) | Method and apparatus for synchronizing auto exposure between chromatic pixels and panchromatic pixels in a camera system | |
CN106791451B (en) | Photographing method of intelligent terminal | |
CN110049240B (en) | Camera control method and device, electronic equipment and computer readable storage medium | |
US11457189B2 (en) | Device for and method of correcting white balance of image | |
CN108174173B (en) | Photographing method and apparatus, computer-readable storage medium, and computer device | |
CN113691795A (en) | Image processing apparatus, image processing method, and storage medium | |
JP2022115944A (en) | Imaging apparatus | |
CN109257540B (en) | Photographing correction method of multi-photographing lens group and photographing device | |
US11347978B2 (en) | Image processing apparatus, image processing method, and image processing system | |
CN110848907A (en) | Control method of air conditioner, air conditioner and computer readable storage medium | |
CN116309224A (en) | Image fusion method, device, terminal and computer readable storage medium | |
US20130266220A1 (en) | Color signal processing circuit, color signal processing method, color reproduction evaluating method, imaging apparatus, electronic apparatus and testing 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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170915 |