Calibration method of binocular vision measurement technology
Technical Field
The invention relates to the technical field of measurement, in particular to a calibration method of a binocular vision measurement technology.
Background
In recent years, computer vision has become a research hotspot in the computer field, and the tracking of moving objects as an important component of computer vision is also receiving more and more attention, and the application field of the tracking of moving objects is expanded to video monitoring systems, vehicle tracking, abnormal behavior detection and alarm, image compression and encoding technologies and the like. The moving object tracking method mainly comprises Kalman filtering, Mean-shift, Camshift algorithm, particle filter, Snake model and the like. Moving object tracking has been gradually applied to our real life, and is one of the key technologies for promoting the intelligent process.
The moving object tracking method is a method for accurately tracking the moving state of a moving object in a three-dimensional space, can be used for analyzing the motion attributes of the moving object such as motion trail, motion speed, acceleration, attitude and the like, has wide application in the fields of scientific research, automobile industry, aerospace and the like, and is a popular direction of domestic and foreign research in recent years. The moving object tracking method based on the binocular stereo vision measurement technology plays an increasingly important role in the moving object tracking direction due to the advantages of high precision, non-contact, high efficiency and the like.
In the existing moving object tracking method based on the binocular stereo vision measurement technology, two cameras with the same specification are generally adopted to form a group of binocular vision systems. The two same cameras acquire images of a moving object, and motion parameters of the object are acquired through image processing, corresponding point matching and three-dimensional reconstruction, so that the moving object is tracked. However, the existing binocular stereo vision measurement technology is often directly used during measurement, and when a moving object is in a complex working condition such as overhigh or overlow temperature and humidity, dazzling light intensity and insufficient light, due to the fact that calibration is not carried out before measurement, the imaging effect of a camera is often poor, and further the measurement accuracy is poor.
Disclosure of Invention
The invention aims to solve the problems in the prior art and provides a calibration method of a binocular vision measurement technology.
In order to achieve the purpose, the technical scheme adopted by the invention is as follows:
a calibration method of binocular vision measurement technology is characterized by comprising the following steps:
step 1: the two sets of camera components are respectively fixed on the beam through the electric control rotating device, a target with a size appropriate to the size of the measured object is arranged in the lens direction of the camera components, and then the controller controls the electric control rotating device to adjust the angle between the camera components and the target and focus;
step 2: the controller inquires and reads working environment parameters of the camera shooting assembly through the temperature and humidity compensation assembly, and if the working environment parameters of the camera shooting assembly are located outside a set threshold value, the controller adjusts the current working environment parameters to the set threshold value through the temperature and humidity compensation assembly;
and step 3: adjusting the illuminance of an image acquisition area corresponding to the camera shooting assembly on the target by adopting a light supplementing lighting device to enable the illuminance of the image acquisition area corresponding to the target to reach a set value;
and 4, step 4: the controller controls the camera shooting assembly to collect a target image, and observes whether the collected image is clear and complete, and if the collected image is not clear and complete, the angle and the illuminance between the camera shooting assembly and the target are adjusted until the clear and complete image is obtained;
and 5: and adjusting the position and the angle of the target, and respectively acquiring images until clear and complete images are obtained at different positions and different angles, thereby completing calibration.
In the calibration method, the distance between the camera assembly and the target is calculated by the following formula:
N=(D+d)*cos(θ/2)
the distance between the two sets of camera assemblies is calculated by the following formula:
M=2*(D+d)*sin(θ/2)
n is the distance between subassembly and the target of making a video recording in the formula, and M is the distance between two sets of subassemblies of making a video recording, and D is the distance of camera lens to the crossbeam, and D is the distance that single subassembly of making a video recording can be collected completely and measure the breadth, and theta is the contained angle that forms between two sets of subassemblies of making a video recording and the target, and M and N are all upwards got the integer.
And in the step 2, the set threshold value of the working environment parameter of the camera shooting assembly is 0-50 ℃.
The setting value of the illuminance in the step 3 is 1000-.
The controller comprises a control host, a control panel and a drive plate, the control panel comprises a first processing module, an extension storage module and a camera trigger control module used for being connected with the camera shooting assembly, the drive plate comprises a second processing module, an electric control rotating table driving module, a temperature and humidity acquisition module, a semiconductor refrigerator driving module and a light supplement control driving module, the first processing module is respectively connected with the control host, the camera trigger control module, the extension storage module and the second processing module, the second processing module is connected with an electric control rotating device through the electric control rotating table driving module, the second processing module is connected with the temperature and humidity compensation assembly through the temperature and humidity acquisition module and the semiconductor refrigerator driving module, and the second processing module is connected with the light supplement illuminating device through the light supplement control driving module.
The electronic control rotating device comprises a base, a rotating bearing and an electronic control rotating platform, the base is fixed on the cross beam, the rotating bearing is fixed on the base, the electronic control rotating platform is installed on the rotating bearing and connected with a driving module of the electronic control rotating platform, and the temperature and humidity compensation assembly is fixed on the electronic control rotating platform.
The electronic control rotating platform is also fixedly provided with a protection assembly, the protection assembly comprises a box body with a box cover, the camera shooting assembly is fixed in the box body through the electronic control rotating platform, one end of the box body is provided with a lens hole, and a sealing ring, an optical filter and a lens sheath are fixed at the lens hole; the upper part of the other end of the box body is provided with two radiating fins, the lower part of the other end of the box body is provided with a wiring hole, a sealing base is fixed at the wiring hole, a sealing frame is fixed on the sealing base, and a wire diameter sealing module is fixed in the sealing frame; the temperature and humidity compensation assembly comprises a semiconductor refrigerator and a temperature and humidity sensor, the semiconductor refrigerator and the temperature and humidity sensor are both fixed between the radiating fins, and the semiconductor refrigerator and the temperature and humidity sensor are respectively connected with the semiconductor refrigerator driving module and the temperature and humidity acquisition module.
The light supplementing lighting device comprises a base, a housing, a horizontal rotating mechanism, a vertical turnover mechanism and a light supplementing lighting assembly, wherein the base is fixed on the cross beam and is positioned between the two sets of camera assemblies; the vertical turnover mechanism is arranged above the housing through the horizontal rotating mechanism, and the light supplementing and illuminating assembly is arranged on the vertical turnover mechanism; the light supplementing control driving module comprises a light control driving module, a rotating motor driving module and an overturning motor driving module, and the horizontal rotating mechanism, the vertical overturning mechanism and the light supplementing lighting assembly are respectively connected with the rotating motor driving module, the overturning motor driving module and the light control driving module.
Horizontal rotating mechanism includes the rotating electrical machines, first photoelectric switch, the mounting bracket, the bearing ring, from gear shaft and master gear shaft, the mounting bracket symmetry is fixed on housing upper portion, the rotating electrical machines is fixed on one of them mounting bracket and is connected with rotating electrical machines drive module, the master gear shaft passes through the bearing and transversely installs on the mounting bracket and is connected with the rotating electrical machines, first photoelectric switch is fixed on the housing, first photoelectric switch is connected with second processing module and is used for detecting master gear shaft initial position, the bearing ring is fixed in the through-hole that the housing upper surface was seted up, from the vertical fixing of gear shaft in the bearing ring and with the master gear shaft meshing, perpendicular tilting mechanism with from gear shaft fixed connection.
The vertical turnover mechanism comprises a connecting plate, turnover stand columns, a turnover motor, a turnover fixing seat and a second photoelectric switch, the connecting plate is fixedly connected with the horizontal rotating mechanism, the turnover stand columns are symmetrically fixed at two ends of the connecting plate, and the light supplementing and illuminating assembly is arranged between the two turnover stand columns through the turnover fixing seat and a bearing fixed in the turnover fixing seat; the overturning motor is fixed between one of the stand columns and one of the overturning fixing seats, and the overturning motor is respectively connected with the light supplementing lighting assembly and the overturning motor driving module; the second photoelectric switch is fixed between the other stand column and the other overturning fixing seat, and the second photoelectric switch is connected with the second processing module and used for detecting the initial position of the light supplementing lighting assembly.
The line passing holes are formed in the slave gear shaft and the connecting plate, and the vertical turnover mechanism and the light supplementing lighting assembly are connected with the driving plate through the connecting plate and the line passing holes in the slave gear shaft in sequence.
The housing is fixed on the base through the bottom plate, and the driving plate is fixed on the bottom plate.
The light supplementing lighting assembly comprises a lamp body box, a light-passing board, a lamp body fixing board, a heat dissipation mask and an LED light supplementing lamp, wherein two ends of the lamp body box are connected with the vertical turnover mechanism, the LED light supplementing lamp is fixed in the lamp body box through the lamp body fixing board and is connected with the light control driving module, and the light-passing board and the heat dissipation mask are respectively fixed on the front side and the back side of the lamp body box.
The cross beam is fixed on the tripod, and a scale is arranged on the cross beam.
The invention has the advantages that:
1. before testing a moving object, the method presets a target for calibration, and specifically comprises angle calibration, working environment parameter calibration and illuminance calibration. The imaging definition of the camera shooting assembly to the moving object to be measured can be improved through the calibration, so that the purpose of improving the measurement accuracy and precision is achieved.
2. According to the invention, the set threshold of the working environment parameter of the camera shooting assembly is set to be 0-50 ℃, so that the camera shooting assembly can be effectively prevented from fogging and the like.
3. The invention sets the set value of the illumination as 1000-.
4. The invention adopts the matching of the control host, the control panel and the drive board, effectively realizes the automatic control of each part and has higher intelligent degree.
5. The electronic control rotating platform is used as a rotating mechanism of the camera shooting assembly, and has the advantages of simple structure, flexible and convenient rotation control, capability of accurately controlling the rotation angle and the like.
6. According to the invention, the protection assembly is arranged on the electric control rotating platform, and the camera shooting assembly can be effectively protected by the protection assembly, so that the service life of the camera shooting assembly is prolonged, and the camera shooting assembly is prevented from being damaged, rain and fog are prevented, and the like. The influence of glare and stray light on the measurement can be removed through the optical filter. And the semiconductor refrigerator and the temperature and humidity sensor are adopted as the temperature and humidity compensation component, so that the temperature and humidity can be compensated in time, the fogging can be prevented, the structure is simple, the cost is low, and the accuracy of attitude measurement can be improved. Through the cooperation of sealing base, sealed frame and the sealed module of line footpath, can improve the standardization of wiring under guaranteeing waterproof prerequisite, have that water-proof effects is good and the advantage that the wiring is more standard.
7. The light supplementing lighting device comprises a base, a housing, a horizontal rotating mechanism, a vertical turnover mechanism and a light supplementing lighting assembly, wherein the housing is fixed on the base, the horizontal rotating mechanism and a driving board are both fixed in the housing, and the driving board is positioned below the horizontal rotating mechanism; the advantage of this structure lies in can effectively combining drive plate and horizontal rotation mechanism and protect in the housing for whole device is more succinct.
8. The horizontal rotating mechanism comprises a rotating motor, a first photoelectric switch, an installation frame, a bearing ring, a slave gear shaft and a master gear shaft, the rotating motor is matched with the slave gear shaft and the master gear shaft, the light supplementing illumination assembly on the vertical turnover mechanism can be controlled to effectively rotate, the initial position of the master gear shaft can be detected through the first photoelectric switch, and therefore the rotating angle of the light supplementing illumination assembly can be accurately controlled.
9. The vertical turnover mechanism comprises a connecting plate, a turnover stand column, a turnover motor, a turnover fixing seat and a second photoelectric switch, the light supplementing illumination assembly can be controlled to be effectively turned over in the vertical direction through the rotating motor, and the initial position of the light supplementing illumination assembly can be detected through the second photoelectric switch, so that the turnover angle of the light supplementing illumination assembly can be accurately controlled.
10. According to the invention, the auxiliary gear shaft and the connecting plate are both provided with wire passing holes, and the vertical turnover mechanism and the light supplementing lighting assembly are both connected with the driving plate through the connecting plate and the wire passing holes on the auxiliary gear shaft in sequence. The advantage of this structure lies in making the cable among the light filling lighting unit can realize inside wiring under the condition of avoiding twisting, and the wiring is more standard, and the structure is more pleasing to the eye.
11. The cover shell is fixed on the base through the bottom plate, and the driving plate is fixed on the bottom plate. The structure fixes the driving plate in the housing, and a better protection effect is formed on the driving plate.
12. The light supplementing lighting assembly comprises a lamp body box, a light-transmitting plate, a lamp body fixing plate, a heat dissipation mask and an LED light supplementing lamp.
13. The cross beam is fixed on the tripod, and the cross beam is provided with the scale. Adopt this structure to be convenient for adjust camera shooting subassembly and light filling lighting device etc..
Drawings
FIG. 1 is a schematic structural view of the present invention;
FIG. 2 is an exploded view of an industrial camera, a temperature and humidity compensation assembly and a protection assembly on an electrically controlled rotating device;
FIG. 3 is an exploded view of the fill-in lighting device of the present invention;
fig. 4 is an exploded view of the supplementary lighting assembly on the vertical turnover mechanism;
FIG. 5 is a control schematic block diagram of the present invention;
labeled as: 1. a tripod, 2, a beam, 3, a control host, 4, a driving board, 5, a light-compensating lighting device, 6, a horizontal rotating mechanism, 7, a camera shooting component, 8, a light-compensating lighting component, 9, a vertical turnover mechanism, 10, a base, 11, a rotating bearing, 12, an electric control rotating platform, 13, a box cover, 14, a box body, 15, a wire diameter sealing module, 16, a sealing ring, 17, a filter, 18, a lens sheath, 19, a radiating fin, 20, a semiconductor refrigerator, 21, a temperature and humidity sensor, 22, a sealing base, 23, a sealing frame, 24, a bottom plate, 25, a base, 26, a housing, 27, a rotating motor, 28, a first photoelectric switch, 29, a mounting rack, 30, a bearing ring, 31, a slave gear shaft, 32, a master gear shaft, 33, a connecting plate, 34, a turnover stand column, 35, a turnover motor, 36, a turnover fixing seat, 37 and a second, 38. LED light filling lamp 39, lamp body case, 40, light-passing board, 41, heat dissipation face guard, 42, lamp body fixed plate.
Detailed Description
The invention discloses a calibration method of a binocular vision measurement technology, which comprises the following steps:
step 1: the two sets of camera modules 7 are respectively fixed on the beam 2 through the electric control rotating device, a target with a size appropriate to the measured object is arranged in the lens direction of the camera modules 7, and then the controller controls the electric control rotating device to adjust the angle between the camera modules 7 and the target and focus.
In this step, the camera module 7 can adopt an industrial camera, and the two sets of camera module 7 targets preferably form an isosceles triangle.
Step 2: the controller inquires and reads the working environment parameters of the camera assembly 7 through the temperature and humidity compensation assembly, and if the working environment parameters of the camera assembly 7 are outside the set threshold, the controller adjusts the current working environment parameters to the set threshold through the temperature and humidity compensation assembly.
In this step, the set threshold of the working environment parameter of the camera module 7 is 0 to 50 degrees celsius, preferably 15 to 30 degrees celsius.
And step 3: and the light supplementing lighting device 5 is adopted to adjust the illuminance of the image acquisition area corresponding to the camera shooting assembly 7 on the target, so that the illuminance of the image acquisition area corresponding to the target reaches a set value.
In this step, the set value of the illuminance is 1000-.
And 4, step 4: the controller controls the camera assembly 7 to collect a target image, and observes whether the collected image is clear and complete, and if the collected image is not clear and complete, the angle and the illuminance between the camera assembly 7 and the target are adjusted until the clear and complete image is obtained. And if the acquired image is not clear and complete, continuously adjusting the illuminance within the set value range of the illuminance.
And 5: and adjusting the position and the angle of the target, and respectively acquiring images until clear and complete images are obtained at different positions and different angles, thereby completing calibration. After the calibration is completed, the target can be replaced by the measured object which needs to be measured actually for measurement.
In the calibration method of the present invention, the distance between the camera module 7 and the target is calculated by the following formula:
N=(D+d)*cos(θ/2)
the distance between the two sets of camera modules 7 is calculated by the following formula:
M=2*(D+d)*sin(θ/2)
n is the distance between subassembly and the target of making a video recording in the formula, and M is the distance between two sets of subassemblies of making a video recording, and D is the distance of camera lens to the crossbeam, and D is the distance that single subassembly of making a video recording can be collected completely and measure the breadth, and theta is the contained angle that forms between two sets of subassemblies of making a video recording and the target, and M and N are all upwards got the integer.
In the invention, the controller comprises a control host 3, a control panel and a drive board 4, the control host 3 can adopt a VPX plug-in card type notebook computer, the control panel can be plugged in the control host 3, the control panel comprises a first processing module, an extended storage module and a camera trigger control module for being connected with a camera component 7, a storage card can be plugged in the extended storage module for storing related data information and the like, the drive board 4 comprises a second processing module, an electric control rotary table drive module, a temperature and humidity acquisition module, a semiconductor refrigerator drive module and a light supplement control drive module, and the first processing module and the second processing module can be ARM modules or FPGA modules. Specifically, the first processing module is respectively connected with the control host 3, the camera trigger control module, the expansion storage module and the second processing module, the second processing module is connected with the electric control rotating device through the electric control rotating table driving module, the second processing module is connected with the temperature and humidity compensation assembly through the temperature and humidity acquisition module and the semiconductor refrigerator driving module, and the second processing module is connected with the light supplement lighting device 5 through the light supplement control driving module.
In the invention, the electric control rotating device comprises a base 10, a rotating bearing 11 and an electric control rotating platform 12, wherein the base 10 is provided with a fixing groove, the base 10 is fixed on the cross beam 2 through the fixing groove and a bolt, the rotating bearing 11 is fixed on the base 10 through the bolt, the electric control rotating platform 12 is arranged on the rotating bearing 11 and is connected with an electric control rotating platform driving module, and a temperature and humidity compensation component is fixed on the electric control rotating platform 12. The control host 3 can control the electric control rotary table 12 to rotate 360 degrees on the base 10 through the electric control rotary table driving module on the driving plate 4, and then drives the temperature and humidity compensation assembly and the camera assembly 7 to rotate together.
Further, a protection assembly is fixed on the electric control rotating platform 12, the protection assembly comprises a box body 14 with a box cover 13, the camera assembly 7 is fixed in the box body 14 through the electric control rotating platform 12, one end of the box body 14 is provided with a lens hole, and a sealing ring 16, an optical filter 17 and a lens sheath 18 are fixed at the lens hole; two radiating fins 19 are arranged at the upper part of the other end of the box body 14, a wiring hole is formed in the lower part of the box body, a sealing base 22 is fixed at the wiring hole, a sealing frame 23 is fixed on the sealing base 22, and a wire diameter sealing module 15 is fixed in the sealing frame 23; the temperature and humidity compensation component comprises a semiconductor refrigerator 20 and a temperature and humidity sensor 21, the semiconductor refrigerator 20 and the temperature and humidity sensor 21 are both fixed between the radiating fins 19, and the semiconductor refrigerator 20 and the temperature and humidity sensor 21 are respectively connected with a semiconductor refrigerator driving module and a temperature and humidity acquisition module. The control host 3 collects the working environment parameters of the camera assembly 7 through the temperature and humidity acquisition module, and adjusts the working environment parameters of the camera assembly 7 through the semiconductor cooler 20.
In the invention, the light supplementing lighting device 5 comprises a base 25, a cover 26, a horizontal rotating mechanism 6, a vertical turnover mechanism 9 and a light supplementing lighting assembly 8, wherein the base 25 is provided with a fixing groove, the base 25 is fixed on a beam 2 through the fixing groove and a bolt, the base 25 is positioned between two sets of camera assemblies 7, the cover 26 is fixed on the base 25 through a bottom plate 24 and a bolt, the horizontal rotating mechanism 6 is fixed on the cover 26, a driving plate 4 is fixed on the bottom plate 24, the horizontal rotating mechanism 6 and the driving plate 4 are both positioned in the cover 26, and the driving plate 4 is positioned below the horizontal rotating mechanism 6; the vertical turnover mechanism 9 is arranged above the housing 26 through the horizontal rotation mechanism 6, and the light supplementing illumination assembly 8 is arranged on the vertical turnover mechanism 9; the light supplementing control driving module comprises a light control driving module, a rotating motor driving module and an overturning motor driving module, and the horizontal rotating mechanism 6, the vertical overturning mechanism 9 and the light supplementing lighting assembly 8 are respectively connected with the rotating motor driving module, the overturning motor driving module and the light control driving module.
In the invention, the horizontal rotation mechanism 6 comprises a rotation motor 27, a first photoelectric switch 28 and a mounting rack 29, bearing ring 30, from gear shaft 31 and master gear shaft 32, mounting bracket 29 is L shape structure, mounting bracket 29 passes through the bolt symmetry to be fixed at the top of housing 26, rotating electrical machines 27 is fixed on one of them mounting bracket 29 and is connected with rotating electrical machines drive module, master gear shaft 32 transversely installs on mounting bracket 29 and is connected with rotating electrical machines 27 through the bearing, first photoelectric switch 28 is fixed on housing 26, first photoelectric switch 28 is connected with second processing module and is used for detecting master gear shaft 32 initial position, bearing ring 30 is fixed in the through-hole that the upper surface of housing 26 was seted up, from gear shaft 31 adopt the mode of tight fit vertical fixation in bearing ring 30 and with master gear shaft 32 mesh, perpendicular tilting mechanism 9 with from gear shaft 31 fixed connection.
In the invention, the vertical turnover mechanism 9 comprises a connecting plate 33, turnover upright posts 34, a turnover motor 35, turnover fixing seats 36 and a second photoelectric switch 37, wherein the connecting plate 33 is fixedly connected with a slave gear shaft 31 of the horizontal rotating mechanism 6, the turnover upright posts 34 are symmetrically fixed at two ends of the connecting plate 33 through bolts, circular shells are arranged at the upper ends of the turnover upright posts 34, and the light supplementing and illuminating assembly 8 is arranged between the circular shells of the two turnover upright posts 34 through the turnover fixing seats 36 and bearings fixed in the turnover fixing seats 36; the turning motor 35 is fixed between one of the upright posts and one of the turning fixing seats 36, the turning motor 35 is located in the circular shell of the turning upright post 34, the turning motor 35 is respectively connected with the light supplementing lighting assembly 8 and the turning motor driving module, and the turning motor driving module can control the turning motor 35 to drive the light supplementing lighting assembly 8 to turn; the second photoelectric switch 37 is fixed between another column and another turning fixing seat 36, and the second photoelectric switch 37 is connected with the second processing module to detect the starting position of the supplementary lighting assembly 8.
In the invention, the auxiliary gear shaft 31 and the connecting plate 33 are both provided with wire passing holes, and cables in the vertical turnover mechanism 9 and the light supplementing lighting assembly 8 are both connected with the driving plate 4 through the connecting plate 33 and the wire passing holes on the auxiliary gear shaft 31 in sequence.
In the invention, the light supplementing lighting assembly 8 comprises a lamp body box 39, a light transmitting plate 40, a lamp body fixing plate 42, a heat dissipation mask 41 and an LED light supplementing lamp 38, wherein two ends of the lamp body box 39 are connected with the vertical turnover mechanism 9, the LED light supplementing lamp 38 is fixed in the lamp body box 39 through the lamp body fixing plate 42 and is connected with the light control driving module, and the light transmitting plate 40 and the heat dissipation mask 41 are respectively fixed on the front side and the back side of the lamp body box 39.
In the invention, the beam 2 is fixed on the tripod 1, and the beam 2 is provided with a scale. Wherein, the height of the tripod 1 is adjustable, the crossbeam 2 is provided with a scale, and the crossbeam 2 can be made of a section bar with a groove. In practical use, the two sets of camera modules 7 are preferably fixed at two ends of the cross beam 2, and the light supplement lighting device 5 is preferably fixed in the middle of the cross beam 2.
The calibration of the present invention mainly comprises: the angle and the direction measured by the camera shooting assembly 7 are accurately controlled through the electric control rotating platform 12, and the influence of glare and stray light on imaging is filtered by using a high-definition filter. Working environment parameters are monitored in real time through the temperature and humidity sensor 21, the temperature environment is adjusted and improved through the semiconductor refrigerator 20, and the measurement requirement under the complex working condition and the complex environment is met. Meanwhile, illumination compensation in multiple directions and multiple angles is achieved through illumination supplement and illumination surface mounting, and imaging quality in a dark light environment is improved. The camera shooting assembly 7 and the light supplementing and illuminating assembly 8 can be automatically adjusted through computer software in the control host 3. Before actual measurement, the definition of the imaging of the camera assembly 7 on the moving object to be measured can be improved through the calibration, so that the purpose of improving the measurement accuracy and precision is achieved.