A kind of cliff blast hole detection & localization device based on binocular vision and localization method
Technical field
The invention belongs to observation and control technology field, be specifically related to a kind of cliff blast hole detection & localization device based on binocular vision and localization method, namely take same blast hole image by two video cameras simultaneously, through Image processing and compute, obtain the three-dimensional coordinate of target hole.
Background technology
Usually need to carry out explosion to massif in large scale civil engineering, generally first hole on cliff, then load explosive.But, because cliff in field environment is very high, surface area large and surface topography irregular, not only labour intensity is large, efficiency is low to adopt Artificial Intervention explosive, and danger is very high, explosive is implanted according to automation equipment, again because the operator on most of hole and equipment makes the frequent neglected loading of equipment operator or the many holes of misloading apart from the reason such as too far away, thus the automatic detection & localization device in exploitation blasting hole is needed, for operator provides empty position information, improve the accuracy that explosive is implanted, reduce the labour intensity of neglected loading rate and operator.
Summary of the invention
The invention provides a kind of can replace manually automatically completing the detection & localization of cliff blast hole, based on the cliff blast hole detection & localization device of binocular vision and localization method.
For achieving the above object, the present invention adopts following technical solution: a kind of cliff blast hole detection & localization device based on binocular vision, comprise main camera and auxiliary camera, main camera and auxiliary camera are arranged on multi-joint movable mechanical on hand, main camera is connected with image pick-up card by signal wire with auxiliary camera, and image pick-up card and multi-joint movable mechanical hand are connected with computing machine by signal wire.
Described controller inbound pacing sensor and the signal of displacement transducer are also imported into computing machine.
The method utilizing said apparatus to locate cliff blast hole, comprises the following steps:
1) blast hole search, detection: take from different orientation and visual angle the region having blast hole to distribute respectively by main camera and auxiliary camera simultaneously, and by image pick-up card by the picture transfer of shooting to vision module, vision module detects the blast hole in picture and locks one of them hole is current goal hole;
2) target hole three-dimensional coordinate is determined: processed by the image of the image processing software in vision module to hole, obtains the two dimensional image coordinate P of target hole in image captured by main camera and auxiliary camera respectively
1(u, v) and P
2(u ', v ').Now, the optical axis of main camera is parallel to the optical axis of auxiliary camera, obtains the three-dimensional coordinate (X, Y, Z) of target hole in the coordinate system C being reference with main camera (1) by triangle relation;
(k is pixel length)
In formula (1), f is camera focus, and L is the distance between two video cameras, and d=u-u ' is parallax, (u
0, v
0) be the coordinate of camera imaging planar central pixel; Namely the three-dimensional coordinate of target hole center in camera coordinate system C is obtained thus;
Further, camera coordinate system C and mechanical arm base coordinate system O (X is supposed
0, Y
0, Z
0) between space conversion matrix be T, each parameter wherein in T is recorded in real time by the displacement transducer installed in the control module, then camera coordinate system C can be converted in robot coordinate system O:
After this, after obtaining arbitrary target hole, by above calculation procedure, by target hole space coordinate conversion in mechanical arm base coordinate system, realize target hole is relative to the space orientation of robot coordinate system.
The present invention is at blast hole search, detection-phase, and main camera and auxiliary camera are taken simultaneously, but only process main camera image, detect whether porose existence, the Image Saving of auxiliary camera, can reduce calculated amount, improves the real-time of detection system work.
Accompanying drawing explanation
Below in conjunction with drawings and Examples, the invention will be further described.
Fig. 1 is system of the present invention composition schematic diagram.
Fig. 2 is pretreated blast hole image.
Fig. 3 is blast hole binocular calibration illustraton of model, and, f is focal length of camera in Fig. 3 wherein, is the known quantity determined by camera; u
0, v
0it is the coordinate of camera imaging planar central point; P is target hole center; P
1, P
2be respectively the imager coordinate of center, hole P in video camera 1,2; U, u ' be respectively the horizontal ordinate of P imaging in two video cameras; C, C ' be respectively the true origin of two camera coordinate systems.
Embodiment
Be below specific embodiments of the invention and by reference to the accompanying drawings, technical scheme of the present invention is further described, but the present invention be not limited to these embodiments.
Cliff blast hole detection & localization apparatus structure based on binocular vision provided by the invention is as follows: as shown in Figure 1, comprise main camera 1 and auxiliary camera 2, main camera 1 and auxiliary camera 2 are arranged on multi-joint movable mechanical hand 3, main camera 1 is connected with image pick-up card 4 by signal wire with auxiliary camera 2, and image pick-up card 4 and multi-joint movable mechanical hand 3 are connected with computing machine 5 by signal wire.Described controller 7 inbound pacing sensor and the signal of displacement transducer are also imported into computing machine 5.
In the present invention, for reducing calculated amount, improve the real-time of detection system work, at blast hole search, detection-phase, main camera 1 and auxiliary camera 2 are taken simultaneously, but vision module only processes main camera 1 image, detect whether porose existence, auxiliary camera image 2 is preserved.Namely the image only relying on main camera 1 acquisition carries out hole search and judgement.
If computing machine 5 judges in shooting area porose in search procedure, then split in the ken, lock each hole (if with when photographing multiple hole in piece image), and to lock a certain hole be current goal hole implants explosive in order to mechanical arm 3.Call the image that the auxiliary camera 2 corresponding with this image obtains, segmentation, lock onto target hole simultaneously.
Be below an operational instances of the present invention:
After two main cameras 1 being in different azimuth and auxiliary camera 2 take blast hole image simultaneously, through image processing software, the pre-service such as denoising, enhancing is carried out to blast hole image by conventional method, and auto Segmentation is carried out in the hole in image, locking a hole is current goal hole, as hole 2.As shown in Figure 2.
The two-dimensional coordinate of center, hypothetical target hole in two camera reviews is respectively P
1(u, v) and P
2(u ', v ').Now, if two camera parameters (as focal length, resolution etc.) are identical, and the optical axis of two video cameras is parallel, then can obtain the three-dimensional coordinate (X, Y, Z) of target hole in the coordinate system C being reference with video camera 1 by simple triangle relation.
The binocular calibration illustraton of model of the blast hole according to Fig. 3, can obtain:
(k is pixel length)
In formula (1), f is camera focus, and L is the distance between two video cameras.D=u-u ' is parallax, (u
0, v
0) be the coordinate of plane of delineation central pixel point; Namely the three-dimensional coordinate of target hole center in camera coordinate system C is obtained thus;
Further, camera coordinate system C and mechanical arm base coordinate system O (X is supposed
0, Y
0, Z
0) between space conversion matrix be T, each parameter wherein in T is recorded in real time by each displacement transducer installed in the control module, then camera coordinate system C can be converted in robot coordinate system O:
After this, after obtaining arbitrary target hole, by above calculation procedure, by target hole space coordinate conversion in mechanical arm base coordinate system, realize target hole is relative to the space orientation of robot coordinate system.
Be below a located instance of the present invention:
By actual measurement, target hole 2 diameter in shown in known Fig. 2 is 150mm, and its central point is (65.00 at the coordinate of mechanical arm base coordinate system, 780.00,1550.00), unit is millimeter (below unless specifically indicated, unit is millimeter).And the coordinate of the central point of blast hole 2 in image coordinate system is respectively P
1(1339.50,1293.71) (unit: pixel), P
2(831.40,1292.65), now, f=25.5mm, k=0.01mm, the distance L=150mm between two video cameras, (ku
0, kv
0)=(16.32,12.24).Therefore be C (-86.35 ,-20.58,752.80) according to the coordinate of central point in camera coordinate system that formula (1) can be calculated blast hole 2.
Now, camera coordinates is T (150.00,800.00 relative to robot base transition matrix, 800.00), the coordinate of center in robot coordinate system that (2) formula of substitution can obtain blast hole 2 is O (63.65,779.42,1552.80).
To when result:
Contrasted from the actual coordinate at above blast hole 2 center and surving coordinate, maximum error between Two coordinate is 2.8mm (Z-direction), therefore the present invention has higher measuring accuracy (especially for larger-diameter hole) and good realizability.