Disclosure of Invention
In order to solve the technical problems, the invention provides a train door positioning method based on linear array image variable-proportion recovery, and aims to overcome the defect that the positioning precision of the conventional high-speed rail platform door on the train stop train door is not enough.
The invention is realized by adopting the following technical scheme:
the train door positioning method based on linear array image variable-scale recovery comprises the following steps:
s100, a linear array camera arranged at the fixed position of the station entering end acquires a scanning image of the train entering the station by adopting a fixed line frequency; the line scan camera is calibrated in advance: which scans at the fixed line frequency at a reference speedVrefA moving standard component, wherein the unit pixel distance in the formed linear array image corresponds to the reference width of the world coordinate systemWref;
Step S200, identifying the train number in the scanning image, and acquiring the width of the door of the current train from a train number-vehicle type database according to the train numberWstd1;
Step S300, identifying each vehicle door target in the scanned image, and recording the horizontal pixel coordinates of the front side of each vehicle door in the image
R1(
i) And horizontal pixel coordinates of the rear side of the vehicle door
L1(
i),Calculate the first
iInitial width of individual door
,
iThe serial number of the car door from the car head;
step S400, calculating
iFirst local distortion coefficient of individual vehicle door
Fitting the global distortion coefficient of the train according to the first local distortion coefficient of each door
Wherein
xIs the horizontal pixel coordinate of the image,
the unit pixel distance corresponds to the width of the image coordinate system for different horizontal pixel positions;
step S500, calculating the actual width of each vehicle door according to the overall distortion coefficient
And the distance from the front side or the rear side of each door to the vehicle head;
and S600, acquiring the locomotive position of the train after the train is stopped stably, and outputting the positioning result of each vehicle door according to the relative distance from each vehicle door to the locomotive.
Although the train reconnection position and/or the length of a single train car may find deformation due to long-term operation, such deformation may cause a deviation in the door positioning on the tail side due to accumulation from the head to the tail. But particularly, the deformation of each car door is almost negligible, and the train door positioning method based on linear array image variable proportion recovery is realized based on the characteristic that a single train door has no deformation.
Optionally, step S200 further includes obtaining the window width of the current train from the train number-train type database according to the train numberWstd2;
Step S300 further comprises identifying the scanned imageEach window target in the image, and the window front side horizontal pixel coordinates of each window in the image are recorded
R2(
i) And horizontal pixel coordinate of rear side of car window
L2(
i) Calculating the first
iWidth of individual window
,
iThe serial number of the car window from the car head;
step S400 includes: calculate the first
iSecond local distortion coefficient of individual window
Fitting an overall distortion coefficient of the train based on the first local distortion coefficient of each door and the second local distortion coefficient of each window
R(
x)。
Further, step S400 fits the global distortion coefficient using a cubic polynomialR(x). Considering that the acceleration of the train in the process of station entering and deceleration is generally constant or the acceleration changes linearly, the distortion width of the linear array camera imaging is inversely proportional to the train speed, and the integral train distortion coefficient meeting the positioning precision requirement can be obtained by adopting cubic polynomial fitting.
Another aspect of the present invention provides a train door positioning system based on linear array image scaling recovery, comprising:
the linear array camera is arranged at the fixed position of the station entering end and is used for acquiring a train station entering scanning image by adopting a fixed line frequency; the line scan camera is calibrated in advance: which scans at the fixed line frequency at a reference speedVrefA moving standard component, wherein the unit pixel distance in the formed linear array image corresponds to the reference width of the world coordinate systemWref;
The initial width recognition module of the vehicle door is used for recognizing each vehicle door target in the scanned image and recording the horizontal pixel coordinate of the front side of the vehicle door of each vehicle door in the image
R(
i) And horizontal pixel coordinates of the rear side of the vehicle door
L(
i) Calculating the first
iInitial width of individual door
,
iThe serial number of the car door from the car head;
the train number-train type database is used for storing train numbers and train type information corresponding to the train numbers, and the train type information comprises the width of a train doorWstd1;
A module for acquiring local distortion of vehicle door for calculating
iFirst local distortion coefficient of individual vehicle door
;
The train integral distortion fitting module is used for fitting the integral distortion coefficient of the train according to the first local distortion coefficient of each vehicle door
Wherein
xIs the horizontal pixel coordinate of the image,
the unit pixel distance corresponds to the width of the image coordinate system for different horizontal pixel positions;
a relative position calculating module of the vehicle door for calculating the actual width of each vehicle door according to the integral distortion coefficient
And the distance from the front side or the rear side of each door to the vehicle head;
and the vehicle door position positioning module is used for acquiring the position of the train head after the train is stably stopped and outputting the positioning result of each vehicle door according to the relative distance from each vehicle door to the train head.
Optionally, the vehicle type information stored in the vehicle number-vehicle type database further includes a vehicle window widthWstd2(ii) a The train door positioning system further comprises:
the vehicle window initial width identification module is used for identifying each vehicle window target in the scanned image and recording the horizontal pixel coordinates of the front side of each vehicle window in the image
R2(
i) And horizontal pixel coordinate of rear side of car window
L2(
i) Calculating the first
iWidth of individual window
,
iThe serial number of the car window from the car head;
a window local distortion acquisition module for calculating
iSecond local distortion coefficient of individual window
;
And the train overall distortion fitting module fits the train overall distortion coefficient according to the first local distortion coefficient of each door and the second local distortion coefficient of each windowR(x)。
Further, the train integral distortion fitting module adopts cubic polynomial to fit the integral distortion coefficientR(x)。
Compared with the prior art, the invention has the beneficial effects that:
1. the method realizes the positioning of the train doors for the entrance and the stop of the train for controlling the opening of the high-speed railway platform door based on the linear array imaging variable-proportion recovery mode for the first time, has high automation degree compared with the conventional scheme of positioning the train doors based on the train running chart or the train type database and the width and the distance between the train doors in the train type information, better accords with objective practice, and avoids the inaccurate positioning of the train doors caused by the prior information errors such as reconnection positions and the like.
2. The invention scans and images the train which enters the station based on the linear array camera with fixed line frequency, and because the train enters the station in a deceleration process, the train image acquired with fixed line frequency has width distortion. The method creatively measures the local distortion coefficient of each train door position according to the standard width of the train door, then fits the whole train distortion coefficient according to all the local distortion coefficients, realizes variable ratio recovery based on the whole distortion coefficient, and realizes the positioning of the train door positions of different types of high-speed trains for entering and stopping on the basis of not depending on any external information source.
3. In the further scheme of the invention, the larger distance between the vehicle doors is considered, and the fitting precision of the whole train distortion coefficient is further improved by increasing the mode of calculating the local distortion of the vehicle windows, so that the positioning precision of the vehicle doors is improved.
Embodiment 1 provides a train door positioning method based on linear array imaging and a speed curve, as shown in fig. 1, including:
step S100, thelinear array camera 10 arranged at the fixed position of the station entering end acquires a scanning image of the train station entering by adopting a fixed line frequency; theline camera 10 is calibrated in advance: which scans at the fixed line frequency at a reference speedVrefA moving standard component, wherein the unit pixel distance in the formed linear array image corresponds to the reference width of the world coordinate systemWref;
Step S200, identifying the train number in the scanning image, and acquiring the width of the door of the current train from a train number-vehicle type database according to the train numberWstd1;
Step S300, identifying each vehicle door target in the scanned image, and recording the horizontal pixel coordinates of the front side of each vehicle door in the image
R1(
i) And horizontal pixel coordinates of the rear side of the vehicle door
L1(
i) Calculating the first
iInitial width of individual door
,
iThe serial number of the car door from the car head;
step S400, calculating
iFirst local distortion coefficient of individual vehicle door
Fitting the global distortion coefficient of the train according to the first local distortion coefficient of each door
Wherein
xIs the horizontal pixel coordinate of the image,
the unit pixel distance corresponds to the width of the image coordinate system for different horizontal pixel positions;
step S500, calculating the actual width of each vehicle door according to the overall distortion coefficient
And the distance from the front side or the rear side of each door to the vehicle head;
and S600, acquiring the locomotive position of the train after the train is stopped stably, and outputting the positioning result of each vehicle door according to the relative distance from each vehicle door to the locomotive.
In step S500, the distance from the front side of each door to the head
Distance from rear side of each door to head
Wherein
psThe horizontal pixel coordinates of the head frame image in the scanned image are obtained.
Since the scanning frequency of theline camera 10 is fixed, the horizontal length of each target of the train body in the line image is inversely proportional to the train speed. As shown in fig. 2, the front side of the train passes through theline camera 10 first, and the rear side of the train passes through theline camera 10, and the train entering is a deceleration process, so that the width of the train door in the line image is changed from narrow to wide from the front side to the rear side. In the embodiment, a calibratedlinear array camera 10 is adopted to scan train entering images, the door positioning is directly carried out on each door target in the linear array images, the transformation ratio correction is carried out on distorted images through the door and window width prior information, and the train entering door positioning based on the linear array images is ingeniously realized based on the transformation ratio recovery of the linear array images.
Preferably, the step S200 further includes obtaining the window width of the current train from the train number-train type database according to the train numberWstd2;
Step S300 further comprises identifying each window target in the scanned image, and recording the window front side horizontal pixel coordinates of each window in the image
R2(
i) And horizontal pixel coordinate of rear side of car window
L2(
i) Calculating the first
iWidth of individual window
,
iThe serial number of the car window from the car head;
step S400 includes: calculate the first
iSecond local distortion coefficient of individual window
Fitting an overall distortion coefficient of the train based on the first local distortion coefficient of each door and the second local distortion coefficient of each window
R(
x)。
Step S400 of fitting the overall distortion coefficient by using a cubic polynomialR(x) As shown in fig. 3. Considering that the acceleration of the train in the process of station entering and deceleration is generally constant or the acceleration changes linearly, the distortion width of the linear array camera imaging is inversely proportional to the train speed, and the integral train distortion coefficient meeting the positioning precision requirement can be obtained by adopting cubic polynomial fitting.
In step S200, the train number in the scanned image is identified by using the trained first convolutional neural network. In addition, there are many well-established car number identification schemes in the prior art, such as the patent of the invention CN108734158B previously filed by the applicant.
In step S300, train doors in the scanned image are identified using the trained second convolutional neural network. Specifically, before training the convolutional neural network, 2000 side views of various high-speed trains under different backgrounds are found out from a database, the position of a car door in each image is manually marked, and the obtained position information is converted into a data format (an xml file) input by a CNN network through a script.
Fig. 4 shows a model example of a second convolutional neural network, where the leftmost layer is an input layer and a single-channel line camera image to be detected is input; the input layer is followed by a convolution layer, and the purpose is to perform multi-dimensional feature extraction on the input image by using 32 5-by-5 convolution kernels, wherein a ReLU activation function is adopted in an excitation layer, and the main purpose of the ReLU activation function is to realize non-linear change of image features. The maximum pooling layer is connected behind the convolution layer to reduce image redundant information and increase the calculation speed. After several pooling layers and convolution layers there are fully connected layers arranged as two-dimensional tensors containing convolution kernels of 7 x 64, which can also be considered as a convolution of only one row of 7 x 64 data. And the last layer is an output layer, and the identification and positioning operation of the vehicle door target is realized by using a softmax activation function.
Similarly, train windows in the scanned image are identified using a trained third convolutional neural network.
Embodiment 2 provides a train door positioning system based on linear array image scaling recovery, which implements the train door positioning method described inembodiment 1, and includes:
the linear array camera is arranged at the fixed position of the station entering end and is used for acquiring a train station entering scanning image by adopting a fixed line frequency; the line scan camera is calibrated in advance: which scans at the fixed line frequency at a reference speedVrefA moving standard component, wherein the unit pixel distance in the formed linear array image corresponds to the reference width of the world coordinate systemWref;
The distance measuring device is arranged at the fixed position of the station outlet and used for measuring the position of the train head after the train is stopped stably;
initial width of car doorA recognition module for recognizing each vehicle door target in the scanned image and recording the horizontal pixel coordinates of the front side of each vehicle door in the image
R(
i) And horizontal pixel coordinates of the rear side of the vehicle door
L(
i) Calculating the first
iInitial width of individual door
,
iThe serial number of the car door from the car head;
the train number-train type database is used for storing train numbers and train type information corresponding to the train numbers, and the train type information comprises the width of a train doorWstd1;
A module for acquiring local distortion of vehicle door for calculating
iFirst local distortion coefficient of individual vehicle door
;
The train integral distortion fitting module is used for fitting the integral distortion coefficient of the train according to the first local distortion coefficient of each vehicle door
Wherein
xIs the horizontal pixel coordinate of the image,
the unit pixel distance corresponds to the width of the image coordinate system for different horizontal pixel positions;
a relative position calculating module of the vehicle door for calculating the actual width of each vehicle door according to the integral distortion coefficient
And the distance from the front side or the rear side of each door to the vehicle head;
and the vehicle door position positioning module is used for acquiring the position of the train head after the train is stably stopped and outputting the positioning result of each vehicle door according to the relative distance from each vehicle door to the train head.
Optionally, the vehicle type information stored in the vehicle number-vehicle type database further includes a vehicle window widthWstd2(ii) a The train door positioning system further comprises:
the vehicle window initial width identification module is used for identifying each vehicle window target in the scanned image and recording the horizontal pixel coordinates of the front side of each vehicle window in the image
R2(
i) And horizontal pixel coordinate of rear side of car window
L2(
i) Calculating the first
iWidth of individual window
,
iThe serial number of the car window from the car head;
a window local distortion acquisition module for calculating
iSecond local distortion coefficient of individual window
;
And the train overall distortion fitting module fits the train overall distortion coefficient according to the first local distortion coefficient of each door and the second local distortion coefficient of each windowR(x)。
The vehicle door initial width identification module, the vehicle window initial width identification module, the vehicle door local distortion acquisition module, the vehicle window local distortion acquisition module, the train overall distortion fitting module, the vehicle door relative position calculation module and the vehicle door position positioning module are configured to be functional modules integrated in thecalculation terminal 20.
Further, the train integral distortion fitting module adopts cubic polynomial to fit the integral distortion coefficientR(x)。
In summary, after reading the present disclosure, those skilled in the art should make various other modifications without creative efforts according to the technical solutions and concepts of the present disclosure, which are within the protection scope of the present disclosure.