The traditional camera autofocus system and the method for focusing automatically thereof
Technical field
The present invention is relevant for a kind of traditional camera autofocus system and the method for focusing automatically thereof, especially refer to a kind of action that utilizes simple calculation machine interface to finish automatic focusing, and can test automatically oppositely poor, judge automatically and store data and by the traditional camera autofocus system of EXECL tabular analysis and the method for focusing automatically thereof.
Background technology
Generally speaking, focusing is exactly to take thing to pass through moving of camera lens, to obtain imaging the most clearly.That is, the optical system of camera is as the design starting point with the infinite distance, the front and back group who behind the planar development is exactly machinery moves, polar biased meter radar (the Polarimetric Radar that utilizes electronics to use, PR) detection signal, move to preposition to drive zoom lens (ZOOM) motor, electronic section is exactly that the stepping (step) of control step motor is to reach the position of articulation point.Yet, known because of adopting the human eye focusing, produce the shortcoming that the focusing error is big, the camera focusing time is long and equipment requirements is many, employee's long working is easily tired.
See also shown in Figure 1ly, it is the process flow diagram of known focusing method.As seen from the figure, its step includes: at first, utilize the PR detection signal, move to preposition (S100) to drive the zoom lens motor; Utilize human eye, with the stepping of control step motor to reach the position (S102) of articulation point.
As from the foregoing, the above-mentioned known traditional camera autofocus system and the method for focusing automatically thereof on reality is used, obviously have inconvenience and exist with defective, and can treat in addition improver.
Summary of the invention
Fundamental purpose of the present invention provides a kind of traditional camera autofocus system and the method for focusing automatically thereof, it integrates host computer, slave computer, focusing machine, pneumatic switch and image capture unit, finish the action of automatic focusing to utilize simple calculation machine interface, and can test automatically oppositely poor, automatically judge and store data, and by the EXECL form so that analyze, with reach automaticity height, focusing accurately, and the good purpose of fiduciary level.
To achieve the above object, the invention provides a kind of traditional camera autofocus system, include: host computer, be connected with this slave computer, have control program, in order to when a focusing instruction of this control program is touched, receive this focusing instruction; The focusing machine is connected in this host computer and this slave computer, carries out computing in order to pass focus data to this host computer back, to produce the focus data of proofreading and correct; Image capture unit is connected in this slave computer; Pneumatic switch is connected in this slave computer, is driven by the focusing instruction that reaches slave computer, in order to locate this image capture unit; Wherein, transmit the theoretical focal point position data to this image capture unit by this host computer by this slave computer, send it back induction signal to this host computer by this image capture unit by this slave computer, transmit a focusing instruction to this focusing machine by this host computer, to carry out the focusing of this image capture unit, the focus data that transmits this correction by this slave computer by this host computer is to this image capture unit, with the affirmation of the focusing of carrying out this image capture unit.
According to design of the present invention, this host computer is one to be used for the computing machine of keyholed back plate and deal with data.
According to design of the present invention, this host computer further includes a control program that utilizes program language to write.
According to design of the present invention, this program language is the VB program language under the Microsoft EXCEL interface.
According to design of the present invention, this slave computer is an I/F tool.
According to design of the present invention, this image capture unit is a camera.
According to design of the present invention, this focusing machine further is connected to this host computer and this slave computer by RS232 port and RS232 port.
To achieve the above object, the invention provides a kind of automatic focusing method of traditional camera autofocus system, its step includes: at first, provide a host computer with control program; Then, touch the focusing instruction of this control program, make this focusing instruction reach a slave computer that is connected with this host computer; Then,, be connected in the pneumatic switch of this slave computer, and locate an image capture unit that is connected in this slave computer in order to drive one by this focusing instruction that reaches slave computer; Continue, pass through this slave computer, to transmit the theoretical focal point position data to this image capture unit by this host computer.
Then, pass through this slave computer by this image capture unit, to send it back induction signal to this host computer; Then, by this host computer, be connected in the focusing machine of this slave computer to transmit the focusing instruction to one, and carry out the focusing of this image capture unit; Next,, carry out computing, and produce the focus data of proofreading and correct to pass focus data to this host computer back by this focusing machine; At last, by this slave computer, to this image capture unit, and carry out the affirmation of the focusing of this image capture unit by this host computer with the focus data that transmits this correction.
According to design of the present invention, this focus data that transmits this correction further includes to the step of this image capture unit: judge focusing situation and storage focusing data automatically.
According to design of the present invention, this is judged automatically in the step of focusing situation, further includes: judgement focusing situation is then warned generation problem part automatically if any problem.
Description of drawings
Reach technology, means and the effect that predetermined purpose is taked in order further to understand the present invention, see also following about detailed description of the present invention and accompanying drawing, believe purpose of the present invention, feature and characteristics, go deep into and concrete understanding when getting one thus, yet appended accompanying drawing only provides reference and explanation usefulness, is not to be used for the present invention is limited.
Fig. 1 is the process flow diagram of known focusing method;
Fig. 2 is the synoptic diagram of traditional camera autofocus system of the present invention; And
Fig. 3 is the process flow diagram of the automatic focusing method of traditional camera autofocus system of the present invention;
Wherein, description of reference numerals is as follows:
The 1-host computer; The 2-slave computer; The 3-machine of focusing; 4; Pneumatic switch; The 5-image capture unit.
Embodiment
See also shown in Figure 2ly, it is for the synoptic diagram of traditional camera autofocus system of the present invention.By among the figure as can be known, the invention provides a kind of traditional camera autofocus system, include: host computer 1, slave computer 2, focusing machine 3, pneumatic switch 4 and image capture unit 5.
Wherein, this host computer 1 is one to be used for the computing machine of keyholed back plate and deal with data, and this host computer 1 further includes a control program that utilizes program language to write, and this program language is the VB under the MicrosoftEXCEL interface (Visual Basic) program language.
In addition, this slave computer 2 is connected in this host computer 1, be used to receive the instruction of this host computer 1, and this slave computer is an I/F (ITA/FIXTURE) tool, this focusing machine 3 is connected to this host computer and this slave computer by RS232 port (PORT) and RS232 port (PORT).This pneumatic switch 4 is connected in this slave computer 2, reach this image capture unit 5 and be connected in this slave computer 2, and this image capture unit 5 is a camera.
See also shown in Figure 3ly, it is the process flow diagram of the automatic focusing method of traditional camera autofocus system of the present invention.As seen from the figure, its step includes: at first, provide a host computer 1 (S200) with control program; Then, touch the focusing instruction of this control program, make this focusing instruction reach a slave computer 2 (S202) that is connected with this host computer 1; Then,, be connected in the pneumatic switch 4 of this slave computer 2, and locate an image capture unit 5 (S204) that is connected in this slave computer 2 in order to drive one by this focusing instruction that reaches slave computer 2; Continue, pass through this slave computer 2, to transmit the theoretical focal point position data to this image capture unit 5 (S206) by this host computer 1.
Then, pass through this slave computer 2 by this image capture unit 5, to send it back induction signal to this host computer 1 (S208); Then, by this host computer 1, be connected in the focusing machine 3 of this slave computer 2 to transmit the focusing instruction to one, and carry out the focusing (S210) of this image capture unit 5; Next,, carry out computing, and produce the focus data (S212) of proofreading and correct to pass focus data to this host computer 1 back by this focusing machine 3; At last, by this slave computer 2, to this image capture unit 5, and carry out the affirmation (S214) of the focusing of this image capture unit 5 by this host computer 1 with the focus data that transmits this correction.
In addition, this focus data that transmits this correction further includes to the step of this image capture unit: judge focusing situation and storage focusing data automatically; Then, judgement focusing situation is then warned generation problem part automatically if any problem.
That is this slave computer 2 connects this focusing machine 3 and this pneumatic switch 4.And program is opened pneumatic means 4 with the location camera, slave computer 2 by probe with camera communication.Computing machine is as interactive amboceptor, and computing machine biconditional operation person gets in touch and uses keyboard or mouse.The flicking keyboard " ENTER " button or click the mouse slightly, camera is focused automatically, directly after finishing movingly judges and storage, if there is problem in system, can report to the police automatically, and tell fault there, is convenient in time fix a breakdown.Software section: consider man-machine conversation, computing machine is write with VB, and writes with the VB of EXECL interface, and the entire process data are considered at computing machine, the calculation function of performance computing machine.Single-chip microcomputer C51 is as to the compiling and the parsing of computer instruction, instruction pneumatic part, focusing machine, the associative operation of camera.Use the C language compilation, clear in structure is revised easily and is transplanted, and this system largely depends on software systems, and slave computer 2 adopts 89C52 as master control, J6﹠amp; J7﹠amp; GND connects RS232CON1﹠amp; CON2 connects pneumatic switch.FB_PRINT connects the focusing machine.WUP, CSI, CSO, MKB, SCLK connect the camera probe.
Host computer adopts ibm computer, realization is to the centralized control and the data processing of total system, adopt the higher level lanquage VB (VISUAL BASIC) of object-oriented (Object-oriented Program) to weave into, make full use of the good effect of visualization of VB under the EXECL, GUI (Graphic User Interface) close friend, has good operability, readability.Slave computer 2 is made up of the AT89C51 single-chip microcomputer, realizes data collection task, realizes the part control function.Slave computer adopts Keil C51 programming, and modularity is strong, has good readability, portability, the convenient maintenance of system later on.
In addition, the focusing principle is: the source of parallel light of simulation infinite distance, by black and white figure (chart) at interval, camera is gone to the position (camera lens runs N step) of theoretical infinite distance, open front shutter, with photosensitive coupling component (CCD) emulation egative film face, stepper motor moves CCD, utilize CCD to sense black white contrast, thereby the maximal value present position of contrast is the focal position of camera lens as can be known, corresponding is exactly the stepping (step) of stepper motor, the stepping (step) during infinite distance that calculating can get camera.The electronics that data are write camera erase the formula ROM (read-only memory) (Electrically Erasable ProgrammableRead-Only Memory, EEPROM)
Set up the communication protocol of each system, computing machine is connected with the focusing machine with slave computer by 2 232PORT, and the RS232 coverage is 10m, strong interference immunity.Computer interface is by the focusing button, and computing machine is opened PORT1 (figure does not show), and with slave computer 2 communications, slave computer 2 is complied with the instruction action, 4 actions of instruction pneumatic switch, and camera is fixed on the slave computer 2.Computing machine reaches slave computer 2 with the theoretical focal point position data, and slave computer 2 is passed to camera with the data of receiving.The computer instruction focusing, as wide-angle (WIDE), after slave computer 2 is received instruction, the gross data of WIDE is put into camera assigned address (Address), camera lens reaches WIDE earlier, reach position, theoretical infinite distance according to data again, the induction signal that makes sound is notified computing machine, calculates machine-operated PORT 1, opens PROT 2 (figure does not show), the motor-driven work of slave computer 2 instruction focusings, focusing machine 3 is passed to computing machine with data, and computing machine carries out computing with data, and the data of adjusting are passed to slave computer 2, slave computer 2 is write data the EEPROM of phase modifier again, remakes the confirming operation of once focusing.Using such method all obtains accordingly to coke number for every section.
In sum, the traditional camera autofocus system of the present invention and the method for focusing automatically thereof, not only integrate host computer 1, slave computer 2, focusing machine 3, pneumatic switch 4 and image capture unit 5, and utilize simple calculation machine interface to finish the action of automatic focusing, and can test automatically oppositely poor, automatically judge and store data, and by the EXECL form so that the advantage of analyzing.
The above; only be the detailed description and the accompanying drawing of the specific embodiment of one of the best of the present invention; feature of the present invention is not limited thereto; be not in order to restriction the present invention; all scopes of the present invention should be as the criterion with the scope that following claim is asked for protection; all closing in the embodiment of spirit of the present invention variation similar with it; all should be contained in the protection category of the present invention; anyly be familiar with this operator in the field of the invention, can think easily and variation or modify all can be encompassed within protection scope of the present invention.