CN107588732B - Rail side train part height measurement method and system - Google Patents

Rail side train part height measurement method and system Download PDF

Info

Publication number
CN107588732B
CN107588732B CN201610531719.7A CN201610531719A CN107588732B CN 107588732 B CN107588732 B CN 107588732B CN 201610531719 A CN201610531719 A CN 201610531719A CN 107588732 B CN107588732 B CN 107588732B
Authority
CN
China
Prior art keywords
train
coordinate system
image
railway track
camera
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610531719.7A
Other languages
Chinese (zh)
Other versions
CN107588732A (en
Inventor
李骏
郑煜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou New Vision Science And Technology Co ltd
Original Assignee
Suzhou New Vision Science And Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou New Vision Science And Technology Co ltd filed Critical Suzhou New Vision Science And Technology Co ltd
Priority to CN201610531719.7A priority Critical patent/CN107588732B/en
Publication of CN107588732A publication Critical patent/CN107588732A/en
Application granted granted Critical
Publication of CN107588732B publication Critical patent/CN107588732B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The embodiment of the invention discloses a rail train part height measuring method and a rail train part height measuring system, wherein the rail train part height measuring method comprises the following steps: capturing train images by using an area array camera, wherein the train images comprise images of train parts and images of railway tracks; respectively establishing a world coordinate system corresponding to a real space where the train is located and an image pixel coordinate system corresponding to an image of the train, and determining coordinate corresponding parameters between the world coordinate system and the image pixel coordinate system; respectively acquiring pixel coordinates of train parts and pixel coordinates of a railway track in a train image according to an image pixel coordinate system; and calculating the distance between the train part and the railway track in the real space according to the pixel coordinates of the train part, the pixel coordinates of the railway track and the corresponding parameters of the coordinates, and taking the distance as the height of the train part. The technical scheme of the invention can realize accurate measurement of the heights of the train parts.

Description

Rail side train part height measurement method and system
Technical Field
The invention relates to the technical field of train overhaul, in particular to a method and a system for measuring the height of parts of a rail train.
Background
With the development of national economy, the flow of personnel and goods is gradually increased, and the transportation burden and transportation speed of trains are gradually increased, so that the possibility of faults of train parts is also increased. The possibility of failure of the train parts increases, and the safe running of the train is seriously threatened, so that the inspection of the train parts is important to ensure the running safety of the train.
In order to ensure the running safety of the train, maintenance personnel usually need to perform various types of detection on the train, wherein the height measurement of train parts (such as a sand pipe, a pilot, a stone sweeper and a coupler) is an important component part of the train detection, and if the installation heights of the train parts do not meet the specified standard; or in the long-term use of the train, the heights of the train parts are greatly changed, and major accidents such as derailment or overturning of the train are easily caused.
The existing height detection method of the train parts is generally that height detection devices such as a laser emitter and a laser receiver are arranged on the inner side of a rail at the bottom of a train, laser is projected to the train parts through the laser emitter, the height of the train parts is calculated according to the time of the laser emitted to the train parts and the time of the laser returned to the laser receiver, whether the height of the train parts exceeds a preset height range is further judged, and if the height exceeds the preset height range, the installation height of a key part is judged to be out of limit.
However, in this method, the height detection device needs to be placed inside the track at the bottom of the train to detect the train components. The train parts are easy to overlap each other in the height direction of the train, so that laser emitted from the laser emitter is blocked by train parts at the bottom layer, the train parts at the upper layer are difficult to detect, and even if a small amount of laser emitted to the train parts at the upper layer is reflected back to the laser receiver, the accuracy of detecting the height of the parts is difficult to ensure; and secondly, the height detection device is arranged on the inner side of the track at the bottom of the train, and is easy to contact with parts at the bottom of the train and even damaged due to mutual collision.
Disclosure of Invention
The embodiment of the invention provides a system and a method for measuring the height of a train part at a rail side, which are used for solving the problems that the height detection precision of the train part is difficult to guarantee and collision damage is easy to occur in the train part height detection method in the prior art.
In order to solve the technical problems, the embodiment of the invention discloses the following technical scheme:
according to a first aspect of the present invention, there is provided a rail side train part height measurement method comprising:
Capturing a train image by using an area array camera arranged on the outer side of a railway track, wherein the train image comprises an image of a train part and an image of the railway track;
respectively establishing a world coordinate system corresponding to a real space where a train is located and an image pixel coordinate system corresponding to an image of the train, and determining coordinate corresponding parameters between the world coordinate system and the image pixel coordinate system;
respectively acquiring pixel coordinates of a train part and a railway track in the train image according to the image pixel coordinate system;
and calculating the distance between the train part and the railway track in the real space according to the pixel coordinates of the train part and the railway track and the corresponding parameters of the coordinates, and taking the distance as the height of the train part.
Preferably, the rail side train part height measurement method further comprises the following steps:
judging whether the absolute value of the difference between the height of the train part and the preset measured height is larger than or equal to a preset threshold value, and if the absolute value of the difference is larger than or equal to the preset threshold value, giving out an overrun alarm to the height of the train part.
Preferably, the establishing a world coordinate system corresponding to the real space where the train is located and an image pixel coordinate system corresponding to the train image respectively includes:
The lens optical center of the area array camera is used as an origin of a coordinate system, and a vertical line of a railway track passing through the lens optical center is used as a Z axis, so that the world coordinate system is established;
taking the optical center of the lens as an origin of a coordinate system, taking the optical axis of the area array camera as a Z axis, and taking a mirror surface where the lens is positioned as an XOY surface to establish a camera coordinate system;
establishing a two-dimensional image physical coordinate system by taking an intersection point of the train image and the optical axis as an origin of a coordinate system and an image plane of the train image as an XOY plane;
and establishing a two-dimensional image pixel coordinate system by taking the left upper corner end point of the train image as a coordinate system origin and taking the image plane as an XOY plane, wherein X-axis and Y-axis of the camera coordinate system, the image physical coordinate system and the image pixel coordinate system are respectively parallel to each other.
Preferably, the step of calculating the distance between the train component and the railway track in real space according to the pixel coordinates of the train component and the railway track and the corresponding parameters of the coordinates comprises:
calculating physical coordinates of the train parts and the railway track in the image physical coordinate system according to pixel coordinates of the train parts and the railway track, physical dimensions of an X axis and a Y axis in the image physical coordinate system corresponding to each pixel point of the image pixel coordinate system and coordinates of a coordinate system origin of the image physical coordinate system in the image pixel coordinate system;
According to the physical coordinates of the train parts and the railway track, the focal length of the area array camera and the vertical line distance from the optical center of the lens to the railway track, calculating the camera coordinates of the train parts and the railway track in the camera coordinate system respectively;
calculating the space coordinates of the train parts and the railway track in the world coordinate system according to the camera coordinates of the train parts and the railway track, the rotation angle of the camera coordinate system corresponding to the world coordinate system and the distance between the origins of the coordinate system;
and calculating the distance between the train part and the railway track in the real space according to the space coordinates of the train part and the railway track in the world coordinate system.
Preferably, the rail side train part height measurement method further comprises the following steps:
judging whether the area array camera rotates or not;
when the area array camera rotates, acquiring an offset angle between an optical axis of the area array camera and a perpendicular line of the railway track;
the offset angle is used to compensate for the angle of rotation of the camera coordinate system corresponding to the world coordinate system.
Preferably, the rail side train part height measurement method further comprises the following steps:
Acquiring the number of pixel points between the train parts and the railway track in a train image;
calculating the actual length of the train part and the railway track in the vertical plane corresponding to each pixel point in the real space;
and calculating the distance between the train part and the railway track according to the number of the pixel points and the actual length, and taking the distance as the height of the train part.
Preferably, the rail side train part height measurement method further comprises the following steps:
acquiring the moving speed of the train by using a speed measuring magnetic steel assembly;
calculating the moving time of the train reaching the shooting area of the area array camera according to the moving speed of the train and the distance between the speed measuring magnetic steel assembly and the shooting area of the area array camera;
and starting the area-array camera to start shooting according to the moving time.
Preferably, the rail side train part height measurement method further comprises the following steps:
judging whether the moving speed of the train is smaller than or equal to a preset speed;
and if the moving speed of the train is smaller than or equal to the preset speed, selecting a camera exposure speed corresponding to the moving speed of the train to photograph the train.
According to a second aspect of the present invention, there is also provided a rail side train part height measurement system comprising:
the area array camera is arranged outside the railway track and is a preset distance away from the railway track and is used for capturing train images;
a controller electrically connected to the area array camera, the controller comprising:
the system comprises a coordinate system establishing module, a coordinate system acquiring module and a coordinate acquiring module, wherein the coordinate system establishing module is used for respectively establishing a world coordinate system corresponding to a real space where a train is positioned and an image pixel coordinate system corresponding to an image of the train, and determining coordinate corresponding parameters between the world coordinate system and the image pixel coordinate system;
the pixel coordinate sub-calculator is electrically connected with the coordinate system building module and the area array camera and is used for respectively calculating pixel coordinates of the train parts and the railway support rail in the train image according to the image pixel coordinate system;
and the height sub-calculator is electrically connected with the pixel coordinate sub-calculator and is used for calculating the distance between the train part and the railway track in the real space according to the pixel coordinates of the train part and the railway track and the corresponding parameters of the coordinates, and the distance is used as the height of the train part.
Preferably, the rail side train part height measurement system further comprises:
And the irradiation area of the first light supplementing source is overlapped with the imaging area of the area array camera and covers the imaging area.
Preferably, the rail side train part height measurement system further comprises:
the speed measuring magnetic steel assembly is fixed on the inner side surface of the railway support rail and is used for detecting the moving speed of a train;
the controller also comprises a moving time sub-calculator electrically connected with the speed measuring magnetic steel component, and the moving time sub-calculator is used for calculating the moving time of the train reaching the imaging area of the area array camera according to the moving speed of the train and the distance between the speed measuring magnetic steel and the area array camera;
the moving time sub-calculator is also electrically connected with the area array camera and is used for starting the area array camera to start photographing according to the moving time;
the controller further includes:
the moving speed comparator is electrically connected with the speed measuring magnetic steel component and is used for judging whether the moving speed of the train is smaller than or equal to a preset speed;
and the exposure speed selector is respectively and electrically connected with the moving speed comparator and the area array camera and is used for selecting the exposure speed corresponding to the train speed to photograph the train.
Preferably, the rail side train part height measurement system further comprises:
the linear array camera is arranged outside the railway track and is a preset distance away from the railway track and is used for shooting a linear array car image;
the controller further includes: the pixel acquirer is electrically connected with the linear array camera and is used for acquiring the number of pixels from the train part to the railway track in the linear array vehicle image; the length calculator is electrically connected with the pixel acquirer and is used for calculating the actual length of the train part and the railway track in the vertical plane corresponding to each pixel point in the real space;
the Gao Duzi calculator is further electrically connected with the length calculator and is further used for calculating the distance between the train part and the railway track as the height of the train part according to the number of the pixel points and the actual length.
Preferably, the rail side train part height measurement system further comprises:
the second light supplementing source is electrically connected with the controller, and the irradiation area of the second light supplementing source is overlapped with the imaging area of the linear array camera and covers the imaging area of the linear array camera; wherein,
The width of the line array car image of the line array camera is larger than or equal to the train running distance of unit shooting time.
Preferably, the area-array camera includes:
a single area array camera at a predetermined distance from the railway track, wherein the single area array camera is provided with a horizontal rotation device; or,
and the optical axis of each area array camera in the area array camera array is perpendicular to the railway track.
Preferably, the shooting interval time of the adjacent area cameras in the area array camera array is equal to the ratio of the distance between the adjacent area cameras to the moving speed of the train.
Preferably, the rail side train part height measurement system further comprises:
a calibration plate moving along the length direction of the railway track and the optical axis direction of the area array camera in the imaging area of the area array camera;
the area array camera is also used for collecting a plurality of calibration plate images in the movement process of the calibration plate;
the controller is also used for acquiring pixel coordinates of a plurality of corner points on the calibration plate according to the plurality of calibration plate images; and calculating the coordinate corresponding parameters according to the pixel coordinates of the plurality of corner points, wherein the coordinate corresponding parameters comprise:
The physical dimensions of the X axis and the Y axis in the image physical coordinate system corresponding to each pixel point of the image pixel coordinate system and the coordinates of the origin of the coordinate system of the image physical coordinate system in the image pixel coordinate system.
According to the technical scheme, the area array camera is arranged on the outer side of the railway track, and compared with the height measuring method for the train parts, which is used for arranging the height detecting device on the inner side of the track at the bottom of the train, in the background art, the area array camera can capture train images at an angle close to the horizontal, and the train part images in the train images can not overlap with each other in the height direction, so that the images of all the train parts can be accurately detected, and the area array camera is arranged on the outer side of the railway track and is not easy to touch the bottom of the train, and the damage probability of the area array camera can be reduced. By shooting the train image, establishing a world coordinate system of a real space and an image pixel coordinate system of the train image, determining coordinate corresponding parameters between the world coordinate system and the image pixel coordinate system, and further calculating the distance between the train part and the railway track in the real space according to the pixel coordinates of the train part and the railway track in the image pixel coordinate system, so as to accurately detect the height of the train part.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the description of the embodiments or the prior art will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
Fig. 1 is a schematic view of an application scenario provided in an embodiment of the present invention;
fig. 2 is a schematic flow chart of a method for measuring the height of a rail train part according to an embodiment of the present invention;
FIG. 3 is a schematic flow chart of a method for measuring the height of a rail train part according to an embodiment of the present invention;
fig. 4 is a schematic flow chart of a method for measuring the height of a rail train part according to an embodiment of the present invention;
fig. 5 is a schematic flow chart of a method for measuring the height of a rail train part according to an embodiment of the present invention;
FIG. 6 is a schematic flow chart of a method for measuring the height of a rail train part according to an embodiment of the present invention;
fig. 7 is a schematic flow chart of a method for measuring the height of a rail train part according to an embodiment of the present invention;
FIG. 8 is a schematic flow chart of a method for measuring the height of a rail train part according to an embodiment of the present invention;
Fig. 9 is a schematic flow chart of a method for measuring the height of a rail train part according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram of a rail side train part height measurement system according to an embodiment of the present invention;
FIG. 11 is a schematic structural diagram of a rail side train component height measurement system according to an embodiment of the present invention;
fig. 12 is a schematic structural diagram of a rail side train part height measurement system according to an embodiment of the present invention;
fig. 13 is a schematic structural diagram of a rail side train part height measurement system according to an embodiment of the present invention;
fig. 14 is a schematic structural diagram of a rail-side train component height measurement system according to an embodiment of the present invention.
Detailed Description
In order to make the technical solution of the present invention better understood by those skilled in the art, the technical solution of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
Referring to fig. 1, a schematic view of an application scenario provided by an embodiment of the present invention, as shown in fig. 1, the application scenario provided by the embodiment of the present invention at least includes:
and an area camera 101 arranged outside the railway track and at a predetermined distance from the railway track, wherein the shooting direction of the area camera 101 faces the train for shooting images of the train. The railway track is the closest railway track to the area camera 101.
And then calculating the distance between the train part and the railway track in the world coordinate system corresponding to the real space according to the coordinates of the train part and the railway track on the image pixel coordinate system on the train image, and taking the distance as the height of the train part.
The imaging principle of the area-array camera 101 is a lens imaging principle, please refer to fig. 1 specifically, specifically: light rays emitted by an object at an object plane (a vertical plane where a train part and a railway track are located) at an object distance u are refracted through a lens, converged to a focal point F at a focal length F, and finally imaged to an image plane (a plane where a train image is located) at an image distance v. Wherein, the object distance, the focal length and the image distance are all distances relative to the optical center of the lens.
Referring to fig. 2, a flow chart of a method for measuring the height of a rail train part according to an embodiment of the present invention is shown in fig. 2, and the method for measuring the height of a rail train part includes the following steps:
S110: and shooting train images by using an area array camera arranged outside the railway track, wherein the train images comprise images of train parts and images of the railway track.
The area array camera is arranged on the outer side of the railway track, compared with the height detection device which is arranged on the inner side of the track at the bottom of the train and is mentioned in the background art, the area array camera can capture train images at an angle close to the horizontal, and in the train images, the train part images in the height direction cannot overlap with each other, so that the structures of different train parts can be clearly and accurately detected from the train images. In addition, the area array camera is arranged on the outer side of the railway track, compared with the scheme that the height detection device in the background art is arranged at the bottom of the train, the area array camera is not easy to touch the bottom of the train, and the damage probability of the area array camera can be reduced. The train parts comprise a stone sweeper, a sand pipe, a barrier, a coupler and the like.
S120: and respectively establishing a world coordinate system corresponding to the real space where the train is located and an image pixel coordinate system corresponding to the train image, and determining coordinate corresponding parameters between the world coordinate system and the image pixel coordinate system.
The world coordinate system is a three-dimensional coordinate system, and uses the actual length in the space as a coordinate system unit, so as to describe the positions of the train parts, the railway track, the array camera and other objects in the real space. The image pixel coordinate system is a two-dimensional coordinate system, and the number of pixel points is taken as a coordinate system unit for describing the positions of objects such as train parts, railway tracks, array cameras and the like on the train image. The train image is an image imaged by the area array camera at the image plane position.
By establishing a world coordinate system corresponding to the real space where the train is located and an image pixel coordinate system corresponding to the train image, the positions of the structures such as the train parts, the railway track and the like in the real space and the positions of the structures in the train image can be determined. By determining the coordinate corresponding parameters between the world coordinate system and the image pixel coordinate system, the coordinate positions of the train parts and the railway track in the world coordinate system can be calculated according to the coordinate positions of the train parts and the railway track in the image pixel coordinate system in the captured train image.
Since the world coordinate system is a three-dimensional coordinate system with a physical length as a unit, the image pixel coordinate system is a two-dimensional coordinate system with a pixel number as a unit, and the imaging principle of the area camera is complex, many intermediate processes are required between the world coordinate system and the image pixel coordinate system, so that the mutual conversion between the coordinate position of the image pixel coordinate system corresponding to the train image and the coordinate position of the world coordinate system corresponding to the real space can be realized. For a specific method, refer to fig. 3.
As shown in fig. 3, step S120 in the embodiment shown in fig. 2: the method specifically comprises the following steps of:
S121: the lens optical center of the area camera is used as an origin of a coordinate system, and a vertical line of a railway track passing through the lens optical center is used as a Z axis, so that a world coordinate system is established.
The world coordinate system is a fixed coordinate system and cannot be changed due to rotation of the area camera, and the world coordinate system and the image pixel coordinate system can be connected by taking the lens optical center of the area camera as the origin of the coordinate system of the world coordinate system, so that the two are convenient to mutually convert; the distance between the vertical surface of the railway track and the train part and the optical center of the lens is constant, and the vertical line of the railway track passing through the optical center of the lens is taken as a Z axis, so that the coordinate positions of the structures such as the train part and the railway track in an image pixel coordinate system and the coordinate positions of the structures in a world coordinate system can be rapidly and accurately transformed. Further, after the train image is acquired, the space coordinates in the world coordinate system can be calculated through the pixel coordinates of the train parts and the railway support rail in the image pixel coordinate system, the positions of the train parts and the railway support rail in the real space can be determined, and the quick and accurate measurement of the heights of the train parts can be realized.
S122: the optical center of the lens is used as an origin of a coordinate system, the optical axis of the area array camera is used as a Z axis, and the mirror surface where the lens is positioned is used as an XOY surface, so that a three-dimensional camera coordinate system is established.
The camera coordinate system is established by taking the lens optical center as the origin of the coordinate system, namely the position of the train parts and the railway track in the real space and the position of the train image are described by taking the lens optical center as the reference point, so that the camera coordinate system is taken as the reference coordinate system, and the mutual conversion between the world coordinate system and the image pixel coordinate system is realized. When the area array camera shoots perpendicular to the vertical plane where the train parts and the train support rail are located together, the optical axis of the area array camera coincides with the vertical line of the railway support rail passing through the optical center of the area array camera lens, so that the optical axis of the area array camera is used as the Z axis of a camera coordinate system, the quick and accurate conversion of the camera coordinate in the camera coordinate system and the space coordinate in the world coordinate system can be realized, and the quick and accurate conversion of the coordinates of the train parts and the railway support rail between the world coordinate system and the image pixel coordinate system can be further realized.
S123: and establishing a two-dimensional image physical coordinate system by taking an intersection point of the train image and the optical axis as an origin of the coordinate system and an image plane of the train image as an XOY plane.
As can be seen from fig. 1, the image plane of the train image is the image plane of an area camera, the area camera images the structures such as train parts and railway tracks in real space to the image plane, so that a train image with a certain size can be obtained, and the image plane, mirror plane and object plane of the area camera are parallel to each other and the center of the area camera is on the same optical axis. Therefore, by taking the intersection point of the train image and the optical axis as the origin of the coordinate system and taking the image plane of the train image as the XOY plane, a two-dimensional image physical coordinate system is established, and the mutual conversion of the coordinates of the world coordinate system, the coordinates of the camera coordinate system and the coordinates of the image physical coordinate system can be rapidly and accurately carried out on the train parts and the railway track, so that the operation amount of conversion work is reduced, and the rapid and accurate calculation of the distance between the train parts and the railway track in the real space is realized.
S124: and establishing a two-dimensional image pixel coordinate system by taking the left upper corner end point of the train image as a coordinate system origin and taking an image plane as an XOY plane, wherein X-axis and Y-axis of the camera coordinate system, the image physical coordinate system and the image pixel coordinate system are respectively parallel to each other.
The image pixel coordinate system is a coordinate system corresponding to the train image, the XOY plane of the image pixel coordinate system is an image plane, and the image pixel coordinate system is the same as the XOY plane of the image physical coordinate system, so that the coordinate conversion of the train parts and the railway track between the image physical coordinate system and the image pixel coordinate system is facilitated; the X axis and the Y axis of the camera coordinate system, the image physical coordinate system and the image pixel coordinate system are respectively parallel to each other, so that the mutual conversion of the coordinate positions of the train parts and the railway track among the coordinate systems is facilitated, and the operation amount is further reduced. Meanwhile, since the image pixel coordinate system is a coordinate system taking pixels as a unit and does not express the position of the pixel point in the image by taking physical length as a unit, a conversion relation between the size of the image pixel point and the actual physical length needs to be established; and because the origin of the coordinate system of the image pixel coordinate system is the upper left corner end point of the train image, the coordinate position of the origin of the coordinate system of the image physical coordinate system in the image pixel coordinate system needs to be considered when the train parts and the railway track are converted between the image physical coordinate system and the image pixel coordinate system.
By establishing the three-dimensional world coordinate system, the camera coordinate system, the two-dimensional image physical coordinate system and the image pixel coordinate system and by the coordinate correspondence between the coordinate systems, the coordinate positions of the train parts and the railway track between the train image and the real space can be rapidly and accurately converted, so that the accurate calculation of the heights of the train parts can be rapidly realized according to the coordinate positions of the train parts and the railway track in the train image.
S130: and respectively acquiring pixel coordinates of the train parts and the railway track in the train image according to the image pixel coordinate system.
The pixel coordinates of the train parts and the railway track are obtained through the image pixel coordinate system, so that the image positions of the train parts and the railway track on the train image can be accurately determined, the calibration of the train parts is convenient, and the actual positions of the train parts and the railway track are accurately determined according to the image positions of the train parts and the railway track.
S140: and calculating the distance between the train part and the railway track in the real space according to the pixel coordinates of the train part, the pixel coordinates of the railway track and the corresponding parameters of the coordinates, and taking the distance as the height of the train part.
According to the coordinate corresponding parameters and the pixel coordinates of the train parts and the railway tracks in the train image respectively, the actual positions of the train parts and the railway tracks in the real space can be accurately calculated according to the positions of the train parts and the railway tracks on the train image, and the distance between the train parts and the railway tracks in the real space can be determined according to the actual positions of the train parts and the railway tracks, so that the actual height of the train parts can be accurately determined.
Step S140 in the embodiment shown in fig. 2: according to the pixel coordinates of the train part and the railway track and the corresponding parameters of the coordinates, the method for calculating the distance between the train part and the railway track in the real space specifically please refer to fig. 4 specifically comprises the following steps:
s141: and calculating physical coordinates of the train parts and the railway track in the image physical coordinate system according to the pixel coordinates of the train parts and the railway track, the physical dimensions of the X axis and the Y axis in the image physical coordinate system corresponding to each pixel point of the image pixel coordinate system and the coordinates of the origin of the coordinate system of the image physical coordinate system in the image pixel coordinate system.
The origin of the image physical coordinate system and the origin of the image pixel coordinate system do not coincide, if the origin of the image physical coordinate system is (u) in the image pixel coordinate system (u, v) o ,v o ) The physical dimensions of each pixel point on the image pixel coordinate system in the directions of the x axis and the y axis of the image physical coordinate system are dx and dy respectively, so that any one image in the train image is formedThe pixels (each pixel in the train image is generally rectangular) satisfy the following relationship in two coordinate systems:
wherein u and v are the pixel abscissa and the pixel ordinate of a pixel point in the image pixel coordinate system, respectively, and x u And y v For the physical abscissa and the physical ordinate in the physical coordinate system of the image corresponding to the pixel point, u o And v o The coordinate system origin of the image physical coordinate system is the pixel abscissa and the pixel ordinate in the image pixel coordinate system, dx and dy are the physical dimensions of each pixel point in the image pixel coordinate system in the x-axis and y-axis directions of the image physical coordinate system. The pixel coordinates of the train parts and the railway track in the train image can be converted into physical coordinates in an image physical coordinate system through the formula.
S142: and calculating camera coordinates of the train parts and the railway track in a camera coordinate system according to physical coordinates of the train parts and the railway track, the focal length of the area array camera and the vertical line distance from the optical center of the lens to the railway track.
The image physical coordinate system is a two-dimensional coordinate system, the camera coordinate system is a three-dimensional coordinate system, the two coordinate systems are mutually converted, the focal length required to be applied to the area array camera is realized, and the coordinate conversion relationship between the image physical coordinate system and the camera coordinate system is as follows:
wherein x is u And y u X is the abscissa and the ordinate of a certain point of the physical coordinate system of the image respectively c And y c Respectively the abscissa and the ordinate of the point in a camera coordinate system, f is the focal length of the area array camera, and z c Distance z from optical center of lens of area camera to perpendicular line of railway track c I.e. the Z-axis coordinate of the point in the camera coordinate system, the distance is constant when the area camera is fixed. The physical coordinates of the images of the train parts and the railway track can be converted into camera coordinates through the formula.The distance from the lens optical center to the perpendicular line of the railway track is the length of the perpendicular line section perpendicular to the vertical plane where the train parts and the railway track are located, which passes through the lens optical center. Because the train parts and the railway track are difficult to completely appear in the same vertical plane, when the height of the train parts is measured, the vertical plane where the railway track is positioned is used as the vertical plane formed by the railway track and the train parts.
S143: and calculating the space coordinates of the train parts and the railway track in the world coordinate system according to the camera coordinates of the train parts and the railway track, the rotation angle of the camera coordinate system corresponding to the world coordinate system and the distance between the origins of the rotated coordinate system.
The coordinate transformation formula between the camera coordinate system and the world coordinate system is as follows:
wherein x is c 、y c And z c Respectively corresponds to the coordinate of X, Y and Z axis of a certain point in a camera coordinate system, x w 、y w And z w The point corresponds to the space coordinates of X, Y and Z axes of the world coordinate system, R is the rotation angle of the world coordinate system corresponding to the camera coordinate system, the reciprocal of R is the rotation angle of the camera coordinate system corresponding to the world coordinate system, and t is the distance between the origins of the two coordinate systems after the world coordinate system rotates. By the formula, the space coordinates of the train parts and the railway track in a world coordinate system can be accurately calculated by combining the camera coordinates of the train parts and the railway track.
S144: and calculating the distance between the train part and the railway track in the real space according to the space coordinates of the train part and the railway track in the world coordinate system.
The distance between the train part and the railway track in the real space can be accurately calculated through the space coordinates of the train part and the space coordinates of the railway track, so that the accurate measurement of the height of the train part is realized. For example: the lowest end of the pilot in the train has a spatial coordinate of (x w11 ,y w12 ,z w13 ) Barrier removing deviceThe spatial coordinates of the railway track directly below the device are (x) w11 ,y w22 ,z w23 ) Because the train parts and the railway track are in the same vertical plane, z w13 =z w23 The distance k=y between the train component and the railway track w12 -y w22 K is the actual height of the barrier.
In summary, according to the rail side train part height measurement method provided by the embodiment of the invention, the area array camera is arranged on the outer side of the railway track, and compared with the train part height measurement method in which the height detection device mentioned in the background art is arranged on the inner side of the track at the bottom of the train, the area array camera can capture train images at an angle close to the horizontal, and the train part images in the train images can not overlap with each other in the height direction, so that the images of all the train parts can be accurately detected, and the area array camera is arranged on the outer side of the railway track, is not easy to touch the bottom of the train, and can reduce the damage probability of the area array camera. By shooting the train image, establishing a world coordinate system of a real space and an image pixel coordinate system of the train image, determining coordinate corresponding parameters between the world coordinate system and the image pixel coordinate system, and further calculating the distance between the train part and the railway track in the real space according to the pixel coordinates of the train part and the railway track in the image pixel coordinate system, so as to accurately detect the height of the train part, and because the accuracy of image detection is higher, the method can realize accurate calibration of the height of the train part.
After determining the height of the train parts, the safety pre-warning needs to be further performed on the train, specifically please refer to fig. 5, as shown in fig. 5, the rail side train part height measuring method shown in fig. 2 further comprises the following steps:
s210: and judging whether the absolute value of the difference between the height of the train part and the preset measured height exceeds a preset threshold value, if so, executing step S220.
S220: and alarming the overrun of the height of the train parts.
Whether the absolute value of the difference value between the height of the train part and the preset measured height exceeds a preset threshold value or not can be judged, whether the train part accords with the standard or fails or not can be accurately judged, and then train accidents caused by the fact that the height of the train part exceeds the limit can be estimated, so that early warning is carried out on train safety, and safety protection on the train is enhanced. The preset measured height of the train part can be a historical measured average value or an empirical value of the train part.
In addition, in order to improve measurement accuracy during actual height measurement, the shooting angle of the area camera needs to be adjusted, and a specific operation method is generally to rotate the area camera, for example, horizontally or vertically, so as to shoot the structure of a specific train component, at this time, a certain compensation needs to be performed on the shooting angle of the area camera, as shown in fig. 6, and the method for measuring the height of the rail train component provided in the embodiment shown in fig. 2 further includes the following steps:
S310: judging whether the area camera rotates, and executing step S320 when the area camera rotates.
The planar array camera rotates, so that the camera coordinate system, the image physical coordinate system and the image pixel coordinate system of the planar array camera rotate along with the planar array camera, and the offset angles are the same, namely the coordinate corresponding parameters among the three coordinate systems cannot be changed. However, the world coordinate system does not rotate with the area camera, so that the coordinate corresponding parameters between the world coordinate system and the camera coordinate system are changed. By judging whether the area array camera rotates or not, the coordinate corresponding values between the world coordinate system and the camera coordinate system can be adjusted according to the offset angle of the area array camera, so that accurate space coordinates of the train parts and the railway support rail in the world coordinate system are obtained. The rotation of the area-array camera refers to the rotation taking the optical center of the lens of the area-array camera as the center.
S320: and acquiring an offset angle between the optical axis of the area array camera and the perpendicular line of the railway track.
The Z axis of the camera coordinate system is the optical axis of the area array camera, and the Z axis of the world coordinate system is the vertical line of the railway track passing through the optical center of the lens, so that the offset angle between the optical axis of the area array camera and the vertical line of the railway track can be obtained, namely, the offset angle between the camera coordinate system and the world coordinate system can be obtained, and the coordinate corresponding parameters between the camera coordinate system and the world coordinate system can be compensated through the offset angle, so that the coordinate conversion between the camera coordinate system and the world coordinate system can be accurately realized. The offset angle is a rotation angle between an optical axis and a vertical line of a railway track caused by rotation of the area array camera, and can be disassembled into a horizontal offset angle and a vertical offset angle.
S330: the offset angle is used to compensate for the rotation angle of the camera coordinate system corresponding to the world coordinate system.
Assuming that the optical axis of the area camera is offset downwards by an angle R1 relative to the perpendicular of the railway track, in the formulaIn the method, the world coordinate system rotates upwards as "+" relative to the camera coordinate system, and the downward rotation as "-" changes the original formula into +.>Namely, the condition of inaccurate height measurement caused by rotation of the area-array camera can be eliminated.
According to the method, when the area array camera rotates, the offset angle between the optical axis of the area array camera and the vertical line of the railway track can be obtained, namely the offset angle between the camera coordinate system and the world coordinate system can be obtained, and further the rotation angle of the original camera coordinate system corresponding to the world coordinate system is compensated according to the offset angle, so that coordinate conversion between the camera coordinate system and the world coordinate system can be accurately realized, and further the height of the train part in the real space can be accurately deduced according to the image pixel coordinates of the train part and the railway track in the train image.
Meanwhile, as a simpler train part height measurement method, the height of the train part can be calculated by calculating the number of pixel points in the train image. As shown in fig. 7, the method for measuring the height of the rail-side train parts in the embodiment shown in fig. 2 further includes the following steps:
S410: acquiring the number of pixel points between an image of a train part and an image of a railway track;
s420: calculating the actual length of each pixel point in the corresponding real space;
s430: and calculating the actual distance between the train parts and the railway track according to the number of the pixel points and the actual length, and taking the actual distance as the height of the train parts.
The product of the number of pixel points between the train parts and the railway track and the actual length is calculated to serve as the height of the train parts, so that the height of the train parts can be calculated simply and conveniently.
When the area camera is used for detecting the height of the train parts, the train may be in a running state, and at this time, if the area camera is not timely shot, the missing detection is easily caused on the train parts, in order to solve the problem, as shown in fig. 8, the rail side train part height measuring method in the embodiment shown in fig. 2 further comprises the following steps:
s510: and acquiring the moving speed of the train by using the speed measuring magnetic steel assembly.
The speed measurement magnetic steel component is magnetic equipment, when a train passes through the speed measurement magnetic steel component, the speed measurement magnetic steel component can generate an electric signal because the train wheels cut magnetic lines of force, the train wheels can be determined to pass through the speed measurement magnetic steel component by detecting the electric signal, and generally the speed measurement magnetic steel component comprises two magnetic steels arranged along the length of a rail, the distance between the two magnetic steels is known, and the moving speed of the train can be calculated according to the time of the train wheels passing through the two magnetic steels.
S520: and calculating the moving time of the train reaching the shooting area of the area array camera according to the moving speed of the train and the distance between the speed measuring magnetic steel assembly and the shooting area of the area array camera.
S530: and starting the area-array camera to start shooting according to the moving time.
According to the distance between the speed measuring magnetic steel component and the shooting area of the area array camera and the moving speed of the train, the moving time of the train reaching the shooting area of the area array camera is calculated, and the time machine started by the area array camera can be selected according to the moving time, so that the train image can be timely acquired, and the omission of detection on train parts is reduced.
The clarity of the train image shot by the area array camera is related to the train speed, when the train speed is greater than the preset speed, the train image acquired by the area array camera is blurred, in order to solve the problem, as shown in fig. 9, the method for measuring the height of the rail side train parts in the embodiment shown in fig. 2 further comprises the following steps:
s610: whether the moving speed of the train is less than or equal to the predetermined vehicle speed is determined, and if the moving speed of the train is less than or equal to the predetermined vehicle speed, step S620 is executed.
By judging whether the moving speed of the train is less than or equal to the preset vehicle speed, the train can be photographed when the moving speed of the train is less than or equal to the preset vehicle speed, so that a train image with higher definition can be obtained.
S620: and selecting a camera exposure speed corresponding to the train speed to photograph the train.
When the moving speed of the train is smaller than or equal to the preset speed, the camera exposure speed corresponding to the train speed is selected to shoot the train, so that a high-definition train image can be obtained, the quality of the shot train image is ensured, and the height detection of train parts can be accurately carried out through the train part image and the railway track image on the train image.
Based on the same inventive concept, the invention also provides an embodiment of the rail side train part height measurement system corresponding to the rail side train part height measurement method provided by the invention, and because the method corresponding to the height measurement system is the rail side train part height measurement method in the embodiment of the application, and the principle and the method of solving the problem of the system are similar, the implementation of the system can refer to the implementation of the method, and the repetition is omitted.
Referring to fig. 10 and 11, schematic structural diagrams of a rail train part height measurement system according to an embodiment of the present invention are shown in fig. 10 and 11, where the rail train part height measurement system includes:
An area camera 101 disposed outside the railway track and at a predetermined distance from the railway track, for capturing images of the train;
the area camera 101 is disposed outside the railway track and at a predetermined distance from the railway track, and compared with the height detection device disposed inside the track at the bottom of the train mentioned in the background art, the area camera 101 can capture train images at an angle close to horizontal, in which the train part images in the height direction do not overlap with each other, so that the structures of different train parts can be clearly and accurately detected from the train images. In addition, the area camera 101 is arranged on the outer side of the railway track, the area camera 101 is not easy to touch the bottom of a train, and the damage probability of the area camera 101 can be reduced. The train parts comprise a stone sweeper, a sand pipe, a barrier, a coupler and the like.
As shown in fig. 10, the height detection system for a rail-side train part provided in this embodiment further includes a controller 102 electrically connected to the area camera 101, and referring specifically to fig. 11, the controller 102 includes:
the coordinate system establishing module 1021 is used for respectively establishing a world coordinate system corresponding to the real space where the train is located and an image pixel coordinate system corresponding to the train image, and determining coordinate corresponding parameters between the world coordinate system and the image pixel coordinate system;
The world coordinate system is a three-dimensional coordinate system, and uses the actual length in space as a coordinate system unit, so as to describe the positions of the train components, the railway track, the area camera 101 and other objects in the real space. The image pixel coordinate system is a two-dimensional coordinate system, and uses the number of pixel points as a coordinate system unit, so as to describe the positions of the train components, the railway track, the area camera 101 and other objects on the train image. The train image is an image imaged by the area camera 101 at the image plane position.
The coordinate system establishment module 1021 can determine the positions of the structures such as the train components and the railway track in the real space and the positions of the structures in the train image by establishing a world coordinate system corresponding to the real space where the train is located and an image pixel coordinate system corresponding to the train image. By determining the coordinate corresponding parameters between the world coordinate system and the image pixel coordinate system, the coordinate positions of the train parts and the railway track in the world coordinate system can be calculated according to the coordinate positions of the train parts and the railway track in the image pixel coordinate system in the captured train image.
A pixel coordinate sub-calculator 1022 electrically connected to the coordinate system establishment module 1021 and the area camera 101, for calculating pixel coordinates of the train component and the railway track in the train image according to the image pixel coordinate system;
The pixel coordinate sub-calculator 1022 obtains the pixel coordinates of the train parts and the railway track through the image pixel coordinate system, can accurately determine the image positions of the train parts and the railway track on the train image, is convenient for calibrating the train parts, and further accurately determines the actual positions of the train parts and the railway track according to the image positions of the train parts and the railway track.
And the height sub-calculator 1023 is electrically connected with the pixel coordinate sub-calculator 1022 and is used for calculating the distance between the train part and the railway track in the real space according to the pixel coordinates and the coordinate corresponding parameters of the train part and the railway track, and the distance is used as the height of the train part.
According to the coordinate corresponding parameters and the pixel coordinates of the train parts and the railway track in the train image respectively, the Gao Duzi calculator 1023 can accurately calculate the actual positions of the train parts and the railway track in the real space, and determine the distance between the train parts and the railway track in the real space according to the actual positions of the train parts and the railway track, so that the actual height of the train parts can be accurately determined.
According to the rail side train part height measurement system provided by the embodiment of the invention, the area array camera 101 is arranged outside the railway track and at a certain distance from the railway track, compared with a train part height measurement scheme that the height detection device is arranged on the inner side of the track at the bottom of the train in the background art, the area array camera 101 can capture train images at an angle close to the horizontal, and the train part images in the train images can not overlap with each other in the height direction, so that the images of all the train parts can be accurately detected, and the area array camera 101 is arranged on the outer side of the railway track and is not easy to touch the bottom of the train, so that the damage probability of the area array camera can be reduced. The controller 102 captures the train image through the area array camera 101, establishes a world coordinate system of the real space and an image pixel coordinate system of the train image, and determines coordinate corresponding parameters between the two, so that the distance between the train part and the railway track in the real space can be calculated according to the pixel coordinates of the train part and the railway track in the image pixel coordinate system, and the height of the train part can be further accurately detected. Because the accuracy of image detection is higher, the system can realize the accurate calibration of the height of train parts.
Referring to fig. 10, as a preferred embodiment of the present invention, the rail side train part height measurement system further includes, in addition to the structure described in the above embodiment:
the first light supplementing source 103 is electrically connected with the controller 102, and an irradiation area of the first light supplementing source 103 overlaps with and covers an imaging area of the area array camera 101.
By arranging the first light supplementing source 103, the first light supplementing source 103 can carry out light supplementing treatment on an imaging area of the train shot by the area array camera 101, so that the area array camera 101 can acquire a train image with higher definition, and the situations that the resolution of the image is not high due to dim and fuzzy images and the structures such as parts and railway tracks on the train image are difficult to accurately distinguish are reduced. And the irradiation area of the first light supplementing source 103 is overlapped with the imaging area of the area camera 101, so that the overall brightness of the train image acquired by the area camera 101 is improved.
The irradiation direction of the first light supplementing source 103 has a certain included angle with the shooting direction of the area camera 101. Because the sizes and the positions of the train parts are different, the shape that the light rays of the first light supplementing source 103 are zigzag changed along with the depth of the train surface parts can be observed when the light rays are observed in the shooting direction with a certain included angle with the irradiation direction of the first light supplementing source 103, so that the three-dimensional image of the train is acquired. Through the three-dimensional image of the train, the structure of the train can be observed more clearly, and the height of the train parts can be acquired more accurately.
In order to solve the problem of missing detection of train parts when the area camera 101 is used to detect the height of train parts, the system for measuring the height of train parts on the rail side according to the present embodiment, as a preferred embodiment of the present invention, includes, in addition to the structure mentioned in the above embodiment:
the speed measuring magnetic steel assembly 104 is fixed on the inner side surface of the railway track and is used for detecting the moving speed of the train.
The speed measurement magnetic steel assembly 104 is a magnetic device, when a train passes through the speed measurement magnetic steel assembly 104, the speed measurement magnetic steel assembly 104 can generate an electric signal because the train wheels cut magnetic lines of force, the train wheels can be determined to pass through the speed measurement magnetic steel assembly 104 by detecting the electric signal, and generally, the speed measurement magnetic steel assembly 104 comprises two magnetic steels arranged along the length of a rail, the distance between the two magnetic steels is known, and the moving speed of the train can be calculated according to the time of the train wheels passing through the two magnetic steels.
In this embodiment, as shown in fig. 12, the controller 102 further includes a movement time sub-calculator 1024 electrically connected to the speed measuring magnetic steel assembly 104, for calculating a movement time of the train reaching the imaging area of the area camera 101 according to a movement speed of the train and a distance between the speed measuring magnetic steel assembly 104 and the area camera 101.
The moving time sub-calculator 1024 is also electrically connected to the area camera 101 for starting the area camera 101 to take a picture according to the moving time.
According to the distance between the speed measuring magnetic steel component 104 and the shooting area of the area array camera 101 and the moving speed of the train, the moving time of the train reaching the shooting area of the area array camera 101 is calculated, and the speed and the time for starting the area array camera 101 can be selected according to the moving time, so that the area array camera 101 can be controlled to acquire train images in time, and the omission condition of train parts is reduced.
In addition, since the sharpness of the train image captured by the area camera 101 is related to the train speed, when the train speed is greater than the predetermined speed, the train image captured by the area camera 101 is blurred, and in order to solve this problem, as shown in fig. 13, the controller 102 further includes:
the moving speed comparator 1025 is electrically connected with the speed measuring magnetic steel assembly 104 and is used for judging whether the moving speed of the train is less than or equal to a preset speed;
by judging whether the moving speed of the train is less than or equal to the preset vehicle speed, the train can be photographed when the moving speed of the train is less than or equal to the preset vehicle speed, so that a train image with higher definition can be obtained.
And an exposure speed selector 1026 electrically connected to the movement speed comparator 1025 and the area camera 101, respectively, for selecting an exposure speed corresponding to the train speed to photograph the train.
When the moving speed of the train is smaller than or equal to the preset speed, the camera exposure speed corresponding to the train speed is selected to shoot the train, so that a high-definition train image can be obtained, the quality of the shot train image is ensured, and the height of train parts can be accurately detected through the train part image and the railway track image on the train image.
As another preferred embodiment of the present invention, referring to fig. 10 and 13, as shown in fig. 10, the rail side train part height measurement system further includes:
and a line camera 105 disposed outside the railway track and at a predetermined distance from the railway track, for capturing a line-array car image.
The line camera 105 is a camera that uses a line image, and can acquire a two-dimensional line-array car image in a "line" shape, and by acquiring a line-array car image in a "line" shape of a train, that is, detecting a "line" shape image including train components and a railway track, it is possible to improve detection accuracy and to exclude interference of other structures.
As shown in fig. 13, the controller 102 further includes: and the pixel acquirer 1027 is electrically connected with the linear array camera 105 and is used for acquiring the number of pixel points from the train parts to the railway support rail in the train image.
The train image is composed of a large number of pixels, especially in the two-dimensional line array car image shot by the line array camera 105, a plurality of K pixels exist in the length direction of the line array car image, but only a few pixels exist in the width direction, so that the pixel acquirer 1027 is convenient for acquiring the number of pixels between the train parts and the railway track in the train image. The distance between the train part and the railway track in the train image can be obtained by detecting the number of the pixel points.
And a length calculator 1028 electrically connected to the pixel acquirer 1027, for calculating the actual length of the train component and the railway track in the vertical plane of the real space corresponding to each pixel point.
The linear distance between the area camera 101 and the vertical plane where the train component and the railway track are located is constant, so that the actual length of the vertical plane corresponding to each pixel point is constant, and the actual distance from the train component to the railway track can be further accurately calculated by calculating the actual length of the train component corresponding to each pixel point and the actual length of the railway track in the vertical plane.
Gao Duzi calculator 1023 is also electrically connected to length calculator 1028, and is further configured to calculate a distance between the train component and the railway track as a height of the train component according to the number of pixels and the actual length.
The actual distance from the train component to the railway track is calculated by calculating the product of the number of pixel points between the train component and the railway track and the actual length corresponding to each pixel point, so that the height of the train component can be simply and conveniently obtained.
In addition, as shown in fig. 10, the rail side train part height measurement system further includes: a second light supplementing source 106 electrically connected to the controller 102, wherein an irradiation area of the second light supplementing source 106 overlaps with an imaging area of the line camera 105 and covers the imaging area of the line camera 105; wherein, the width of the line array car image of the line array camera 105 is greater than or equal to the train running distance per unit shooting time. The unit shooting time is shooting time from the beginning of shooting to the ending of shooting for acquiring a train image by the area array camera.
The irradiation area of the second light supplementing source 106 covers the imaging area of the line camera 105, and can supplement light for the imaging area shot by the line camera 105, so that the line camera 105 obtains a high-definition train image, and the situations that the resolution of the appointed image is not high due to dim and blurred images, and structures such as parts and railway tracks in the line train image are difficult to accurately distinguish are reduced.
In order to solve the problem that there are a plurality of cars in a train and accordingly, there are a large number of component structures in the train, and it is difficult to measure the heights of all the component structures when the train is overhauled, for example, warehouse entry overhauled, the area camera 101 includes, as a preferred embodiment: a single area camera, which is provided with a horizontal rotation device (not shown) capable of horizontally rotating, is provided at a predetermined distance from the railway track.
The single area array camera is at a preset distance from the railway track, the visual field of the area array camera is relatively wide, and the shot train images can contain train parts and the railway track which need to be detected; the area array camera horizontally rotates, train images can be shot at different angles along the length direction of the train, and further the height detection of different train parts in the length direction of the train is realized.
Or the surface array camera arrays are arranged at a preset distance from the railway track and along the railway track, and the optical axis of each surface array camera in the surface array camera arrays is perpendicular to the railway track.
The area array camera array is arranged along the railway track and is perpendicular to the railway track to shoot train images, and a large number of images of train parts at different positions of the train can be acquired at the same time, so that the rapid detection of the heights of the train parts is realized.
Wherein, the shooting interval time of the adjacent area cameras 101 in the area camera array is equal to the ratio of the distance between the adjacent area cameras 101 to the moving speed of the train. By setting the ratio of the shooting interval time of the adjacent area array cameras 101 to the distance between the adjacent area array cameras 101 and the moving speed of the train to be the same, the position difference of the train parts and the railway track in each shot train image of the area array cameras 101 is not large, and by comparing a plurality of train images shot by the adjacent area array cameras 101, the pixel coordinates of the train parts and the railway track can be accurately measured according to the plurality of train images, so that the distance between the train parts and the railway track in the real space, namely the height of the train parts, can be accurately calculated.
In order to realize the conversion of coordinates between an image pixel coordinate system corresponding to the train image and a real space corresponding world coordinate system, coordinate corresponding parameters between the coordinate systems need to be acquired. In order to accurately acquire the coordinate corresponding parameters between the coordinate systems, as a preferred embodiment of the present invention, as shown in fig. 14, the rail-side train part height measurement system further includes:
a calibration plate 107 that moves in the train longitudinal direction and the optical axis direction of the area camera 101 within the imaging area of the area camera 101. The area camera 101 is also used for acquiring a plurality of calibration plate images during the movement of the calibration plate.
In the imaging area of the area camera 101, the calibration plate 107 moves along the length direction of the train and the optical axis direction of the area camera 101, so that in the obtained calibration plate image, the coordinates of the same position of the calibration plate 107 are different, and the coordinate corresponding parameters between the coordinate systems can be determined through the different coordinates of the same position. Wherein the calibration plate 107 may be a black and white checkerboard.
The controller 102 is further configured to obtain pixel coordinates of a plurality of corner points on the calibration plate 107 according to the plurality of calibration plate images; and calculating the coordinate corresponding parameters according to the pixel coordinates of the plurality of corner points.
And acquiring coordinate corresponding parameters through pixel coordinates of a plurality of corner points, and converting the coordinates of the train parts and the railway track in the real space according to the coordinate corresponding parameters when the area camera 101 acquires the train image, so as to accurately acquire the distance between the train parts and the railway track in the real space. The parameters corresponding to the coordinates mainly include internal parameters of the area camera 101, and specifically include: the physical dimensions of the X axis and the Y axis in the image physical coordinate system corresponding to each pixel point of the image pixel coordinate system and the coordinates of the origin of the coordinate system of the image physical coordinate system in the image pixel coordinate system.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments.
The above embodiments of the present invention do not limit the scope of the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (10)

1. The method for measuring the height of the parts of the rail-side train is characterized by comprising the following steps of:
capturing a train image using an area array camera disposed outside of a railway track, the train image including a train part image and the railway track image;
respectively establishing a world coordinate system corresponding to a real space where a train is located and an image pixel coordinate system corresponding to an image of the train, and determining coordinate corresponding parameters between the world coordinate system and the image pixel coordinate system;
the step of respectively establishing a world coordinate system corresponding to the real space where the train is located and an image pixel coordinate system corresponding to the train image comprises the following steps:
the lens optical center of the area array camera is used as an origin of a coordinate system, and a vertical line of a railway track passing through the lens optical center is used as a Z axis, so that the world coordinate system is established;
Taking the optical center of the lens as an origin of a coordinate system, taking the optical axis of the area array camera as a Z axis, and taking the mirror surface of the lens as an XOY surface to establish a camera coordinate system;
establishing a two-dimensional image physical coordinate system by taking an intersection point of the train image and the optical axis as an origin of a coordinate system and an image plane of the train image as an XOY plane;
establishing a two-dimensional image pixel coordinate system by taking the left upper corner end point of the train image as a coordinate system origin and taking the image plane as an XOY plane, wherein X axes and Y axes of the camera coordinate system, the image physical coordinate system and the image pixel coordinate system are respectively parallel to each other;
respectively acquiring pixel coordinates of a train part and a railway track in the train image according to the image pixel coordinate system;
according to the pixel coordinates of the train parts and the railway track and the corresponding parameters of the coordinates, calculating the distance between the train parts and the railway track in the real space, and taking the distance as the height of the train parts;
the step of calculating the distance between the train part and the railway track in the real space according to the pixel coordinates of the train part and the railway track and the corresponding parameters of the coordinates comprises the following steps:
Calculating physical coordinates of the train parts and the railway track in the image physical coordinate system according to pixel coordinates of the train parts and the railway track, physical dimensions of an X axis and a Y axis in the image physical coordinate system corresponding to each pixel point of the image pixel coordinate system and coordinates of a coordinate system origin of the image physical coordinate system in the image pixel coordinate system;
calculating camera coordinates of the train parts and the railway track in the camera coordinate system according to physical coordinates of the train parts and the railway track, the focal length of the area array camera and the vertical line distance from the optical center of the lens to the railway track;
calculating the space coordinates of the train parts and the railway track in the world coordinate system according to the camera coordinates of the train parts and the railway track, the rotation angle of the camera coordinate system corresponding to the world coordinate system and the distance between the origins of the coordinate system;
and calculating the distance between the train part and the railway track in real space according to the space coordinates of the train part and the railway track in the world coordinate system.
2. The method for measuring the height of a rail-side train component according to claim 1, further comprising:
Judging whether the absolute value of the difference between the height of the train part and the preset measured height is larger than or equal to a preset threshold value, and if the absolute value of the difference is larger than or equal to the preset threshold value, giving out an overrun alarm to the height of the train part.
3. The method for measuring the height of a rail-side train component according to claim 1, further comprising:
judging whether the area array camera rotates or not;
when the area array camera rotates, acquiring an offset angle between an optical axis of the area array camera and a perpendicular line of the railway track;
the offset angle is used to compensate for the angle of rotation of the camera coordinate system corresponding to the world coordinate system.
4. The method for measuring the height of a rail-side train component according to claim 1, further comprising:
acquiring the moving speed of the train by using a speed measuring magnetic steel assembly;
calculating the moving time of the train reaching the shooting area of the area array camera according to the moving speed of the train and the distance between the speed measuring magnetic steel assembly and the shooting area of the area array camera;
and starting the area-array camera to start shooting according to the moving time.
5. The method for measuring the height of a rail-side train component according to claim 1, further comprising:
Judging whether the moving speed of the train is less than or equal to a preset speed;
and if the moving speed of the train is smaller than or equal to the preset speed, selecting a camera exposure speed corresponding to the moving speed of the train to photograph the train.
6. A rail side train part height measurement system applied to the rail side train part height measurement method of claim 1, comprising:
the area array camera is arranged outside the railway track and is a preset distance away from the railway track and is used for capturing train images;
a controller electrically connected to the area array camera, the controller comprising:
the system comprises a coordinate system establishing module, a coordinate system acquiring module and a coordinate acquiring module, wherein the coordinate system establishing module is used for respectively establishing a world coordinate system corresponding to a real space where a train is positioned and an image pixel coordinate system corresponding to an image of the train, and determining coordinate corresponding parameters between the world coordinate system and the image pixel coordinate system;
the pixel coordinate sub-calculator is electrically connected with the coordinate system building module and the area array camera and is used for respectively calculating pixel coordinates of the train parts and the railway support rail in the train image according to the image pixel coordinate system;
and the height sub-calculator is electrically connected with the pixel coordinate sub-calculator and is used for calculating the distance between the train part and the railway track in the real space according to the pixel coordinates of the train part and the railway track and the corresponding parameters of the coordinates, and the distance is used as the height of the train part.
7. The rail side train component height measurement system of claim 6, further comprising:
and the irradiation area of the first light supplementing source is overlapped with the imaging area of the area array camera and covers the imaging area.
8. The rail side train component height measurement system of claim 6, further comprising:
the speed measuring magnetic steel assembly is fixed on the inner side surface of the railway support rail and is used for detecting the moving speed of a train;
the controller also comprises a moving time sub-calculator electrically connected with the speed measuring magnetic steel component and used for calculating the moving time of the train reaching the imaging area of the area array camera according to the moving speed of the train and the distance between the speed measuring magnetic steel component and the area array camera;
the moving time sub-calculator is also electrically connected with the area array camera and is used for starting the area array camera to start photographing according to the moving time;
the controller further includes:
the moving speed comparator is electrically connected with the speed measuring magnetic steel component and is used for judging whether the moving speed of the train is smaller than or equal to a preset speed;
And the exposure speed selector is respectively and electrically connected with the moving speed comparator and the area array camera and is used for selecting the exposure speed corresponding to the train speed to photograph the train.
9. The rail side train component height measurement system of claim 6, wherein the area array camera comprises:
a single area array camera at a predetermined distance from the railway track, wherein the single area array camera is provided with a horizontal rotation device; or,
and the optical axis of each area array camera in the area array camera array is perpendicular to the railway track.
10. The rail side train component height measurement system of claim 6, further comprising:
a calibration plate moving along the length direction of the railway track and the optical axis direction of the area array camera in the imaging area of the area array camera;
the area array camera is also used for collecting a plurality of calibration plate images in the movement process of the calibration plate;
the controller is further used for acquiring pixel coordinates of a plurality of corner points on the calibration plate according to the plurality of calibration plate images, and calculating the coordinate corresponding parameters according to the pixel coordinates of the plurality of corner points.
CN201610531719.7A 2016-07-07 2016-07-07 Rail side train part height measurement method and system Active CN107588732B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610531719.7A CN107588732B (en) 2016-07-07 2016-07-07 Rail side train part height measurement method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610531719.7A CN107588732B (en) 2016-07-07 2016-07-07 Rail side train part height measurement method and system

Publications (2)

Publication Number Publication Date
CN107588732A CN107588732A (en) 2018-01-16
CN107588732B true CN107588732B (en) 2024-03-26

Family

ID=61046317

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610531719.7A Active CN107588732B (en) 2016-07-07 2016-07-07 Rail side train part height measurement method and system

Country Status (1)

Country Link
CN (1) CN107588732B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109631779A (en) * 2018-11-09 2019-04-16 四川国软科技发展有限责任公司 A kind of detection method and system that the superstructure loosening based on 3D rendering processing falls off
CN109781016B (en) * 2019-03-13 2024-04-16 江西五十铃汽车有限公司 Method for measuring high performance of automobile and the like in real time
CN110108204B (en) * 2019-05-10 2021-06-15 苏州德创测控科技有限公司 Method for detecting position deviation of PIN needle of connector by using lens
CN111006592A (en) * 2019-12-02 2020-04-14 西安宝利铁路器材有限公司 Locomotive hook height monitoring device and method
CN114166132A (en) * 2021-11-11 2022-03-11 中铁大桥科学研究院有限公司 Vehicle height snapshot measuring method and device
CN116148259B (en) * 2022-12-28 2024-03-22 广州市斯睿特智能科技有限公司 Vehicle defect positioning system, method, device and storage medium

Citations (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000180128A (en) * 1998-12-17 2000-06-30 Mitsubishi Electric Corp Thickness measuring method of pantograph slider
KR100807386B1 (en) * 2006-11-30 2008-02-28 한국철도기술연구원 Stop position automatic measure apparatus for train
JP2009103499A (en) * 2007-10-22 2009-05-14 Meidensha Corp Abrasion amount measuring device of trolley wire
CN101925796A (en) * 2008-01-28 2010-12-22 罗伯特.博世有限公司 Method and device for checking referencing of measuring heads in chassis measuring system
CN102069821A (en) * 2010-11-22 2011-05-25 南京大学 Measuring method for non-contact steel rail sagging surface
JP2012098047A (en) * 2010-10-29 2012-05-24 Toshiba Transport Eng Inc Apparatus, method and program for measuring wheel shape
CN202947884U (en) * 2012-12-20 2013-05-22 北京康拓红外技术股份有限公司 Motor train unit operation fault dynamic image detection system
CN103175473A (en) * 2013-03-26 2013-06-26 东莞市诺丽电子科技有限公司 Online monorail car pantograph monitoring system
WO2013099612A1 (en) * 2011-12-28 2013-07-04 川崎重工業株式会社 Displacement detection device for railroad rail
CN103359134A (en) * 2013-07-15 2013-10-23 成都欧莱特自动化控制工程有限公司 Imaging and temperature measuring device for bogie and underframe of running train
CN103440643A (en) * 2013-08-07 2013-12-11 河南科技大学 Single-linear-array camera calibration method
CN203344964U (en) * 2013-06-29 2013-12-18 苏州华兴致远电子科技有限公司 Train bottom image collecting device and train bottom part anomaly detection system
CN103471531A (en) * 2013-09-27 2013-12-25 吉林大学 On-line non-contact measurement method for straightness of axis parts
CN103481910A (en) * 2013-09-29 2014-01-01 苏州华兴致远电子科技有限公司 Train part image collecting system and train part anomaly detection system
CN104527720A (en) * 2014-12-18 2015-04-22 成都主导科技有限责任公司 Image acquisition control method and device and image acquisition system
CN105021126A (en) * 2015-06-18 2015-11-04 中国计量学院 Truck side guard rail mounting size measurement system and method based on machine vision technology
CN105466523A (en) * 2014-09-12 2016-04-06 航天信息股份有限公司 Grain-piling height measuring method and apparatus based on single camera image
CN105513078A (en) * 2015-12-15 2016-04-20 浙江农林大学 Standing tree information acquisition method and device based on images
CN205940468U (en) * 2016-07-07 2017-02-08 苏州华兴致远电子科技有限公司 Rail limit train spare part height measurement system

Patent Citations (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000180128A (en) * 1998-12-17 2000-06-30 Mitsubishi Electric Corp Thickness measuring method of pantograph slider
KR100807386B1 (en) * 2006-11-30 2008-02-28 한국철도기술연구원 Stop position automatic measure apparatus for train
JP2009103499A (en) * 2007-10-22 2009-05-14 Meidensha Corp Abrasion amount measuring device of trolley wire
CN101925796A (en) * 2008-01-28 2010-12-22 罗伯特.博世有限公司 Method and device for checking referencing of measuring heads in chassis measuring system
JP2012098047A (en) * 2010-10-29 2012-05-24 Toshiba Transport Eng Inc Apparatus, method and program for measuring wheel shape
CN102069821A (en) * 2010-11-22 2011-05-25 南京大学 Measuring method for non-contact steel rail sagging surface
WO2013099612A1 (en) * 2011-12-28 2013-07-04 川崎重工業株式会社 Displacement detection device for railroad rail
CN202947884U (en) * 2012-12-20 2013-05-22 北京康拓红外技术股份有限公司 Motor train unit operation fault dynamic image detection system
CN103175473A (en) * 2013-03-26 2013-06-26 东莞市诺丽电子科技有限公司 Online monorail car pantograph monitoring system
CN203344964U (en) * 2013-06-29 2013-12-18 苏州华兴致远电子科技有限公司 Train bottom image collecting device and train bottom part anomaly detection system
CN103359134A (en) * 2013-07-15 2013-10-23 成都欧莱特自动化控制工程有限公司 Imaging and temperature measuring device for bogie and underframe of running train
CN103440643A (en) * 2013-08-07 2013-12-11 河南科技大学 Single-linear-array camera calibration method
CN103471531A (en) * 2013-09-27 2013-12-25 吉林大学 On-line non-contact measurement method for straightness of axis parts
CN103481910A (en) * 2013-09-29 2014-01-01 苏州华兴致远电子科技有限公司 Train part image collecting system and train part anomaly detection system
CN105466523A (en) * 2014-09-12 2016-04-06 航天信息股份有限公司 Grain-piling height measuring method and apparatus based on single camera image
CN104527720A (en) * 2014-12-18 2015-04-22 成都主导科技有限责任公司 Image acquisition control method and device and image acquisition system
CN105021126A (en) * 2015-06-18 2015-11-04 中国计量学院 Truck side guard rail mounting size measurement system and method based on machine vision technology
CN105513078A (en) * 2015-12-15 2016-04-20 浙江农林大学 Standing tree information acquisition method and device based on images
CN205940468U (en) * 2016-07-07 2017-02-08 苏州华兴致远电子科技有限公司 Rail limit train spare part height measurement system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于图像的列车部件完整性检测方法及系统研发;谢冠星等;《中国优秀硕士论文全文数据库(工程科技II辑)》;20200115(第1期);正文第17-26页 *
铁轨表面缺陷机器视觉检测成像方法与装置研究;高健;《中国优秀硕士学位论文全文数据库(信息科技辑)》;20140515(第5期);正文第18-25页 *

Also Published As

Publication number Publication date
CN107588732A (en) 2018-01-16

Similar Documents

Publication Publication Date Title
CN107588732B (en) Rail side train part height measurement method and system
US10501059B2 (en) Stereo camera device
CN111289261B (en) Detection method for in-warehouse bottom piece
Xu et al. Real-time 3D shape inspection system of automotive parts based on structured light pattern
CN206420439U (en) Contact net geometric parameter detection means based on machine vision
WO2016095328A1 (en) Vehicle operation fault detection system and method
JP6277468B2 (en) Vehicle power pole position inspection device
CN108274463A (en) Train Ku Jian robots and Train Parts detection method
KR20120087680A (en) The measurement method of PCB bump height by using three dimensional shape detector using optical triangulation method
US20160364851A1 (en) Defect inspection method and apparatus
CN107621229B (en) Real-time railway track width measurement system and method based on area array black-and-white camera
CN110779451B (en) Vehicle size measuring device and method based on single camera
CN205940468U (en) Rail limit train spare part height measurement system
Rikhotso et al. 3D rail modelling and measurement for rail profile condition assessment
KR100756009B1 (en) System for 3d plane image pick up of container and a method thereof
CN109238149B (en) Vehicle body attitude detection device and contact line dynamic offset detection system
TW201907136A (en) Stereo image and laser scanning ranging integration method
CN102069821B (en) Measuring method for non-contact steel rail sagging surface
Judek et al. Analysis of measurement errors in rail vehicles’ pantograph inspection system
JP2012154910A (en) Measuring device for measuring cross-sectional shape of tire tread surface and depth of tread groove
JP2004309492A (en) Construction and civil engineering structure measurement/analysis system
JP3261199B2 (en) Pantograph frame deformation inspection device
JP5156211B2 (en) Distance measurement method from vehicle to traffic light
JPH10185514A (en) Coil position detector
US20230286557A1 (en) Diagnostic inspection system for inspecting railway components

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant