CN102331652A - Real-time automatic focusing method - Google Patents

Real-time automatic focusing method Download PDF

Info

Publication number
CN102331652A
CN102331652A CN201110286137A CN201110286137A CN102331652A CN 102331652 A CN102331652 A CN 102331652A CN 201110286137 A CN201110286137 A CN 201110286137A CN 201110286137 A CN201110286137 A CN 201110286137A CN 102331652 A CN102331652 A CN 102331652A
Authority
CN
China
Prior art keywords
focusing
real
correlative value
ccd
automatic focusing
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
Application number
CN201110286137A
Other languages
Chinese (zh)
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.)
Guangdong University of Technology
Original Assignee
Guangdong University of Technology
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 Guangdong University of Technology filed Critical Guangdong University of Technology
Priority to CN201110286137A priority Critical patent/CN102331652A/en
Publication of CN102331652A publication Critical patent/CN102331652A/en
Pending legal-status Critical Current

Links

Landscapes

  • Automatic Focus Adjustment (AREA)
  • Studio Devices (AREA)
  • Focusing (AREA)

Abstract

The invention discloses a real-time automatic focusing method, which is suitable for a pick-up device. The real-time automatic focusing method comprises the following steps of: checking an environment in real time by using a focusing environment judging unit of a real-time automatic focusing system to decide whether to move a lens during the image accquiring process of a charge-coupled device (CCD); and comparing by computing contrast to decide the moving direction of the lens. According to the method, the aim of focusing in real time can be fulfilled; the lens can be finely adjusted to increase the focusing accuracy; and moreover, programs are optimized, and resources are saved.

Description

A kind of in real time automatic focusing method
Technical field
The present invention relates to camera head CCD acquisition technology field, particularly a kind of in real time automatic focusing method.
Background technology
Along with the fast development of automatic control technology and image processing techniques, Autofocus Technology is applied to a plurality of fields, such as industrial optical detection, medical image system, multimedia technology field etc.In commercial production, usually need carry out quality testing to exact instrument, distinct image information is obtained in this victory of will seeking quickness exactly.In this used, Autofocus Technology highlighted crucial effects.
General; Adopting the microscopical automatic focusing mode of image processing techniques is to present whole inverted image after reflexing to convex lens by natural light; Through the camera continuously shot images; And constantly compare and analyze, control moving lens repeatedly, up to finding out the most distinct image as the criterion of focus point.Yet great amount of images information need stored and handle to this automatic focusing mode, and influence is the speed of focusing automatically.
In addition, existing real-time autofocus system has following defective and deficiency in actual use:
(1) no matter whether the capture environment changes, set per 3 seconds usually and focus once automatically, therefore cause unnecessary power consumption.
When (2) focusing automatically, camera lens need be covered the focusing step number that sets, and just can find out best focus then, so focusing speed is slower, and can't reach the purpose of real " real-time focusing " at every turn.
(3) the focusing step number that sets according to camera lens of the degree of accuracy of existing focusing automatically what and decide; Under the situation of considering speed; Therefore usually can't set more focusing step number to camera lens, be difficult to camera lens is finely tuned, thereby have influence on the degree of accuracy of automatic focusing.
In sum, the weak point of the automatic focusing method existence of ccd image collection at present is: the purpose that does not reach real-time focusing; And be difficult to camera lens is finely tuned and then influenced the degree of accuracy of focusing; In addition, the focusing program design is unreasonable, causes unnecessary waste.
Summary of the invention
Technical matters to be solved by this invention provides a kind of in real time automatic focusing method, and this method can realize the purpose of focusing in real time; Thereby and can finely tune the degree of accuracy that improves focusing to camera lens; In addition, optimizer is saved resource.
For solving the problems of the technologies described above, the technical scheme that the present invention adopts is: a kind of in real time automatic focusing method is applicable in the camera head that the autofocus system of employing comprises focusing environment judging unit, comprises the following steps:
Whether
Figure 2011102861374100002DEST_PATH_IMAGE001
is changed by the focusing environment judgment unit judges focusing environment of real-time autofocus system;
Figure 456730DEST_PATH_IMAGE002
if yes; Then enabling counting device, and setting N=0; If not, CCD images acquired again then;
Figure 2011102861374100002DEST_PATH_IMAGE003
calculates correlative value by the resulting picture of CCD again;
Figure 571228DEST_PATH_IMAGE004
then equals (N+1) by this counter records cycle index;
judges that then whether this cycle index is greater than the global cycle number of times of being scheduled to;
Figure 242381DEST_PATH_IMAGE006
be not if; Then by the resulting picture of CCD, to calculate another correlative value; If yes, the step restarts then to get back to
Figure 415874DEST_PATH_IMAGE001
;
Figure 2011102861374100002DEST_PATH_IMAGE007
does comparison with this another correlative value and previous correlative value, to judge that whether this another correlative value is greater than previous correlative value;
Figure 426555DEST_PATH_IMAGE008
if yes, then drive unit drives camera lens and moves down; If, then drive unit driving camera lens does not move up;
Figure 2011102861374100002DEST_PATH_IMAGE009
is by this cycle index of counter records;
The circulation of
Figure 207560DEST_PATH_IMAGE010
repeating step
Figure 303692DEST_PATH_IMAGE001
~
Figure 77613DEST_PATH_IMAGE009
, up to this cycle index greater than the global cycle number of times of being scheduled to.
Preferably, said focusing environment judging unit comprises automatic exposure unit and AWB unit.
Preferably,
Figure 942801DEST_PATH_IMAGE008
said drive unit comprises motor and the piezo-electric device that is attached thereto in the step.
The present invention has following beneficial effect with respect to prior art:
1, the in real time automatic focusing method of the present invention is to order about camera lens according to the resulting image information of CCD to move toward correct direction, and focusing speed is fast, in real time focusing;
2, the present invention in real time automatically the focusing method through constantly camera lens being finely tuned, thereby increase the accuracy of focusing;
3, the in real time automatic focusing method of the present invention has been optimized the focusing program, compares with prior mechanical focusing method, and flexible movements reduce unnecessary waste simultaneously.
Description of drawings
Fig. 1 is the process flow diagram of the in real time automatic focusing method of the present invention.
Embodiment
Below in conjunction with embodiment and accompanying drawing the present invention is described in further detail, but embodiment of the present invention is not limited thereto.
As shown in Figure 1; A kind of in real time automatic focusing method; Be applicable in the camera head that this in real time automatic focusing method is in CCD images acquired process, the focusing environment judging unit real-time inspection environment through real-time autofocus system determines whether moving lens earlier; Again through calculating contrast and carrying out the moving direction that camera lens is relatively decided in front and back.The autofocus system that adopts comprises focusing environment judging unit, and this focusing environment judging unit comprises automatic exposure unit, AWB unit and other judgment means.
This method comprises the following steps:
Whether is changed by the focusing environment judgment unit judges focusing environment of real-time autofocus system;
Figure 976671DEST_PATH_IMAGE002
if yes; Then enabling counting device, and setting N=0; If not, CCD images acquired again then;
Figure 226387DEST_PATH_IMAGE003
calculates correlative value by the resulting picture of CCD again;
Figure 211660DEST_PATH_IMAGE004
then equals (N+1) by this counter records cycle index;
Figure 583736DEST_PATH_IMAGE005
judges that then whether this cycle index is greater than the global cycle number of times of being scheduled to;
Figure 654460DEST_PATH_IMAGE006
be not if; Then by the resulting picture of CCD, to calculate another correlative value; If yes, the step restarts then to get back to
Figure 707866DEST_PATH_IMAGE001
;
Figure 547646DEST_PATH_IMAGE007
does comparison with this another correlative value and previous correlative value, to judge that whether this another correlative value is greater than previous correlative value;
Figure 841356DEST_PATH_IMAGE008
if yes, then drive unit drives camera lens and moves down; If, then drive unit driving camera lens does not move up; Wherein, this drive unit comprises motor and the piezo-electric device that is attached thereto;
Figure 133797DEST_PATH_IMAGE009
is by this cycle index of counter records;
The circulation of repeating step
Figure 747498DEST_PATH_IMAGE001
~
Figure 399059DEST_PATH_IMAGE009
, up to this cycle index greater than the global cycle number of times of being scheduled to.
The foregoing description is merely preferred embodiment of the present invention, is not to be used for limiting practical range of the present invention.Be that all equalizations of doing according to content of the present invention change and modification, all contained by claim of the present invention scope required for protection.

Claims (3)

1. real-time automatically focusing method, the autofocus system of employing comprises focusing environment judging unit, it is characterized in that, comprises the following steps:
Whether is changed by the focusing environment judgment unit judges focusing environment of real-time autofocus system;
Figure 676850DEST_PATH_IMAGE002
if yes; Then enabling counting device, and setting N=0; If not, CCD images acquired again then;
calculates correlative value by the resulting picture of CCD again;
then equals (N+1) by this counter records cycle index;
Figure 992928DEST_PATH_IMAGE005
judges that then whether this cycle index is greater than the global cycle number of times of being scheduled to;
be not if; Then by the resulting picture of CCD, to calculate another correlative value; If yes, the step restarts then to get back to ;
Figure 111691DEST_PATH_IMAGE007
does comparison with this another correlative value and previous correlative value, to judge that whether this another correlative value is greater than previous correlative value;
Figure 883338DEST_PATH_IMAGE008
if yes, then drive unit drives camera lens and moves down; If, then drive unit driving camera lens does not move up;
Figure 896293DEST_PATH_IMAGE009
is by this cycle index of counter records;
The circulation of
Figure 778799DEST_PATH_IMAGE010
repeating step
Figure 448726DEST_PATH_IMAGE001
~ , up to this cycle index greater than the global cycle number of times of being scheduled to.
2. in real time automatic focusing method according to claim 1, it is characterized in that: said focusing environment judging unit comprises automatic exposure unit and AWB unit.
3. in real time automatic focusing method according to claim 1, it is characterized in that:
Figure 829209DEST_PATH_IMAGE008
said drive unit comprises motor and the piezo-electric device that is attached thereto in the step.
CN201110286137A 2011-09-24 2011-09-24 Real-time automatic focusing method Pending CN102331652A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110286137A CN102331652A (en) 2011-09-24 2011-09-24 Real-time automatic focusing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110286137A CN102331652A (en) 2011-09-24 2011-09-24 Real-time automatic focusing method

Publications (1)

Publication Number Publication Date
CN102331652A true CN102331652A (en) 2012-01-25

Family

ID=45483478

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110286137A Pending CN102331652A (en) 2011-09-24 2011-09-24 Real-time automatic focusing method

Country Status (1)

Country Link
CN (1) CN102331652A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105044879A (en) * 2014-04-30 2015-11-11 聚晶半导体股份有限公司 Automatic focusing system using multiple lenses and method thereof

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2255870A (en) * 1991-05-15 1992-11-18 Asahi Optical Co Ltd Automatic focusing
WO2004015476A1 (en) * 2002-08-07 2004-02-19 Matsushita Electric Industrial Co., Ltd. Focusing device
US20070047941A1 (en) * 2005-08-31 2007-03-01 Nikon Corporation Autofocus apparatus
CN101666957A (en) * 2008-09-01 2010-03-10 Juki株式会社 Automatic focal point regulation process in imaging apparatus
CN101729769A (en) * 2008-10-30 2010-06-09 奥林巴斯映像株式会社 Imaging apparatus

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2255870A (en) * 1991-05-15 1992-11-18 Asahi Optical Co Ltd Automatic focusing
US5664239A (en) * 1991-05-15 1997-09-02 Asahi Kogaku Kogyo Kabushiki Kaisha Automatic focusing apparatus
WO2004015476A1 (en) * 2002-08-07 2004-02-19 Matsushita Electric Industrial Co., Ltd. Focusing device
US20070047941A1 (en) * 2005-08-31 2007-03-01 Nikon Corporation Autofocus apparatus
CN101666957A (en) * 2008-09-01 2010-03-10 Juki株式会社 Automatic focal point regulation process in imaging apparatus
CN101729769A (en) * 2008-10-30 2010-06-09 奥林巴斯映像株式会社 Imaging apparatus

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105044879A (en) * 2014-04-30 2015-11-11 聚晶半导体股份有限公司 Automatic focusing system using multiple lenses and method thereof
CN105044879B (en) * 2014-04-30 2017-08-25 聚晶半导体股份有限公司 Automatic focusing system using multiple lenses and method thereof

Similar Documents

Publication Publication Date Title
CN111650210B (en) Burr detection method and detection system for high-speed high-precision lithium ion battery pole piece
RU2012104012A (en) DEVICE AND METHOD FOR PRODUCING AN IMAGE
CN107529011A (en) A kind of motorized zoom lenses control system and method
RU2008136813A (en) IMAGE FORMING DEVICE, METHOD FOR MANAGING THE IMAGE FORMING DEVICE AND COMPUTER PROGRAM
CN1450398A (en) Image pick up apparatus and camera system thereof
GB2506084A (en) Image pickup apparatus,control method thereof, and program
CN103217854B (en) Camera system and Atomatic focusing method
CN109889721A (en) Camera autofocus control method and device
CN105430277B (en) Autofocus control method and device
CN102855476A (en) Self-adaptive binocular iris synchronous collection system of single image sensor
CN108012146A (en) Virtual image distance detection method and equipment
JP2012160785A5 (en)
CN203027358U (en) Adaptive sight line tracking system
CN103544714A (en) Visual tracking system and method based on high-speed image sensor
RU2014110041A (en) IMAGE CAPTURE DEVICE, METHOD FOR MANAGING THIS DEVICE AND PROGRAM
CN103809348B (en) It is applied to the automatic focusing method of camera model
CN103327244A (en) Shooting focusing method and device based on angular velocity detection
CN102122055A (en) Laser-type automatic focusing device and focusing method thereof
CN105981362A (en) Method for obtaining a picture and multi-camera system
CN102305595A (en) Method for automatically detecting spring pitch by using mechanical vision system
CN102303018B (en) Method for automatically detecting burrs of injector steel needles by using machine vision system
CN108156359A (en) Intelligent industrial camera
CN103837828A (en) Travel curve test method and system of camera-shooting mode motor and mobile terminal
CN104614803A (en) ARM-based integrated polarization maintaining fiber axis positioning instrument
CN202196428U (en) Single image sensor self-adaptive binocular iris synchronous acquisition system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20120125