A kind of camera control apparatus of plate quality somascope and control method thereof
Technical field
The invention belongs to plate quality inspection apparatus technical field, particularly a kind of camera control apparatus of plate quality somascope and control method thereof.
Background technology
After the large scale forme workpiece manufactures such as money forme complete, need to utilize the quality of plate quality somascope to forme to check.When checking, first forme being fixed on worktable, then controlling camera motion by camera control apparatus, making camera carry out two-dimensional scan campaign relative to worktable along X, Y direction; In motion process, camera is taken pictures to forme every fixing distance, and realize taking pictures and measuring whole workpiece, therefore the image measuring system of large scale forme workpiece must be equipped with corresponding camera control apparatus.
The camera control apparatus of existing plate quality somascope, as Chinese periodical document " the image measurer Design of Motion Control System based on GALIL " (Pei Qionghua, manufacturing informatization, 7th phase in 2009), disclose a kind of image measurer kinetic control system, the form of " Industrial Control Computer+motion control card " is adopted to build, data and motion state display is completed by human-computer interaction interface, the tasks such as servocontrol and accurately location, namely this kinetic control system adopts touch-screen/motion controller, with two terminal scheme of computing machine/opc server/motion controller, and adopt stepping motor as servo driving element, grating scale is as feedback element, and the feedback signal of grating scale sends GALIL card to by terminal strip, after the compensation operation of GALIL card, send compensated pulse to servo-drive system, form a closed-loop control system.
But, there is following shortcoming in above-mentioned image measurer kinetic control system: 1. this system is when camera is taken pictures, adopt unified parameter of taking pictures, in operational process by light source Chang Liang, camera keeps taking pictures and dynamic conditioning is taken pictures parameter, but because the figure line content of forme is different, the position for forme is different is needed to adopt different parameters of taking pictures, and part forme to be checked can not by light source long-term irradiation, therefore no matter this system adopts which kind of mode above-mentioned, the effect of capital impact shooting, and then affect forme detection; 2. this system can not adjust camera site and angle in real time, and in practical application, when taking pictures scanning to multiple batches of forme workpiece, due to operating personnel cannot ensure the putting position of each workpiece and angle completely the same, and the position of workpiece and angle also can be subject to Automatic manual transmission Accuracy, if adopt above-mentioned image measurer kinetic control system, its camera site and angle can not carry out real-time change according to different workpieces, the seamless spliced precision of successive image will be caused not high, and then affect the detection of plate quality.
Summary of the invention
For this reason, technical matters to be solved by this invention is the image measurer kinetic control system of prior art, shooting effect is bad, affect the problem that plate quality detects, and provide a kind of shooting effect good and do not affect camera control apparatus and the control method thereof of forme to be checked, there is provided one can adjust camera site and angle in real time according to different workpieces further, make the seamless spliced precision of successive image high, guarantee that plate quality detects the camera control apparatus and control method thereof normally carried out.
For solving the problems of the technologies described above, the technical solution used in the present invention is as follows:
A camera control method for plate quality somascope, comprises the following steps,
1. control module accepts the steering order of control terminal, drives the camera control apparatus of plate quality somascope to run;
2. described control module moves to assigned address by camera motion control module drives camera, in real time the physical location of described camera is transferred to described control module by camera position monitoring modular simultaneously;
3., when described camera is about to arrive default picture-taking position, described control module triggers light source igniting and triggers described camera and takes pictures according to the parameter of regulation;
4. after taking pictures, described control module process shot image also calculates correct camera exposure parameter as parameter of taking pictures next time, adjusts the movement velocity of described camera in real time simultaneously, makes described camera continue to preset picture-taking position motion to the next one;
5., when described camera is about to arrive next default picture-taking position, described control module triggers light source igniting and triggers described camera and takes pictures according to the correct parameter calculated;
6. step is repeated 4. to 5., until take complete.
In above-mentioned camera control method, described step 2. and 4. in also comprise, carry out in the process of moving at described camera along setting track, precision of images aiming is carried out at the starting point place of each line scanning, by described collected by camera to view data carry out real-time comparison with the template data of the standard forme to collect in advance, calculate described camera current kinetic position, the deviation of angle and standard form data acquiring location and angle, described control module recalculates sweep starting point and the scanning motion angle of this row according to these data, and carry out secondary aligning at sweep starting point place, make the camera site of current line consistent with template data with angle.
In above-mentioned camera control method, the described track that sets is as " bow " zag trajectory.
In above-mentioned camera control method, after described step 6., also comprise described control module clapped multiple image is carried out seamless spliced and shows, the step that the seamless scanning realizing forme is taken pictures.
Adopt a camera control apparatus for the plate quality somascope of above-mentioned camera control method, comprise
Control module, controls the operation of described camera control apparatus;
Control terminal, is electrically connected with described control module, for receiving and the steering order of transmission user;
Camera motion control module, is electrically connected with described control module, moves to assigned address for drives camera;
Camera position monitoring modular, is electrically connected with described control module, the physical location of camera described in Real-Time Monitoring;
Described control module comprises the computing machine and motion controller that are built-in with Multi-axis motion control card; Under the control of described motion controller, described camera motion control module drives described camera motion; Described Multi-axis motion control card is by the physical location of camera described in described camera position monitoring modular Real-Time Monitoring, and when described camera is about to arrive default picture-taking position, described Multi-axis motion control card triggers light source igniting and triggers described camera and takes pictures with the parameter of regulation; After taking pictures, described computer disposal shot image also calculates correct camera exposure parameter as parameter of taking pictures next time, and described motion controller adjusts the movement velocity of described camera in real time simultaneously, makes described camera continue to preset picture-taking position motion to the next one; When described camera is about to arrive next default picture-taking position, described Multi-axis motion control card triggers light source igniting and triggers described camera and takes pictures with the correct parameter calculated.
In the camera control apparatus of above-mentioned plate quality somascope, described camera motion control module comprises X-axis servomotor and scrambler and Y-axis servomotor and scrambler.
In the camera control apparatus of above-mentioned plate quality somascope, described control terminal comprises graphic control panel and computing machine.
In the camera control apparatus of above-mentioned plate quality somascope, described camera position measurement module comprises X-axis grating scale and Y-axis grating scale.
In the camera control apparatus of above-mentioned plate quality somascope, described computing machine carries out communication by opc server and described motion controller.
Technique scheme of the present invention has the following advantages compared to existing technology:
(1) camera control apparatus of plate quality somascope provided by the invention and control method thereof, have employed two triggering shooting technologies of taking pictures based on camera real time position, take pictures parameter and kinematic parameter of camera can carry out dynamic conditioning according to version line content, when light source not prolonged exposure forme, taken pictures by first time and calculate correct take pictures parameter and kinematic parameter, and upper once trigger time carry out forme with correct parameter and take pictures, realize taking pictures to the dynamic parameter of the whole space of a whole page of forme, do not affect forme to be measured, and shooting effect is good.
(2) camera control apparatus of plate quality somascope provided by the invention and control method thereof, image high precision point technique is adopted when carrying out two-dimensional scan, camera position during a line shooting every according to template data dynamic conditioning and movement angle, correct for because the decline movement position that causes and angle of forme putting position and angle change or mechanical precision changes the impact brought, increased substantially the precision of forme two-dimensional scan.
(3) camera control apparatus of plate quality somascope provided by the invention and control method thereof, employ graphic control panel and computing machine simultaneously, realize the two terminal controls to camera motion, enable operating personnel carry out true-time operation near worktable; When adopting graphic control panel as control terminal, graphic control panel directly can control camera motion by motion controller, realizes movement velocity and controls, manual crawl, absolute coordinates moves, and detected state switches, and suddenly stops, failure reset, control switches, the functions such as motion state display; After motion control power is switched to computing machine by graphic control panel, can carry out manual crawl by computing machine, definitely/relative coordinate moves, path programmable movement, movement velocity controls, the functions such as motion state display, thus realizes the two terminal control of graphic control panel/computing machine.
(4) camera control apparatus of plate quality somascope provided by the invention and control method thereof, the data of scrambler are adopted to carry out motion control, and computing machine obtains X by the Multi-axis motion control card be arranged in main frame, the real time data of Y-axis grating scale, camera coordinates position is accurately measured, and the function possessed in grating scale arbitrfary point reading zero, system adopt two independently position transducer (scrambler and high precision grating scale) carry out position control and the position measurement of camera respectively, positional accuracy measurement and position control accuracy are independent of each other, eliminate dynamic error and static error that servo-drive system produces in the course of the work.
(5) camera control apparatus of plate quality somascope provided by the invention and control method thereof, in the breadth of 800 × 600mm, camera position control accuracy 0.01mm, camera position measuring accuracy reaches 0.0025mm; Secondary based on grating scale position triggers shooting technology, achieves according to forme space of a whole page actual conditions dynamic conditioning camera exposure parameter; Camera position secondary aims at and the real-time adjustment technology of motion path, and carry out camera position control by image point technique is auxiliary, achieve when carrying out plates images and template image comparison, camera site is completely consistent with direction.
Accompanying drawing explanation
In order to make content of the present invention be more likely to be clearly understood, below according to a particular embodiment of the invention and by reference to the accompanying drawings, the present invention is further detailed explanation, wherein
Fig. 1 is the schematic diagram of the camera control apparatus of plate quality somascope of the present invention;
Fig. 2 is that the camera control apparatus of plate quality somascope of the present invention carries out according to template data the schematic diagram that secondary aims at also dynamic conditioning movement angle;
Fig. 3 is that the camera control apparatus camera fixed point triggering of plate quality somascope of the present invention is taken pictures schematic diagram;
Fig. 4 is the electrical connection schematic diagram of the camera control apparatus of plate quality somascope of the present invention.
In figure, Reference numeral is expressed as: 1-motion controller, 2-X axle servomotor and scrambler, 3-Y axle servomotor and scrambler, 4-X axle grating scale, 5-Y axle grating scale, 6-measuring table, 7-computing machine, 8-OPC server, 9-graphic control panel, 10-camera.
Embodiment
The camera control apparatus of plate quality somascope provided by the invention and control method thereof are used for the detection of sample money forme, described sample money forme is placed on after on measuring table 6, need to take pictures, camera is under the control of camera control apparatus, every fixing distance, described sample money forme is taken pictures, then carry out subsequent operation.
As Figure 1-4, the camera control apparatus of described plate quality somascope, comprises control module, control terminal, camera motion control module and camera position detection module.
Described control module, for controlling the operation of described camera control apparatus, comprise the computing machine 7 and motion controller 1 that are built-in with Multi-axis motion control card, described Multi-axis motion control card is built in the main frame of computing machine 7, the real-time coordinates of camera 10 (comprising camera body and assembly thereof) is sent to described computing machine 7 by pci bus by described Multi-axis motion control card, by shielded cable, external trigger photographing signals is sent to described camera 10 and light source simultaneously.Under the control of described motion controller 1, described camera motion control module drives described camera 10 to move, described Multi-axis motion control card is by the physical location of camera 10 described in described camera position monitoring modular Real-Time Monitoring, when described camera 10 is about to arrive default picture-taking position, described Multi-axis motion control card triggers light source igniting and triggers described camera 10 and takes pictures according to the parameter of regulation; After taking pictures, described computing machine 7 processes shot image and calculates correct camera exposure parameter as parameter of taking pictures next time, described motion controller 1 adjusts the movement velocity of described camera 10 in real time simultaneously, makes described camera 10 continue to preset picture-taking position motion to the next one; When described camera 10 is about to arrive next default picture-taking position, described Multi-axis motion control card triggers light source igniting and triggers described camera 10 and takes pictures according to the correct parameter calculated.
Described control terminal, is electrically connected with described control module, for receiving and the steering order of transmission user.Described control terminal comprises graphic control panel 9 and described computing machine 7, and described movement controller 1, by PROFIBUS industrial field bus and described graphic control panel 9, accepts the real-time control of touch-screen.Described computing machine 7 carries out communication by opc server 8 (the English full name of OPC is OLEforProcessControl) and described motion controller 1; Described motion controller 1 is connected with described opc server 8 by industrial netting twine (5 class line) simultaneously, described computing machine 7 is connected with described opc server 8 by industrial netting twine (5 class line), thus control described motion controller 1 by intended trajectory motion, and import the start point data after the adjustment calculated and direction of motion data into described motion controller 1.
Described camera motion control module, is electrically connected with described control module, moves to assigned address for drives camera 10.Described camera motion control module comprises X-axis servomotor and scrambler 2 and Y-axis servomotor and scrambler 3; Connected by PROFIBUS industrial field bus between described X-axis servomotor and scrambler 2, described Y-axis servomotor and scrambler 3 and described motion controller 1.
Described camera position monitoring modular, is electrically connected with described control module, the physical location of camera 10 described in Real-Time Monitoring.Described camera position measurement module comprises the X-axis grating scale 4 and Y-axis grating scale 5 respectively installed along X, Y direction respectively, described X-axis grating scale 4 and described Y-axis grating scale 5 all adopt high precision grating scale, and described X-axis grating scale 4 is all connected with described Multi-axis motion control card by shielded cable with described Y-axis grating scale 5.
The camera control apparatus of described plate quality somascope of the present invention, its concrete camera control method comprises the following steps:
1. described control module accepts the steering order of described control terminal, drives the camera control apparatus of plate quality somascope to run.
In the present embodiment, adopt described graphic control panel 9 as described control terminal, described graphic control panel 9 can directly control servomotor motion by described motion controller 1, and described in the path clustering that described computing machine 7 can be specified according to user, camera 10 moves.Described computing machine 7 calculates the picture-taking position of described camera 10 according to user's requirement and imports data into described Multi-axis motion control card.
2. described control module moves to assigned address by described camera motion control module drives camera 10, in real time the physical location of described camera 10 is transferred to described control module by described camera position monitoring modular simultaneously.
Under the control of described motion controller 1, described X-axis motor and encoded servo device 2 and described y-axis motor and encoded servo device 3 drive described camera 10 to move along X, Y-direction; Described computing machine 7 obtains the real time data of described X-axis grating scale 4 and described Y-axis grating scale 5 by the described Multi-axis motion control card be arranged in main frame, thus realizes the accurate measurement to camera position.
Carry out in the process of moving at described camera 10 along setting track, the aiming of image high precision is carried out at the starting point place of each line scanning, namely secondary location is carried out, the view data collected by described camera 10 carries out real-time comparison with the template data of the standard forme collected in advance, calculate camera current kinetic position, the deviation of angle and standard form data acquiring location and angle, described control module recalculates sweep starting point and the scanning motion angle of this row according to these data, and carry out secondary aligning at sweep starting point place, i.e. dynamic conditioning motion starting point and direction of motion, guarantee the accuracy in motion reference position and direction, make the camera site of current line consistent with template data with angle.In the present embodiment, the described track that sets is as " bow " zag trajectory.
3., when described camera 10 is about to arrive default picture-taking position, described control module triggers light source igniting and triggers described camera 10 and takes pictures according to the parameter of regulation.
In the moving process of described camera 10, described Multi-axis motion control card constantly reads the position data of the described camera 10 on described X-axis grating scale 4 and described Y-axis grating scale 5, when the physical location of described camera 10 is about to arrive picture-taking position, described Multi-axis motion control card sends start pulse signal (TTL+5v) of taking pictures for the first time, trigger light source igniting, and trigger simultaneously described camera 10 according to regulation parameter take pictures.
4. after taking pictures, described computing machine 7 processes shot image and calculates correct camera exposure parameter as parameter of taking pictures next time, adjusts the movement velocity of described camera 10 in real time simultaneously, makes described camera 10 continue to preset picture-taking position motion to the next one.
Carry out in the process of moving at described camera 10 along setting track, the aiming of image high precision is carried out at the starting point place of each line scanning, namely secondary location is carried out, the view data collected by described camera 10 carries out real-time comparison with the template data of the standard forme collected in advance, calculate camera current kinetic position, the deviation of angle and standard form data acquiring location and angle, described control module recalculates sweep starting point and the scanning motion angle of this row according to these data, and carry out secondary aligning at sweep starting point place, i.e. dynamic conditioning motion starting point and direction of motion, guarantee the accuracy in motion reference position and direction, make the camera site of current line consistent with template data with angle.In the present embodiment, the described track that sets is as " bow " zag trajectory.
5., when described camera 10 is about to arrive next default picture-taking position, described control module triggers light source igniting and triggers described camera 10 and takes pictures according to the correct parameter calculated.
When the physical location of described camera 10 arrives picture-taking position, described Multi-axis motion control card sends start pulse signal of taking pictures again, again triggers light source igniting, and triggers described camera 10 simultaneously and take pictures according to the parameter calculated.
6. step is repeated 4. to 5., until take complete.
7. after having taken pictures, clapped multiple image carries out seamless spliced and shows on the computer screen by described control module, and the seamless scanning realizing forme is taken pictures.
Obviously, above-described embodiment is only for clearly example being described, and the restriction not to embodiment.For those of ordinary skill in the field, can also make other changes in different forms on the basis of the above description.Here exhaustive without the need to also giving all embodiments.And thus the apparent change of extending out or variation be still among the protection domain of the invention.