CN101241223B - Automatic focusing process - Google Patents

Automatic focusing process Download PDF

Info

Publication number
CN101241223B
CN101241223B CN2008100656937A CN200810065693A CN101241223B CN 101241223 B CN101241223 B CN 101241223B CN 2008100656937 A CN2008100656937 A CN 2008100656937A CN 200810065693 A CN200810065693 A CN 200810065693A CN 101241223 B CN101241223 B CN 101241223B
Authority
CN
China
Prior art keywords
image
focusing
lens
camera lens
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN2008100656937A
Other languages
Chinese (zh)
Other versions
CN101241223A (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.)
Ruitai Optics Changzhou Co Ltd
Original Assignee
AAC Optoelectronic Changzhou 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 AAC Optoelectronic Changzhou Co Ltd filed Critical AAC Optoelectronic Changzhou Co Ltd
Priority to CN2008100656937A priority Critical patent/CN101241223B/en
Publication of CN101241223A publication Critical patent/CN101241223A/en
Application granted granted Critical
Publication of CN101241223B publication Critical patent/CN101241223B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses an auto focusing method comprising following steps: driving the lens to move in the whole range can be reached with a predetermined step width, obtaining an image at the initial position of the lens and at the position of each step of the lens; comparing each obtained image, memorizing corresponding lens position, and calculating the fractal dimension value of each pixel in a certain area therein; calculating the image evaluation value by using the fractal dimension value, thereby obtaining an image evaluating sequence; finding out the maximum value, and the values corresponding to the front and post n (n is a positive integer) steps in the sequence, making a parabolic curve according to the 2n+1 evaluating values and the corresponding lens position values; and calculating the corresponding lens position of the parabola vertex which is the lens focusing position. The invented auto focusing method can analyze image detail information well with good adaptability, focusing accuracy is increased, focusing position can be found out quickly, and the invented method can be used broadly in diversified cameras.

Description

A kind of method of automatic focusing
[technical field]
The present invention relates to a kind of automatic focusing method of camera head, particularly a kind of image processing means that utilizes obtains the automatic focusing method that relevant information is determined the camera lens focusing position fast.
[background technology]
Autofocus Technology is one of gordian technique of various imaging systems, has only precise focusing, and imaging could be clear.Automatically the method for focusing is in the process of taking, and according to the distance between camera lens and subject, regulates the position of camera lens automatically so that subject is imaged on the focal plane of camera lens, obtains distinct image.Automatically the focusing method can be divided into two classes according to control principle: a class is active, send signal by camera head, reflex to the system that accepts of camera head through object, make camera lens move to appropriate position automatically after treatment, as infra-red method, supercritical ultrasonics technology etc.; Another kind of is passive type, directly receives the light signal that is sent by object by camera head, and the process processing is moved camera lens automatically and is positioned at appropriate position, as phase method, TTL (by the camera lens photometry) method etc.
Development along with image processing techniques, increasing focusing method automatically begins to adopt image processing means, the picture signal of promptly utilizing the sensor (CCD/CMOS) behind the camera lens to obtain is handled and is analyzed, and obtains the camera lens focusing position according to the result who obtains.
Automatic focusing based on Digital Image Processing is divided into two kinds: a kind of is out of focus depth method (DFD, Depth From Defocus), this method is extrapolated the out of focus degree of depth of object by the image that obtains two width of cloth or above different out of focus position, realizes focusing thereby judge the focal position; Another kind is a focusing depth method (DFF, Depth From Focus), and this method is handled each width of cloth image that obtains, judge whether focusing accurate, similarly be not clear, and provide the motion of feedback signal controls lens, reach the most clear up to the image that obtains, finally finish focusing.The autofocus system of present most of camera heads all adopts the focusing depth method.
On June 28th, 2006 disclosed Chinese patent (application number: 200510137406.5) just disclosed a kind of adopt the focusing depth method focusing system, this invention is used is the focusing position that the method for extracting image edge information is sought camera lens, the steps include: at first to make camera lens with bigger distance value motion, find a certain scope, camera lens is moved in this scope with less distance value, find the position of focus lens.But the image edge information feature that obtains in camera lens out of focus position is not obvious, and extracting this information can influence the position that it finds best focusing, and this method will be through repeatedly search, and calculated amount is big, and the time of focusing is elongated.
Therefore, how improving the accuracy of focusing, shorten the focusing time, is the problem that needs solve.
[summary of the invention]
The purpose of this invention is to provide and a kind ofly can improve the focusing accuracy, find focusing position fast, and can finely analyze image detail information, automatic focusing method that adaptability is good.
For achieving the above object, the present invention proposes a kind of automatic focusing method based on the employing of Flame Image Process focusing depth method that is applicable to camera head, the course of work of its camera head is: subject is imaged on the imageing sensor through auto-focus lens, imageing sensor finish that image is changed substantially and some simple pre-service after, view data is delivered to the processing section; The processing section obtains beginning it is carried out real-time relevant treatment after the image data information, and sends drive signal according to the result that processing obtains, and driving circuit is controlled plant equipment according to the drive signal that obtains and driven camera lens adjustment position, reaches the purpose of focusing.
Automatic focusing method based on Flame Image Process of the present invention is to travel through with particular step size in the process of whole mobile range driving camera lens, utilizes the evaluation method that proposes to calculate the evaluation of estimate of the image that each position obtains; From the evaluation of estimate sequence that obtains, find out maximal value and near certain several values thereof, lens location with these values and their correspondences fits into a para-curve, with the lens location of this parabolical summit correspondence as focusing position, lens driving is finished focusing to this position, and its specific implementation step is as follows:
In automatic focusing process, (s is specific step size to the view data of captured object when obtaining camera lens and being in the position of i * s, i is that current camera lens is driven the paces number of being advanced), write down the residing positional information of current camera lens, and the source data (w is the horizontal resolution of institute's favored area, and h is the vertical resolution of institute's favored area) of this width of cloth image is estimated in the pixel data conduct that selects certain w * h zone from the image that obtains.
0≤i≤(l/s) (1)
(W/4)≤w≤W (2)
(H/4)≤h≤H (3)
(l is a camera lens mobile range size, and W is an image level resolution, and H is the vertical resolution of image.)
Definition according to fractal dimension in the fractal theory, in order to each pixel in the image is the above selected image-region of wicket traversal at center, draw the FRACTAL DIMENSION numerical value of each pixel, then obtain corresponding fractal dimension two-dimensional matrix f, calculate the mean value ave of all elements that comprises among the f:
ave = ( Σ k = 0 w × h f [ k ] ) / ( w × h ) - - - ( 4 )
This mean value ave as threshold value, is classified all elements that comprises among the fractal dimension matrix f that is obtained: category-A is that element value is more than or equal to threshold value; Category-B is that element value is less than threshold value.Respectively all FRACTAL DIMENSION numerical value that is comprised in category-A, the category-B is done then and, obtain and be respectively SumA, SumB, and calculate the evaluation of estimate v of this width of cloth image:
v = ( SumA ) m ( SumB ) m - - - ( 5 )
(wherein, m=1 or 2)
Drive camera lens by driving circuit and travel through whole mobile range with particular step size s, whenever moving moves a step just repeats above whole step.Like this, after camera lens travels through whole mobile range, just can obtain a picture appraisal value sequence and lens location sequence of values corresponding with it, find out maximum evaluation of estimate and preceding n and back n evaluation of estimate (n=1 or 2) in the picture appraisal value sequence, and in the lens location sequence of values, find out the lens location of maximum evaluation of estimate correspondence and preceding n and n the pairing lens location of evaluation of estimate in back, (2n+1) the individual evaluation of estimate that utilization is found out and the lens location of their correspondences, it is right to form (2n+1) individual data, utilize these data to become a para-curve to fitting, transverse axis is a lens location, and the longitudinal axis is the picture appraisal value; Obtain parabolical apex coordinate, its horizontal ordinate correspondence be the camera lens focusing position.
After obtaining the camera lens focusing position, utilize this focusing position and the residing position calculation of current camera lens to go out the distance that camera lens should move, feed back to the control part controller tool equipment of assigning to and drive camera lens and move to focusing position, focusing finishes automatically.
Contrast existing technology, the invention has the advantages that:
1) the FRACTAL DIMENSION numerical value of each pixel in the computed image can well analyze the detailed information in the image, and noise immunity is strong, adaptability is good, shooting environmental is not had dependence, and therefore the fractal dimension according to the image each point is worth publishing picture as evaluation of estimate, can improve the focusing accuracy.
2) the driving camera lens travels through once in mobile range and can obtain the camera lens focusing position in focus process, has reduced calculated amount, has improved focusing speed.
3) needn't be in focusing its Flame Image Process work of Xingqi of advancing, because utilize fractal method to come analysis image can well suppress the influence of noise and other factor, and it only is the blur level of calculating each pixel, can not produce new noise.
4) the present invention does not have special requirement to appliance arrangement, and because of camera lens does not need repeatedly to-and-fro movement, better effect is arranged all in energy saving and on mechanical life.
[description of drawings]
Fig. 1 is the process flow diagram of automatic focusing method of the present invention
Fig. 2 is the fundamental block diagram that adopts picture pick-up device of the present invention
Fig. 3 is that picture appraisal value figure (comprises m=1, m=2)
When Fig. 4 is m=2, para-curve that fits and the focusing position figure (n=1) that obtains
When Fig. 5 is m=2, para-curve that fits and the focusing position figure (n=2) that obtains
[embodiment]
Below in conjunction with accompanying drawing, the automatic focusing method based on Flame Image Process of the present invention is done detailed explanation.
The part that mainly comprises for the camera system device that adopts described Autofocus Technology of the present invention as Fig. 2: autofocus lens 23, imageing sensor 24 (for example: CCD, CMOS), image data processing, the processing section 25 that provides drive signal and finally provide focusing position, driving circuit section 26, mechanical part 27 (for example: step motor, voice coil motor etc.).Its groundwork process is: subject is imaged on the imageing sensor 24 through autofocus lens 23, in imageing sensor 24, finish the basic conversion and some simple pre-service of image after, view data is delivered to processing section 25; Processing section 25 obtains beginning it is carried out real-time relevant treatment after the image data information, and sends drive signal according to the result that processing obtains; Driving circuit 26 is controlled plant equipment 27 according to the drive signal that obtains and is driven camera lens adjustment position, reaches the purpose of focusing.
As Fig. 1 is the workflow diagram of automatic focusing method of the present invention, and this flow process is described in detail as follows by program 10 beginnings:
Program 10: select focusing operation automatically, focusing beginning automatically, the camera lens paces of advancing are counted i and are changed to 0.
Program 11: obtain the image data information of camera lens current location, and be saved in the storage unit of delimiting out for image information in the memory device.
Program 12: the camera lens paces of advancing are counted i and are added 1, and the particular step size of advancing according to camera lens is counted s and calculated current relative position of lens, and is saved in the storage array of delimiting out for lens location information in the memory device.
Program 13: from the image information storage unit, take out the Pixel Information of interior all pixels in zone of picture centre position 256 * 256 sizes, and be saved in the corresponding area information storage unit of having delimited out.
Program 14: utilize corresponding calculation method to calculate the FRACTAL DIMENSION numerical value of each pixel in the zone that extracts by program 13, obtain a fractal dimension two-dimensional matrix f.
Program 15: the mean value ave of the fractal dimension two-dimensional matrix f that calculation procedure 14 obtains,
ave = ( Σ k = 0 256 × 256 f [ k ] ) / ( 256 × 256 ) .
Program 16: this mean value ave as threshold value, and is classified all elements that comprises among the fractal dimension matrix f that is obtained, and category-A is that element value is more than or equal to threshold value; Category-B be element value less than threshold value, then, respectively all FRACTAL DIMENSION numerical value that is comprised in the category-A that obtains, the category-B is done and, obtain and be respectively SumA, SumB; Calculate the evaluation of estimate v of this width of cloth image, and be saved in the storage array of delimiting out for the picture appraisal value in the memory device.
v = ( SumA ) m ( SumB ) m
(wherein, m=1 or 2)
Program 17: utilize current lens location to judge whether to have traveled through whole mobile range,, enter program 18 if reached the mobile range maximal value; Otherwise, be back to program 11.
Program 18: find out maximal value and its front and back each n evaluation of estimate from picture appraisal value array, it is right that the lens location corresponding with them formed (2n+1) individual data, wherein n=1 or 2.
Program 19: (2n+1) the individual data that obtain are become a para-curve y=ax to fitting 2+ bx+c, transverse axis are lens location, and the longitudinal axis is the picture appraisal value, obtain the concrete parameter a of parabolic equation, b.
Program 20: the lens location X that calculates para-curve summit correspondence F=-b/2a determines that it is camera lens focusing position and preservation.
Program 21: calculate camera lens current location and the camera lens focusing position that draws apart from difference d, d is fed back to drive control part, drive camera lens and navigate to focusing position.
Program 22: focusing finishes, and all storage unit empty.
As Fig. 3 is picture appraisal value figure: horizontal ordinate is a lens location, and ordinate is the picture appraisal value.In focus process, moving of corresponding lens location gathered 7 width of cloth images and carried out the evaluation of estimate computing, and made m=1, m=2 draw two groups of image evaluation of estimate sequences respectively.
Be para-curve and the focusing position that obtains as Fig. 4,5: horizontal ordinate is a lens location, and ordinate is the picture appraisal value.In focus process, moving of corresponding lens location gathered 7 width of cloth images and carried out the evaluation computing, makes m=2 draw a picture appraisal value sequence.Make n=1 respectively, the para-curve that n=2 fits out, and pointed out the lens location of parabolical summit correspondence, i.e. camera lens focusing position.
The above only is a better embodiment of the present invention; protection scope of the present invention is not exceeded with above-mentioned embodiment; as long as the equivalence that those of ordinary skills do according to disclosed content is modified or changed, all should include in the protection domain of putting down in writing in claims.

Claims (2)

1. automatic method of focusing, the position that is used to regulate camera lens makes subject be imaged on the focal plane of camera lens, thereby makes imaging clear, it is characterized in that: this automatically method of focusing may further comprise the steps:
Drive camera lens and travel through whole mobile range, all obtain piece image at lens initial position and the further position of every row with particular step size;
To each width of cloth image that obtains, preserve its corresponding lens location, and calculate wherein certain each pixel FRACTAL DIMENSION numerical value of zone;
The FRACTAL DIMENSION numerical value that utilization obtains calculates the evaluation of estimate of image, thereby obtain a picture appraisal value sequence, the method that calculates the evaluation of estimate of image is: the fractal dimension value of each pixel obtains corresponding fractal dimension two-dimensional matrix f in certain zone according to obtaining in the image, calculate the mean value of fractal dimension two-dimensional matrix f, with this mean value as threshold value to the processing of classifying of all elements in the fractal dimension two-dimensional matrix, be a class A wherein more than or equal to threshold value, be divided into another kind of B less than threshold value, then, respectively with category-A and all FRACTAL DIMENSION numerical value summations of category-B, obtain SumA and SumB, the evaluation of estimate V of computed image
v = ( SumA ) m ( SumB ) m M=1 or 2;
Find out maximal value in the above-mentioned sequence and forward and backward each n corresponding evaluation of estimate of step thereof, utilizing the lens location numerical value of this 2n+1 data and their correspondences to fit becomes a para-curve, and described n is a positive integer;
Obtain above-mentioned para-curve summit correspondence position, be the camera lens focusing position;
Drive the camera lens focusing position that camera lens moves to above-mentioned acquisition, focusing finishes.
2. automatic focusing method as claimed in claim 1 is characterized in that: the described image-region that is used for the computed image evaluation of estimate is certain zone in the image, and this zone maximum rounds an image.
CN2008100656937A 2008-01-28 2008-01-28 Automatic focusing process Expired - Fee Related CN101241223B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2008100656937A CN101241223B (en) 2008-01-28 2008-01-28 Automatic focusing process

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2008100656937A CN101241223B (en) 2008-01-28 2008-01-28 Automatic focusing process

Publications (2)

Publication Number Publication Date
CN101241223A CN101241223A (en) 2008-08-13
CN101241223B true CN101241223B (en) 2010-08-11

Family

ID=39932888

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2008100656937A Expired - Fee Related CN101241223B (en) 2008-01-28 2008-01-28 Automatic focusing process

Country Status (1)

Country Link
CN (1) CN101241223B (en)

Families Citing this family (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9300855B2 (en) * 2011-03-14 2016-03-29 Panasonic Corporation Imaging apparatus, imaging method, integrated circuit, and computer program
CN103852956B (en) * 2012-12-04 2018-04-27 鸿富锦精密工业(深圳)有限公司 Atomatic focusing method
CN104717417B (en) * 2013-12-16 2018-06-01 展讯通信(上海)有限公司 A kind of fast automatic focusing method of imaging system and device
TWI494680B (en) * 2014-01-28 2015-08-01 Altek Semiconductor Corp Image capturing device and method for calibrating image deformation thereof
CN103945126B (en) * 2014-04-21 2015-03-04 中国人民解放军国防科学技术大学 Automatic focusing and locating method
CN105022137B (en) * 2014-04-30 2017-07-18 聚晶半导体股份有限公司 Use the autofocus system and its method of many camera lenses
CN105093479A (en) * 2014-04-30 2015-11-25 西门子医疗保健诊断公司 Automatic focusing method and device used for microscope
CN104469153A (en) * 2014-12-02 2015-03-25 广东威创视讯科技股份有限公司 Quick focusing method and system
CN106707462B (en) * 2015-07-30 2019-07-23 炬芯(珠海)科技有限公司 A kind of method and device of auto-focusing
CN106131406A (en) * 2016-07-05 2016-11-16 上海理工大学 A kind of method of self adaptation focusing
CN106383105B (en) * 2016-08-29 2021-02-12 上海交通大学 Raman spectrum measuring device and method capable of automatically adjusting sample measuring distance
CN106154690B (en) * 2016-09-20 2018-09-25 照旷科技(上海)有限公司 A kind of method of the control platform control fast automatic focusing of camera
CN106501917B (en) * 2016-12-07 2019-12-27 歌尔科技有限公司 Lens auxiliary focusing method and device
CN107806830A (en) * 2017-10-12 2018-03-16 陕西科技大学 A kind of range unit and application method based on zoom camera
CN108519654B (en) * 2018-04-13 2020-01-17 上海大学 Automatic focusing method based on electro-hydraulic adjustable-focus lens
CN111147708B (en) * 2019-12-04 2021-01-12 华为技术有限公司 Voice coil motor, camera module and electronic equipment
CN117555123B (en) * 2024-01-12 2024-03-22 江苏游隼微电子有限公司 Automatic focusing method and device for electron microscope

Also Published As

Publication number Publication date
CN101241223A (en) 2008-08-13

Similar Documents

Publication Publication Date Title
CN101241223B (en) Automatic focusing process
CN103516988B (en) Enhanced image processing with lens motion
CN104102068B (en) Atomatic focusing method and automatic focusing mechanism
CN103217855B (en) Automatic focusing method of camera
CN103945126B (en) Automatic focusing and locating method
CN104459940B (en) A kind of quick self-adapted auto focusing method
CN103856717B (en) Camera focusing control method and device
CN102707545B (en) DFF-based auto-focusing method
KR20170056698A (en) Autofocus method, device and electronic apparatus
CN105301876A (en) Projection method for intelligent projection robot, and robot employing projection method
CN105430268A (en) Automatic focusing processing method and device
CN103986877A (en) Image acquiring terminal and image acquiring method
CN101660946A (en) Auto-focusing method and device of thermal imager
CN110248097A (en) Chase after burnt method, apparatus, terminal device, computer readable storage medium
CN103839038A (en) People counting method and device
CN112203012B (en) Image definition calculation method, automatic focusing method and system
KR101784787B1 (en) Imaging device and method for automatic focus in an imaging device as well as a corresponding computer program
KR101845943B1 (en) A system and method for recognizing number plates on multi-lane using one camera
CN103973957A (en) Binocular 3D camera automatic focusing system and method
CN109739011B (en) Automatic focusing method based on improved hill climbing method
CN108769533A (en) A kind of auto-focusing algorithm
CN101950116A (en) Video automatic focusing method applied to multi-main-body scene
CN106657777A (en) Automatic focusing method and system for infrared thermal imager
CN107991665A (en) It is a kind of based on fixed-focus camera to target three-dimensional coordinate method for continuous measuring
CN106488121A (en) A kind of method and system of the automatic focusing based on pattern match

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20200923

Address after: No.2, Xinzhu Road, Xinbei District, Changzhou City, Jiangsu Province

Patentee after: Ruitai optics (Changzhou) Co.,Ltd.

Address before: 213167 Changzhou, Jiangsu City, Wujin province summer town villa

Patentee before: AAC MICROTECH (CHANGZHOU) Co.,Ltd.

CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20100811

Termination date: 20220128