Method and system for linkage control of train door and platform door based on image recognition
Technical Field
The invention relates to the technical field of urban rail transit safety, in particular to a system for linkage control of train doors and platform doors based on image recognition.
Background
At present, a (full-height or half-height) platform door (screen door) system (PSD) is used on a rail transit platform for energy conservation and safety in urban subways, light rails and other rail transit platforms, a shielding wall of the system is continuously arranged around a platform from a position about 30CM away from an edge, a platform waiting area is separated from a rail driving area, a platform door (screen door) channel for passengers to get on and off a train is arranged on the shielding wall, the platform door (screen door) corresponds to train doors parked on a rail one-to-one, the platform door (screen door) is in a closed and locked state at ordinary times, and the platform door (screen door) and the train doors are synchronously opened and closed through common coordination of a train door system, a signal system and a platform door (screen door) control system of the train, so that the passengers are prevented from entering the tunnel from the platform.
When a subway or a light rail enters a platform and a train decelerates to stop, whether the train completely stops needs to be judged, namely zero-speed detection; before the train door is not opened, the train door and the platform door are in a normal state; the train door opening and closing process needs to identify the train door opening and closing state.
Therefore, zero-speed detection and train door switch state identification are important components in train rail traffic, and in order to solve the problems, a Chinese patent with the publication number of CN203819231U discloses a train door and platform door linkage control system which comprises an RFID wireless radio frequency identification system, a ZigBee wireless two-way transmission system, a PS L platform door on-site control system and a PSA platform door state monitoring system, wherein the RFID wireless radio frequency identification system provides enabling and switching signals for train in-place and stable stop, the ZigBee wireless two-way transmission system completes train door and platform door switch instruction sending and platform door state feedback receiving wireless two-way transmission, the PS L platform door on-site control system completes data acquisition, transmission and platform door control of the RFID wireless radio frequency identification system and the ZigBee wireless two-way transmission system, and the PSA platform door state monitoring system completes operation recording, fault state alarm and monitoring and control of online parameter adjustment of all events.
However, in the prior art, a train signal system intelligently sends a unified door opening and closing command, if a single vehicle door of a single vehicle breaks down for isolation, a corresponding platform door cannot receive timely information and still performs door opening and closing actions, and passengers get on and off the train; once the train signal system fails, the doors of the whole train platform cannot be opened and closed; the additional signal transmission device is adopted, and corresponding signal generating and receiving devices are required to be arranged on the vehicle door and the platform door, so that the cost and the burden are increased.
Therefore, it is necessary to provide a system for acquiring train and platform door status detection without signal system transmission signal to solve the above problems.
Disclosure of Invention
In order to solve the problems, the invention provides a method and a system for linkage control of train doors and platform doors based on image identification, which do not need additional signal access, simulate manual visual acquisition of train states and realize synchronous linkage switch of the platform doors following the train doors.
In order to achieve the purpose, the invention adopts the following technical scheme:
a method for linkage control of train doors and platform doors based on image recognition comprises the following steps:
s1: acquiring image information in a preset range through a camera arranged at a preset position of a platform door, and storing the image information;
s2: extracting preset train fixed features in adjacent frame image information, and judging whether the current train speed is zero speed or not by combining a preset zero speed algorithm;
s3: if the current train speed is zero speed, extracting preset train door characteristics in adjacent frame image information, and judging whether the current train door position change is a preset opening change or not by combining a preset position algorithm;
s4: if the position of the current train door is changed into a preset opening change, sending a current train door opening signal to the platform door control unit; and if the current train door position change is a preset closing change, sending a current train door closing signal to the platform door control unit.
Further, step S1 is preceded by the steps of:
acquiring image information of no train in a preset range through a camera arranged at a preset position of a platform door;
carrying out background modeling on the acquired image without the train in the preset range to generate a preset background;
the background is saved in the form of an image.
Further, step S2 includes:
s21: carrying out threshold value division and integral projection on the train image in the image information;
s22: and extracting the characteristics of the train window adhesive tape in the image information.
S23: comparing the image information of the adjacent frames with a preset background;
s24: judging whether the positions of the corresponding train window adhesive tapes in the adjacent frames are changed or not;
s25: if the position of the corresponding train window adhesive tape in the adjacent frames changes, the current train speed is determined to be not zero; and if the positions of the corresponding train window adhesive tapes in the adjacent frames do not change, determining that the current train speed is zero.
Further, step S3 includes:
s31: when the train speed is zero, extracting the characteristics of the train door frame adhesive tape in the adjacent frame image information;
s32: comparing the image information of the adjacent frames with a preset background;
s33: judging whether the position change of the door frame adhesive tape of the train door in the adjacent frames is a preset opening change or not;
further, step S4 includes:
s41: if the position change of the train door frame adhesive tape in the adjacent frames is a preset opening change, the current train door state is confirmed to be an opening state; if the position change of the train door frame adhesive tape in the adjacent frames is a preset closing change, the current train door state is confirmed to be a closing state;
s42: and sending the state of the train door to the platform door control unit.
A system for linkage control of train doors and platform doors based on image recognition, comprising:
the camera is arranged at a preset position of the platform door and used for acquiring and storing image information within a preset range;
the train zero-speed confirmation module is used for extracting preset train fixed characteristics in adjacent frame image information and judging whether the current train speed is zero speed or not by combining a preset zero-speed algorithm;
the train door state judging module is used for extracting preset train door features in adjacent frame image information when the train speed is zero, and judging whether the current train door position change is a preset opening change or not by combining a preset position algorithm;
and the vehicle door state sending module is used for sending the current state of the train door to the platform door control unit.
Further, still include:
the generation background module is used for acquiring image information of no train in a preset range through a camera arranged at a preset position of a platform door, and performing background modeling on the acquired image of no train in the preset range to generate a preset background;
and the background storage module is used for storing the generated background in an image form.
Further, the train zero speed confirmation module comprises:
the image dividing and projecting unit is used for carrying out threshold value division and integral projection on the train image in the image information;
and the fixed characteristic extraction unit is used for extracting the train window adhesive tape characteristics in the image information.
The image background comparison unit is used for comparing the image information of the adjacent frames with a preset background;
the position change judging unit is used for judging whether the positions of the corresponding train window adhesive tapes in the adjacent frames are changed or not;
the train speed confirming unit is used for confirming that the current train speed is not zero when the position of the corresponding train window adhesive tape in the adjacent frame changes; and when the positions of the window adhesive tapes of the corresponding trains in the adjacent frames do not change, determining that the current train speed is zero.
Further, the door state judgment module includes:
the train door characteristic extraction unit is used for extracting the characteristics of train door frame adhesive tapes in adjacent frame image information when the train speed is zero;
the vehicle door image comparison unit is used for comparing the image information of the adjacent frames with a preset background;
the train door position judging unit is used for judging whether the position change of the train door frame adhesive tape in the adjacent frames is a preset opening change or not;
further, the door state transmitting module includes:
the train door state confirming unit is used for confirming that the current train door state is an opening state when the position change of the train door frame adhesive tape in the adjacent frame is a preset opening change; and when the position change of the door frame adhesive tape of the train door in the adjacent frames is a preset closing change, determining that the current train door state is a closing state.
And the vehicle door state sending unit is used for sending the current train door state to the platform door control unit through the Ethernet.
The invention has the beneficial effects that:
(1) by adopting the image embedded processing scheme, the driving camera module monitors the platform door and the train door region, the image algorithm is utilized to acquire the train speed and the train door opening and closing state under the current scene, and the judgment is directly carried out through the acquired image information, so that the result is more accurate, the efficiency is high, and the practicability is stronger.
(2) According to the method for linkage control of the train door and the platform door based on image recognition, the foreign matter can be detected visually through simulation, the method is more intuitive, judgment of platform door control can be accurately carried out on the opening and closing states of each train and the train door, and the method is more convenient and intelligent in monitoring.
(3) The image analysis of the train is carried out through the camera, the acquired image information can be stored, the information of train zero-speed detection and train door opening and closing state detection can be restored, and the method is convenient and reliable.
Drawings
FIG. 1 is a first flowchart of a method for linkage control of train and platform doors based on image recognition;
FIG. 2 is a second flowchart of a method for linkage control of train and platform doors based on image recognition;
FIG. 3 is a schematic structural view of a train door and a platform door based on image recognition linkage control;
FIG. 4 is a first block diagram of a system for controlling train and platform doors based on image recognition linkage;
fig. 5 is a second system configuration diagram for controlling train doors and platform doors based on image recognition linkage.
Detailed Description
The following are specific embodiments of the present invention and are further described with reference to the drawings, but the present invention is not limited to these embodiments.
Example one
The embodiment provides a method for linkage control of train doors and platform doors based on image recognition, as shown in fig. 1 to 3, the method comprises the following steps:
s1: acquiring image information in a preset range through a camera arranged at a preset position of a platform door, and storing the image information;
s2: extracting preset train fixed features in adjacent frame image information, and judging whether the current train speed is zero speed or not by combining a preset zero speed algorithm;
s3: if the current train speed is zero speed, extracting preset train door characteristics in adjacent frame image information, and judging whether the current train door position change is a preset opening change or not by combining a preset position algorithm;
s4: if the position of the current train door is changed into a preset opening change, sending a current train door opening signal to the platform door control unit; and if the current train door position change is a preset closing change, sending a current train door closing signal to the platform door control unit.
Further, step S1 is preceded by the steps of:
acquiring image information of no train in a preset range through a camera arranged at a preset position of a platform door;
carrying out background modeling on the acquired image without the train in the preset range to generate a preset background;
the background is saved in the form of an image.
In the method for linkage control of train doors and platform doors based on image recognition provided by this embodiment, a camera is arranged at a preset position of each platform door, image information of no train in a preset range is obtained through the camera, background modeling is performed on the obtained image of no train in the preset range, a preset background is generated, and the image is stored in an image form.
Firstly, train zero speed judgment is carried out, wherein the train zero speed judgment method provided in the embodiment is that the position change of the preset train fixed characteristic in the adjacent frames of the acquired image information is judged, the preset train fixed characteristic means that the train is static relative to the train in the running process of the train, and the position change of the train can be determined by judging the position change of the preset train fixed characteristic; for example, the train window adhesive tape, wherein the train window is fixed relative to the train, so that the train image in the image information is subjected to threshold division and integral projection; extracting the train door window adhesive tape and the train door frame adhesive tape in the image information;
therefore, the position change of the corresponding images of the train windows at different time, namely the adjacent frame image information, relative to the preset background can be realized, namely, the relative positions of the train window adhesive tapes of the previous frame and the next frame in the image information are compared to determine whether the train is at zero speed currently or not;
further, in this embodiment, the result of the train zero speed detection is sent to the platform door control unit through the ethernet.
After the train is at zero speed, the state of the train door can be judged, and the preset door characteristic provided in the embodiment refers to the characteristic that the train door can move along with the movement of the train door when the train door is opened or closed; wherein the train can carry out two actions of door opening and door closing after arriving and predetermineeing the parking stall, and its corresponding door state is door open mode and door closed state.
Comparing the image information of the adjacent frames with a preset background; the preset train door provided by the embodiment is characterized in that a train door frame adhesive tape is preset, and the opening or closing state of the train door is judged by judging whether the position change of the train door frame adhesive tape in adjacent frames is a preset opening change or not; if the position change of the train door frame adhesive tape in the adjacent frames is a preset opening change, judging that the current train door state is an opening state, and sending the train door state to the platform door control unit; and if the position change of the train door frame adhesive tape in the adjacent frames is a preset closing change, judging that the current train door state is a closing state, and sending the closing state to the platform door control unit.
And after receiving the state of the train door, the platform door control unit can carry out corresponding platform door control instructions to control the platform door and the train door to carry out linkage control.
The method for linkage control of train doors and platform doors based on image recognition provided by the embodiment adopts an image embedded processing scheme, drives a camera module to monitor the platform doors and the train door area, acquires the states of trains and train door switches under the current scene by using an image algorithm, directly judges through acquired image information, detects the train zero-speed state and the train door opening and closing states based on images, and transmits the train zero-speed information, the train door opening information and the train door closing information to a platform door controller, so that the platform doors can realize linkage along with the train door synchronous switch, the result is more accurate, the efficiency is high, and the practicability is stronger.
Example two
The present embodiment provides a system for controlling train doors and platform doors in a linkage manner based on image recognition, as shown in fig. 3 to 5, the system includes:
the camera is arranged at a preset position of the platform door and used for acquiring and storing image information within a preset range;
the train zero-speed confirmation module is used for extracting preset train fixed characteristics in adjacent frame image information and judging whether the current train speed is zero speed or not by combining a preset zero-speed algorithm;
the train door state judging module is used for extracting preset train door features in adjacent frame image information when the train speed is zero, and judging whether the current train door position change is a preset opening change or not by combining a preset position algorithm;
and the vehicle door state sending module is used for sending the current state of the train door to the platform door control unit.
Further, still include:
the generation background module is used for acquiring image information of no train in a preset range through a camera arranged at a preset position of a platform door, and performing background modeling on the acquired image of no train in the preset range to generate a preset background;
and the background storage module is used for storing the generated background in an image form.
Further, the train zero speed confirmation module comprises:
the image dividing and projecting unit is used for carrying out threshold value division and integral projection on the train image in the image information;
and the fixed characteristic extraction unit is used for extracting the train window adhesive tape characteristics in the image information.
The image background comparison unit is used for comparing the image information of the adjacent frames with a preset background;
the position change judging unit is used for judging whether the positions of the corresponding train window adhesive tapes in the adjacent frames are changed or not;
the train speed confirming unit is used for confirming that the current train speed is not zero when the position of the corresponding train window adhesive tape in the adjacent frame changes; and when the positions of the window adhesive tapes of the corresponding trains in the adjacent frames do not change, determining that the current train speed is zero.
Further, the door state judgment module includes:
the train door characteristic extraction unit is used for extracting the characteristics of train door frame adhesive tapes in adjacent frame image information when the train speed is zero;
the vehicle door image comparison unit is used for comparing the image information of the adjacent frames with a preset background;
the train door position judging unit is used for judging whether the position change of the train door frame adhesive tape in the adjacent frames is a preset opening change or not;
further, the door state transmitting module includes:
the train door state confirming unit is used for confirming that the current train door state is an opening state when the position change of the train door frame adhesive tape in the adjacent frame is a preset opening change; and when the position change of the door frame adhesive tape of the train door in the adjacent frames is a preset closing change, determining that the current train door state is a closing state.
And the vehicle door state sending unit is used for sending the current train door state to the platform door control unit through the Ethernet.
The platform door control unit can carry out corresponding platform door opening and closing control according to the acquired train zero speed and the opening and closing states of the train doors, and the purpose that each train door is synchronously opened with the platform door in the zero speed state is achieved, so that the train control is more intelligent and accurate.
According to the system for linkage control of the train door and the platform door based on image recognition, a camera is arranged between each platform door and the train door, and alignment switching can be achieved. The image processing technology is adopted to extract the zero-speed and door opening and closing state signals of the train, and the signals are directly transmitted to the platform door control unit through the RJ45 Ethernet without a train signal system and an additional signal device; the result is more accurate, efficient and more practical.
The specific embodiments described herein are merely illustrative of the spirit of the invention. Various modifications or additions may be made to the described embodiments or alternatives may be employed by those skilled in the art without departing from the spirit or ambit of the invention as defined in the appended claims.