A kind of method and system based on image recognition linkage control train door and gate
Technical field
The present invention relates to safety of urban transit technical fields, more particularly to a kind of image recognition linkage control that is based on to arrange
The system of car door and gate.
Background technique
Currently, the rail traffic platforms such as city underground, light rail use (entirely for energy conservation and safety on rail traffic platform
High or half height) (shield door) Xi Tong ﹙ PSD ﹚, place of the barrier shield of system around platform away from edge 30CM or so is even for gate
Continuous arrangement separates out with rail travelling crane the platform area that waits, and barrier shield is equipped with the gate (shield door) that passenger goes up Train
The Train door stopped on channel, gate (shield door) and track corresponds, and usually gate (shield door), which is in, closes
And locking states, coordinate to match jointly by the door device of train itself, signal system and gate (shield door) control system
It closes and realizes gate (shield door) opening and closing synchronous with train door, endanger so that passenger be avoided to enter tunnel from platform
Danger.
After subway or light rail enter platform, train deceleration is to when stopping, needing to judge whether train stops completely, i.e.,
Zero-speed detection;Train door is in normal condition before not opening between train door and gate;Train door open, close
The state of identification train door switch is needed in the process.
Therefore zero-speed detection and the state of identification train door switch are the important components in train rail traffic, in order to
It solves the above problems, the Chinese patent of Publication No. CN203819231U discloses a kind of train door and gate linkage control
System, system include that RFID radio frequency identification system, ZigBee wireless two-way Transmission system, PSL gate control on the spot
System and PSA gate condition monitoring system;RFID radio frequency identification system provides the enabled switch letter that train comes to a complete stop in place
Number;ZigBee wireless two-way Transmission system completes train door and the instruction of gate switch gate is sent, and platform door state feedback connects
The wireless two-way of receipts transmits;Control system completes RFID radio frequency identification system, ZigBee wireless two-way to PSL gate on the spot
Data acquisition, transmission and the gate control of Transmission system;PSA gate condition monitoring system completes the operation note of all events
The monitoring and control of record, malfunction alarm and on-line parameter adjustment.
However train signal system in the prior art intelligently sends unified switch gate order, if the single vehicle of single unit vehicle
Door, which breaks down, is isolated, and corresponding gate, which can not receive timely information, still will do it switch gate movement, is influenced
Passenger getting on/off;Once and train signal system jam, permutation gate all will be unable to carry out switch gate movement;Using
Additional apparatus for transmitting signal must on vehicle doorn and gate all upper corresponding signal of installation occur, receiver, increase at
Originally it and bears.
It is, therefore, desirable to provide a kind of acquisition train and gate state-detection without signal system transmission signal is
System, to solve the above problems.
Summary of the invention
To solve the above-mentioned problems, the present invention provides one kind accesses without extra, and simulation, which manually visualizes, obtains column
Car state realizes that one kind of gate following train door synchronous linked switch is based on image recognition linkage control train door and platform
The method and system of door.
In order to achieve the above object, the invention adopts the following technical scheme:
A method of based on image recognition linkage control train door and gate, comprising steps of
S1: the image information in preset range is obtained by the camera being arranged on gate predeterminated position, and is saved;
S2: extracting the default train fixed character in consecutive frame image information, and in conjunction with default zero-speed algorithm, forefront is worked as in judgement
Whether vehicle speed is zero-speed;
S3: if current train speed is zero-speed, the default car door feature in consecutive frame image information is extracted, in conjunction with default position
Algorithm is set, judges whether the current door position variation of train is that default open changes;
S4: if the current door position variation of train opens variation to be default, the current car door opening signal of train is sent extremely
Platform door control unit;If the variation of current train door position closes variation to be default, current train closing of the door letter is sent
Number to platform door control unit.
Further, before step S1 comprising steps of
By the camera being arranged on gate predeterminated position, the image information without train in preset range is obtained;
Background modeling is carried out to the image in the preset range of acquisition without train, generates default background;
Background is saved with image format.
Further, step S2 includes:
S21: the train image in image information is subjected to threshold value division and integral projection;
S22: the window on train adhesive tape feature in image information is extracted.
S23: the image information of consecutive frame and default background are subjected to image comparison;
S24: judge whether the position that window on train adhesive tape is corresponded in consecutive frame changes;
S25: if the position for corresponding to window on train adhesive tape in consecutive frame changes, confirm that current train speed is not zero
Speed;If the position for corresponding to window on train adhesive tape in consecutive frame does not change, confirm that current train speed is zero-speed.
Further, step S3 includes:
S31: when train speed is zero-speed, the Train door door frame adhesive tape feature in consecutive frame image information is extracted;
S32: the image information of consecutive frame and default background are subjected to image comparison;
S33: whether the change in location for judging Train door door frame adhesive tape in consecutive frame is that default open changes;
Further, which is characterized in that step S4 includes:
S41: if the change in location of Train door door frame adhesive tape is that default open changes in consecutive frame, confirm current train vehicle
Door state is open state;If the change in location of Train door door frame adhesive tape is that default close changes in consecutive frame, confirmation is current
Train door state is in off state;
S42: Train door state is sent to platform door control unit.
A kind of system based on image recognition linkage control train door and gate characterized by comprising
Camera, the camera is arranged on gate predeterminated position, for obtaining the image information in preset range,
And it saves;
Train zero-speed confirmation module, for extracting the default train fixed character in consecutive frame image information, in conjunction with default
Zero-speed algorithm judges whether current train speed is zero-speed;
Vehicle door status judgment module, for extracting the default vehicle in consecutive frame image information when train speed is zero-speed
Door feature judges whether the current door position variation of train is that default open changes in conjunction with predeterminated position algorithm;
Vehicle door status sending module, for Train door current state to be sent to platform door control unit.
Further, further includes:
Background module is generated, for the camera by being arranged on gate predeterminated position, obtains nothing in preset range
The image information of train carries out background modeling to the image in the preset range of acquisition without train, generates default background;
Background preserving module, for saving the background of generation with image format.
Further, train zero-speed confirmation module includes:
Image divides projecting cell, for the train image in image information to be carried out threshold value division and integral projection;
Fixed character unit is extracted, for extracting the window on train adhesive tape feature in image information.
Image background comparing unit, for the image information of consecutive frame and default background to be carried out image comparison;
Change in location unit is judged, for judging whether the position for corresponding to window on train adhesive tape in consecutive frame changes;
Train speed's unit is confirmed, for confirming when the position for corresponding to window on train adhesive tape in consecutive frame changes
Current train speed is not zero speed;When the position for corresponding to window on train adhesive tape in consecutive frame does not change, current train is confirmed
Speed is zero-speed.
Further, vehicle door status judgment module includes:
Car door feature unit is extracted, for extracting the train vehicle in consecutive frame image information when train speed is zero-speed
Door frame adhesive tape feature;
Car door image comparing unit, for the image information of consecutive frame and default background to be carried out image comparison;
Door position unit is judged, for judging whether the change in location of Train door door frame adhesive tape in consecutive frame is default
Open variation;
Further, vehicle door status sending module includes:
Vehicle door status confirmation unit is that default open becomes for the change in location when Train door door frame adhesive tape in consecutive frame
When change, confirmation current train vehicle door status is open state;When the change in location of Train door door frame adhesive tape in consecutive frame is pre-
If closing variation, confirmation current train vehicle door status is in off state.
Vehicle door status transmission unit, it is single for current train vehicle door status to be sent to gate control by Ethernet
Member.
The invention has the benefit that
(1) image embedded processing scheme is used, driving camera module is monitored gate and train door region,
Using image algorithm, the state of the following vehicle speed of current scene and train door switch, the directly image information by obtaining are obtained
Judged, so that result is more accurate, efficiently, practicability is stronger.
(2) method in the application based on image recognition linkage control train door and gate can simulate artificial visual
Foreign matter is detected, more intuitively, exact can carry out gate for the opening and closing state of each train and train door
The judgement of control, more convenient, intellectual monitoring.
(3) image analysis that train is wherein carried out by camera, wherein the image information obtained can be carried out preservation
Realize the information of reduction train zero-speed detection and the detection of train door opening and closing state, it is convenient and reliable.
Detailed description of the invention
Fig. 1 is the method flow diagram one based on image recognition linkage control train door and gate;
Fig. 2 is the method flow diagram two based on image recognition linkage control train door and gate;
Fig. 3 is the structural schematic diagram based on image recognition linkage control train door and gate;
Fig. 4 is the system construction drawing one based on image recognition linkage control train door and gate;
Fig. 5 is the system construction drawing two based on image recognition linkage control train door and gate.
Specific embodiment
Following is a specific embodiment of the present invention in conjunction with the accompanying drawings, technical scheme of the present invention will be further described,
However, the present invention is not limited to these examples.
Embodiment one
A kind of method based on image recognition linkage control train door and gate is present embodiments provided, such as Fig. 1 to Fig. 3
It is shown, this method comprising steps of
S1: the image information in preset range is obtained by the camera being arranged on gate predeterminated position, and is saved;
S2: extracting the default train fixed character in consecutive frame image information, and in conjunction with default zero-speed algorithm, forefront is worked as in judgement
Whether vehicle speed is zero-speed;
S3: if current train speed is zero-speed, the default car door feature in consecutive frame image information is extracted, in conjunction with default position
Algorithm is set, judges whether the current door position variation of train is that default open changes;
S4: if the current door position variation of train opens variation to be default, the current car door opening signal of train is sent extremely
Platform door control unit;If the variation of current train door position closes variation to be default, current train closing of the door letter is sent
Number to platform door control unit.
Further, before step S1 comprising steps of
By the camera being arranged on gate predeterminated position, the image information without train in preset range is obtained;
Background modeling is carried out to the image in the preset range of acquisition without train, generates default background;
Background is saved with image format.
In a kind of method based on image recognition linkage control train door and gate provided in this embodiment, at each station
It is both provided with camera on the predeterminated position of platform door, the image information without train in preset range is obtained by camera first,
Image in the preset range that will acquire without train carries out background modeling, generates default background, and save with image format.
Zero-speed judgement is carried out to train first, the train zero-speed judgment method wherein provided in the present embodiment is that judgement obtains
The change in location of train fixed character is preset in the image information consecutive frame taken, default train fixed character refers in train operation
In relative to train be it is static, can determine that the position of train becomes by judging the change in location of default train fixed character
Change;Such as window on train adhesive tape, wherein window on train is fixed with respect to train, thus by the train image in image information into
Row threshold value divides and integral projection;To in image information window on train adhesive tape and Train door door frame adhesive tape extract;
It therefore can be by window on train in the corresponding image of different time, that is, consecutive frame image information, relative to default back
The change in location of scape, i.e., the relative position of former frame and a later frame window on train adhesive tape in contrast images information, if become
Change, whether can determine train currently is zero-speed;
Further, in this embodiment it is single the result of train zero-speed detection to be sent to gate control by Ethernet
Member.
After train zero-speed, Train door state can be judged, the default car door feature provided in the present embodiment
Refer to when Train door opens or closes, can with the movement of Train door the feature of movement;Wherein train is default in arrival
Behind parking position, will do it car door opening and closing of the door two movement, corresponding vehicle door status be car door opening state and
Closing of the door state.
The image information of consecutive frame and default background are subjected to image comparison;The default car door provided in the present embodiment is special
Sign is default door frame adhesive tape, by judging whether the change in location of Train door door frame adhesive tape in consecutive frame is default unlatching
Variation opens or closes state judge Train door;If the change in location of Train door door frame adhesive tape is pre- in consecutive frame
If opening variation, then judge that current train vehicle door status for open state, and is sent to platform door control unit;If in consecutive frame
The change in location of Train door door frame adhesive tape is that default close changes, then judges that current train vehicle door status is in off state, and
It is sent to platform door control unit.
After platform door control unit receives the state of Train door, corresponding gate control instruction will do it, control
Gate and train door carry out linkage control.
A kind of method based on image recognition linkage control train door and gate provided in this embodiment, it is embedding using image
Enter formula processing scheme, driving camera module is monitored gate and train door region, using image algorithm, obtains current
The state of scene Train and train door switch is directly judged by the image information obtained, and image detection train is based on
Zero-speed state and train enabling, train shutdown state, and train zero-speed information, train enabling information, train shutdown information are passed
Platform door controller is passed, gate following train door synchronous switch is promoted to realize linkage, so that result is more accurate, efficiently,
Practicability is stronger.
Embodiment two
A kind of system based on image recognition linkage control train door and gate is present embodiments provided, such as Fig. 3 to Fig. 5
Shown, this system includes:
Camera, the camera is arranged on gate predeterminated position, for obtaining the image information in preset range,
And it saves;
Train zero-speed confirmation module, for extracting the default train fixed character in consecutive frame image information, in conjunction with default
Zero-speed algorithm judges whether current train speed is zero-speed;
Vehicle door status judgment module, for extracting the default vehicle in consecutive frame image information when train speed is zero-speed
Door feature judges whether the current door position variation of train is that default open changes in conjunction with predeterminated position algorithm;
Vehicle door status sending module, for Train door current state to be sent to platform door control unit.
Further, further includes:
Background module is generated, for the camera by being arranged on gate predeterminated position, obtains nothing in preset range
The image information of train carries out background modeling to the image in the preset range of acquisition without train, generates default background;
Background preserving module, for saving the background of generation with image format.
Further, train zero-speed confirmation module includes:
Image divides projecting cell, for the train image in image information to be carried out threshold value division and integral projection;
Fixed character unit is extracted, for extracting the window on train adhesive tape feature in image information.
Image background comparing unit, for the image information of consecutive frame and default background to be carried out image comparison;
Change in location unit is judged, for judging whether the position for corresponding to window on train adhesive tape in consecutive frame changes;
Train speed's unit is confirmed, for confirming when the position for corresponding to window on train adhesive tape in consecutive frame changes
Current train speed is not zero speed;When the position for corresponding to window on train adhesive tape in consecutive frame does not change, current train is confirmed
Speed is zero-speed.
Further, vehicle door status judgment module includes:
Car door feature unit is extracted, for extracting the train vehicle in consecutive frame image information when train speed is zero-speed
Door frame adhesive tape feature;
Car door image comparing unit, for the image information of consecutive frame and default background to be carried out image comparison;
Door position unit is judged, for judging whether the change in location of Train door door frame adhesive tape in consecutive frame is default
Open variation;
Further, vehicle door status sending module includes:
Vehicle door status confirmation unit is that default open becomes for the change in location when Train door door frame adhesive tape in consecutive frame
When change, confirmation current train vehicle door status is open state;When the change in location of Train door door frame adhesive tape in consecutive frame is pre-
If closing variation, confirmation current train vehicle door status is in off state.
Vehicle door status transmission unit, it is single for current train vehicle door status to be sent to gate control by Ethernet
Member.
Platform door control unit can carry out phase according to the train zero-speed of acquisition and the opening and closing state of Train door
The gate answered opens and closes control, realizes the purpose of each train door opening synchronous with gate under zero-speed state, makes
It is more intelligent, accurate to obtain Train Control.
System provided in this embodiment based on image recognition linkage control train door and gate, in each gate and
A camera is equipped between vehicle doorn, it can be achieved that bit switch.And train zero-speed and car door are carried out using image processing techniques
The extraction of switch state signal is directly transferred to platform door control unit by RJ45 Ethernet, does not need train signal system
And additional signal device;So that result is more accurate, efficiently, practicability is stronger.
Specific embodiment described herein is only an example for the spirit of the invention.The neck of technology belonging to the present invention
The technical staff in domain can make various modifications or additions to the described embodiments or replace by a similar method
In generation, however, it does not deviate from the spirit of the invention or beyond the scope of the appended claims.