The measuring method of contactless rail middle vertical plane
Technical field
The present invention is a kind of measuring method of the rail middle vertical plane based on the structured light three-dimensional vision detection technique, belongs to the test technique automatic field.
Background technology
In recent years, domestic railway repeatedly raises speed, the particularly operation of EMU, and the travel speed of train is more and more faster, and this also has higher requirement to the safety of railway.When platform, electric wire or other objects invade the space of train driving, can cause serious security incident.Therefore, the measurement that railway is invaded the boundary is extremely important.
The method that the measurement lorry that railroad adopts now transfinites mainly still comparatively original manpower measure, need survey crew climbing arrival roof end, use instruments such as weight and tape measure to measure.Judge that the benchmark whether lorry transfinites is rail face and rail middle vertical plane.The height of lorry refers to that the peak of lorry is to the distance of rail face; The width of train is to measure respectively to the distance of rail middle vertical plane according to train two sides the widest part.In the measurement of reality, common way be ground with the scene as the surface level benchmark, use instruments such as weight and tape measure to demarcate rail face and rail middle vertical plane as the benchmark that transfinites and measure.Obviously, it is level that on-the-spot ground is difficult to guarantee, also just there are bigger error in the rail face that obtains thus and the measuring basis of rail middle vertical plane, and therefore such measuring method that transfinites is that precision is lower.
Now occurred invading boundary's measuring method based on the quick contactless railway of structured light three-dimensional vision detection technique, in order to the distance between object such as automatic measurement railroad platform and the gauge center and with respect to the height of rail face, and can reach very high precision.This method is to be based upon on the basis of accurate acquisition railway rail middle vertical plane data, and this will ask and obtain the three-dimensional coordinate equation of railway rail middle vertical plane in the space accurately, with this as the benchmark of measuring.
Because the development of electronic technology, detection technique, feasible quick measurement to the railway rail middle vertical plane becomes possibility.
Summary of the invention
The purpose of this invention is to provide the measuring method of a kind of high precision, contactless railway rail middle vertical plane, by calculating the three-dimensional coordinate equation of railway rail middle vertical plane in the space, invade the measuring basis on boundary as railway with this.
Technical solution of the present invention is: the present invention adopts the structured light three-dimensional vision detection technique, adopts linear structural laser device irradiation rail, and the image of camera collection laser rays irradiation is obtained the three dimensional space coordinate of laser rays and two rails intersection point by microprocessor processes.Because such single measurement can be subjected to the influence of external environment factor inevitably, exists bigger error probably, therefore only put to determine that by a few equation in coordinates of two rails and rail face is very coarse.For the precision that guarantees to measure, need make the laser line scanning rail, processing obtains the three dimensional space coordinate of a series of laser rays and two rails intersection point, constitute the overdetermined equation group, calculate the equation in coordinates of two rails and rail face by least square method, and obtain the equation in coordinates of rail middle vertical plane thus.
Three dimensional space coordinate according to different intersection points can match obtain the equation in coordinates of two rails and rail face, and obtains the equation in coordinates of rail middle vertical plane thus.
Measuring method of the present invention is: microprocessor control line structure laser instrument emission laser line scanning rail, camera is sent the image of the laser rays that collects and two rails intersection point into microprocessor and is handled, be based upon the three-dimensional coordinate equation of railway rail middle vertical plane in the space by microprocessor according to the structured light three-dimensional vision Measurement Algorithm, invade the measuring basis on boundary as railway with this.
The process of measurement that measurement flow process of the present invention is microprocessor is:
1) opens the linear structural laser device, make its emission laser rays irradiation rail;
2) open camera, take the image of laser rays irradiation place and two rails intersection point;
3) closed line structure laser instrument, camera are taken and step 2) image at same position place;
4) microprocessor receives two width of cloth images of camera collection;
5) two width of cloth picture signals are subtracted each other, extract the laser rays in the laser rays irradiation image;
6) according to the two-dimensional coordinate under the computer picture coordinate system and the transformational relation between the three dimensional space coordinate under the world coordinate system, calculate the three dimensional space coordinate of two intersection points of laser rays and rail;
7) emission angle of rotation laser instrument, repeatedly repetitive process 1)-6), obtain the three dimensional space coordinates of organizing laser rays and rail intersection point more;
8) the match gained is organized the three dimensional space coordinate of laser rays and rail intersection point more, obtains the equation in coordinates of two rails and rail face in the three dimensional space coordinate;
9) calculate the three-dimensional coordinate equation of rail middle vertical plane.
Beneficial effect of the present invention: the present invention has adopted the structured light three-dimensional vision detection technique, can noncontact, measure the three-dimensional coordinate equation of railway rail middle vertical plane in the space at a high speed, accurately, for being that the railway of measuring basis is invaded measurements such as boundary benchmark is provided with the railway rail middle vertical plane.
Description of drawings
Fig. 1 adopts the synoptic diagram of structured light three-dimensional vision detection in world coordinate system and sensor light plane coordinate system for the present invention,
Fig. 2 is the synoptic diagram of video camera 3D vision measurement.
Embodiment
As shown in Figure 1, video camera 3D vision measurement model is usually based on pin-hole model.World coordinate system is consistent with the sensor light plane coordinate system, is made as O
w-x
wy
wz
w, its O
w-x
wy
wOverlap with optical plane.Photo coordinate system is O
I-X
IY
I, O wherein
IBeing the intersection point of optical axis with the picture plane, is the optical centre on picture plane.O
IAnd O
cBetween be the effective focal length of object lens imaging apart from f.O wherein
IX
IAxle is along pixel horizontal direction, O
IY
IAxle is perpendicular to O
IX
IAxle.In computer picture, with the point in the upper left corner initial point as image coordinate, be that initial point is set up image coordinate system Ouv with the point of the O among Fig. 1 namely usually.Computer picture coordinate system Ouv and O
I-X
IY
ICoplanar, Ouv is O
I-X
IY
IAlong O
IO obtains do translation.Camera coordinate system O
c-x
cy
cz
c, O wherein
cPoint is for the imaging centre of perspectivity, i.e. the optics principal point of object lens, O
cz
cBe the camera objective optical axis, perpendicular to CCD as the plane.O
cx
cAxle and O
cy
cAxle is parallel to O respectively
IX
IAxle and O
IY
IAxle.
Be example with the line-structured light, a word laser line generator projects an optical plane and target to be measured meets at line L.P
wBe on the straight line L a bit, P
wAt world coordinate system O
w-x
wy
wz
w, camera coordinate system O
c-x
cy
cz
cAnd the respective coordinates under the computer graphic photo coordinate system Ouv is respectively (x
w, y
w, z
w), (x
c, y
c, z
c) and (u, v).Then the two-dimensional coordinate transformational relation under the three dimensional space coordinate under the world coordinate system and the computer picture coordinate system is shown below:
Wherein, s is a modifying factor; R is rotation matrix, and T is translation vector, and R and T have determined direction and the position of video camera with respect to world coordinate system.Matrix A is the inner parameter matrix of linear system, wherein u
0And v
0Be O
ICoordinate under the computer picture coordinate, α and β be horizontal axis of ordinates corresponding to the scale factor (or being called effective focal length) of focal distance f, c is the two coordinate axis out of plumb factors.These parameters all can obtain by demarcating in advance.
Namely can obtain three dimensional space coordinate under the world coordinate system and the two-dimensional coordinate transformational relation under the computer picture coordinate system by prior demarcation like this, obtain the coordinate put in the three dimensions by the respective coordinates of putting on the computer picture easily.
As shown in Figure 1, photo coordinate system is OI-XIYI, and wherein OI is the intersection point on optical axis Oczc and picture plane, and namely OI is the optical centre on picture plane.But in computer graphical is handled, with the point in the upper left corner initial point as image coordinate, be that initial point is set up image coordinate system Ouv with the point of the O among Fig. 1 namely usually.Though say on the stricti jurise, computer picture coordinate system Ouv is different with OI-XIYI, and Ouv and OI-XIYI are coplanar, and Ouv is that OI-XIYI obtains do translation along OIO.
The meaning of formula 1 be can by the respective coordinates of Pw under computer graphic photo coordinate system Ouv (u, v) try to achieve the respective coordinates of Pw under world coordinate system Ow-xwywzw (xw, yw, zw).In the measurement of reality, respective coordinates (the u of Pw under computer graphic photo coordinate system Ouv, v) be to obtain by the algorithm of Digital Image Processing, just can obtain the respective coordinates (xw of Pw under world coordinate system Ow-xwywzw according to formula (1), yw, the ultimate principle of structured light three-dimensional vision detection technique that zw), Here it is.
Microprocessor 3 control line structure laser instruments 1 emission laser rays irradiation rail among Fig. 2, camera 2 is sent the image that collects into microprocessor 3 and is handled, and is calculated the equation in coordinates of rail middle vertical plane according to the two-dimensional coordinate under the computer picture coordinate system and the transformational relation between the three dimensional space coordinate under the world coordinate system by microprocessor 3.