A kind of fast automatic focusing method of imaging system and device
Technical field
The present invention relates to technical field of image processing, and in particular to imaging system.
Background technology
Digital imaging system, such as digital camera, mobile phone with camera function etc., in imaging process, it usually needs into
Row focusing, makes shooting result clear.Focus process is usually completed by Atomatic focusing method, halfway without human intervention, during focusing,
Whenever as soon as imaging sensor exports two field picture, auto-focusing algorithm carries out focusing meter using the data of area-of-interest on image
It calculates, lens location is then adjusted according to result of calculation.Afterwards, the new image of a frame is obtained, utilizes area-of-interest in new images
Data carry out focusing calculating again, and adjust lens location.Above procedure constantly repeats, until obtaining optimal focusing position.
It is only once focused calculatings per two field picture, and being generally completed focusing needs to carry out focusing calculating several times, constantly adjusts camera lens
Position, to obtain optimal focus effects.Assuming that certain auto-focusing algorithm completes focusing after adjusting six lens locations, then the calculation
Method needs the regions of interest data of six two field pictures, completes six focusings and calculates, and every two field picture calculate every time and camera lens tune
Whole focus process time sequencing is with reference to shown in Fig. 1.
Therefore the prior art needs multiple image data to meet the needs repeatedly calculated, the major part of entire focus process
Time is all consumed in the output of the next frame image data of wait so that focus process is excessively time-consuming, it is impossible to be provided to the user
Satisfied shooting experience.
The content of the invention
It is an object of the present invention to provide a kind of fast automatic focusing method of imaging system, solution more than technical problems;
The present invention also aims to provide a kind of imaging system fast automatic focusing mechanism, solution more than technical problem.
Following technical scheme may be employed to realize in technical problem solved by the invention:
A kind of fast automatic focusing method of imaging system, applied to imaging system, the imaging system include camera lens module,
Image sensing module, wherein,
In in the viewfinder range of the camera lens module with the first pre-defined rule set one specify region;
The imaging system is equipped with image output module, and described image output module is exported according to the second predetermined order schemes
Picture;
The imaging system is equipped with region division module, and the imaging system is additionally provided with a Focusing module,
The region division module divides setting number in the specified region and is arranged along described image outbound course
Subregion, the Focusing module according to it is described setting number sub-regions image output order gradually carry out focusing calculate and
Judge, and the result for calculating and judging according to the focusing adjusts the opposite position of the camera lens module and described image sensing module
It puts;Until focusing is completed.
Preferably, following steps are specifically included:
Step 101, area-of-interest and sub-zone dividing;Area-of-interest is set as with the specified region, and is passed through
The area-of-interest is divided into setting number sub-regions by the region division module;
Step 102, described image output module often completes the image data output of a sub-regions, performs step 103;
Step 103, focusing judges and calculates:The Focusing module to output complete each subregion image into
Row focusing calculates and judges whether the current lens location of the camera lens module has reached most preferably, if it is not, performing step
104, if so, entering step 105;
Step 104, camera lens adjusts:The Focusing module adjusts the camera lens module and the phase of described image sensor module
Contraposition postpones, and repeats step 102;
Step 105, focusing terminates.
Preferably, the focusing in step 103 and step 104 judges to adjust next sub-district in order with calculating and camera lens
Area image data start to export preceding completion.
Preferably, the area-of-interest is divided at least two subregions by the region division module.
Preferably, the area-of-interest is divided into six sub-regions by the region division module.
Preferably, it is equipped with gap between the subregion, the gap in the range of the off time for carrying out pair
Coke calculates and camera lens adjustment.
Preferably, first pre-defined rule is specify alternatively, positioned at the mirror by user by an input unit
Default default location in head module viewfinder range.
Preferably, second predetermined order is:
Described image output module exports image line by line according to order from top to bottom or from top to bottom.
Preferably, second predetermined order is:
Image information exports image by column according to order from left to right or from right to left.
A kind of fast automatic focusing mechanism of imaging system, for implementing a kind of above-mentioned fast automatic focusing side of imaging system
Method.
Advantageous effect:Due to using the technology described above, the present invention makes full use of the output characteristics of image sensing module,
It completes repeatedly to focus to calculate during the output of one frame image data to adjust with camera lens, reduces the required number of image frames of focusing,
Accelerate focus process;Focusing more faster than conventional method can be realized using this method, provide better shooting body to the user
It tests.
Description of the drawings
Fig. 1 is to carry out once calculating the time sequencing for completing focus process with camera lens adjustment in the prior art per two field picture
Figure;
Fig. 2 is a kind of specific embodiment of the present invention, sets a schematic diagram for specifying region;
Fig. 3 is a kind of flow chart of the fast automatic focusing method of imaging system of the present invention;
Fig. 4 is a kind of specific embodiment of the present invention, and area-of-interest is divided into the subregion of two longitudinal arrangements
Schematic diagram;
Fig. 5 be according to Fig. 4 divisions subregion carry out focusing calculate and camera lens adjustment with complete focus process when
Between precedence diagram;
Fig. 6 is a kind of specific embodiment of the present invention, and area-of-interest is divided into the subregion of six longitudinal arrangements
Schematic diagram;
Fig. 7 be according to Fig. 6 divisions subregion carry out focusing calculate and camera lens adjustment with complete focus process when
Between precedence diagram.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present invention, the technical solution in the embodiment of the present invention is carried out clear, complete
Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, those of ordinary skill in the art obtained on the premise of creative work is not made it is all its
His embodiment, belongs to the scope of protection of the invention.
It should be noted that in the case where there is no conflict, the feature in embodiment and embodiment in the present invention can phase
Mutually combination.
The invention will be further described in the following with reference to the drawings and specific embodiments, but not as limiting to the invention.
With reference to Fig. 2, Fig. 3, Fig. 4, a kind of fast automatic focusing method of imaging system, applied to imaging system, imaging system
Including camera lens module, image sensing module, in setting one to specify region with the first pre-defined rule in the viewfinder range of camera lens module;
Imaging system is equipped with image output module, and image output module exports image according to the second predetermined order;Imaging system is equipped with area
Domain division module, imaging system are additionally provided with a Focusing module, and region division module is specifying division setting number edge in region
The subregion of image outbound course arrangement, Focusing module gradually carry out pair according to the image output order of setting number sub-regions
Coke is calculated and judged, and the result adjustment camera lens module and the relative position of image sensing module for calculating and judging according to focusing;
Until focusing is completed.
The first above-mentioned pre-defined rule is specify alternatively, taking positioned at camera lens module by user by an input unit
Default default location in the range of scape.
Second predetermined order can be to export image line by line according to order from top to bottom or from top to bottom, or according to from
Order left-to-right or from right to left exports image by column;Fig. 2 is the implementation for exporting image line by line in accordance with the order from top to bottom
Example.
With reference to Fig. 3, following steps are specifically included:
Step 101, area-of-interest and sub-zone dividing;Region to be specified to be set as area-of-interest 111, and pass through area
Area-of-interest 111 is divided into setting number sub-regions by domain division module;
Step 102, image output module often completes the image data output of a sub-regions, performs step 103;
Step 103, focusing judges and calculates:Focusing module carries out focusing meter to the image for each subregion that output is completed
It calculates and judges whether the current lens location of camera lens module has reached most preferably, if it is not, step 104 is performed, if so, into
Enter step 105;
Step 104, camera lens adjusts:After Focusing module adjusts the relative position of camera lens module and image sensor module, weight
Step 102 is performed again;
Step 105, focusing terminates.
Further, the focusing in above-mentioned step 103 and step 104 judges to adjust under order with calculating and camera lens
One sub-regions image data starts to export preceding completion.
Fig. 2 is the embodiment for exporting image line by line in accordance with the order from top to bottom, according to the one side of the embodiment, figure
The order of picture output is from left to right output the first row pixel, from left to right exports the second row pixel again after finishing, and so on,
Until exporting whole frame image data.
In order to realize the present invention, area-of-interest 111 is divided at least two subregions, a kind of tool by region division module
Body embodiment:With reference to Fig. 4, area-of-interest 111 is divided into the subregion of at least two longitudinal arrangements by region division module, son
Region is respectively the first subregion 11 and the second subregion 12 positioned at 11 lower section of the first subregion from top to bottom;First sub-district
The image data output in domain 11 is exported earlier than the image data of the second subregion 12, is completed when the image of the first subregion 11 exports
Afterwards, step 103 is performed, after calculating, if necessary to perform step 104, is then exported in the image data of the second subregion 12
Lens location is adjusted before so that the second subregion 12 obtained is the image adjusted after lens location;When the second subregion 12
Image output after, carry out focusing calculating and camera lens adjustment.
In embodiment 1, image data is the Sequential output from top to bottom according to from left to right, the number of the first subregion 11
It is exported according to being initially completed.After the completion of the data output of the first subregion 11, get started focusing and calculate.It calculates and is used at this time
Data be the image data in the first subregion 11.After the calculating of first subregion 11, camera lens module position is adjusted at once
It puts.Camera lens adjustment herein starts to export preceding completion, the number of such second subregion 12 in the image data of the second subregion 12
According to will be adjust camera lens after image.After the image data output of the second subregion 12, the second subregion is started with
12 data carry out focusing calculating and camera lens adjustment.The adjustment is complete before next two field picture starts the data of the first subregion of output
Into.In this way, with reference to Fig. 5, after the completion of the output of the first two field picture, focus twice calculating and camera lens adjustment has been carried out.With this
Analogize, after the second two field picture exports, complete the 3rd time and the 4th focusing calculates and camera lens adjustment;When the 3rd two field picture exports
Afterwards, complete the 5th and the 6th focusing calculates and camera lens adjustment.It is assuming that complete after certain auto-focusing algorithm six lens locations of adjustment
Into focusing, Fig. 5 gives image in the above process and exports, and focusing calculates the time order and function order between camera lens adjustment.As it can be seen that
After image sensing module exports three two field pictures, six focusing calculating and camera lens adjustment are completed, that is, completes auto-focusing.
It is compared with conventional method, above procedure saves half the time.
In order to obtain focusing speed faster, it is assumed that certain auto-focusing algorithm completes focusing after adjusting six lens locations,
Area-of-interest 111 is divided into six sub-regions by region division module, as another specific embodiment, with reference to Fig. 6, and six
Subregion is the subregion of longitudinal arrangement from top to bottom, is followed successively by the first subregion 13, the second subregion 14, the 3rd subregion
15th, the 4th subregion 16, the 5th subregion 17 and the 6th subregion 18;The image data of first subregion 13 is exported earlier than second
The image data output of subregion 14 after the completion of the image output of the first subregion 13, performs step 103, after calculating,
If necessary to perform step 104, then lens location is adjusted before the image data output of the second subregion 14 so that the second son
What region 14 obtained is the image adjusted after lens location;After the image output of the second subregion 14, focusing meter is carried out
It calculates and camera lens adjusts, and so on, it realizes and six focusing calculating and camera lens adjustment is completed during frame image data output,
It realizes and focusing is completed in a two field picture.
In conclusion when division subregion number, equal to or more than complete focus required calculation times when, only
It needs to complete to focus in a frame image data output time.
Gap 23 can be equipped between the subregion of the above embodiments, for focusing in 23 time range of gap
It calculates and camera lens adjusts.The difference for speed of regulating the speed with camera lens is calculated according to focusing, the size in gap is also different.Focusing calculates
Faster with the speed of camera lens adjustment, required gap is smaller;It is conversely, bigger.
The present invention retains time enough for camera lens adjustment to focusing calculating and below so that in the output of next two field picture
Camera lens adjustment, after image sensing module outputs the last one pixel in area-of-interest, focus algorithm are completed before starting
It just starts to work using the image data of area-of-interest, without waiting until that whole two field picture output is completed.Area-of-interest 111
It is specified according to user, is the area-of-interest 111 of a rectangle, circle or other shapes;Alternatively, positioned at camera lens module viewfinder range
Interior default default location.Method provided by the invention does not change focusing calculating in itself, does not also require special camera lens adjustment side
Method, but realize the acceleration to tradition focusing.
A kind of fast automatic focusing mechanism of imaging system, for implementing a kind of above-mentioned fast automatic focusing side of imaging system
Method.
The foregoing is merely preferred embodiments of the present invention, not thereby limit embodiments of the present invention and protection model
It encloses, to those skilled in the art, should can appreciate that all with made by description of the invention and diagramatic content
Equivalent substitution and obviously change obtained scheme, should all include within the scope of the present invention.