Train delay detection and provision system using camera

A camera-based system compares passing times with pre-surveyed data to calculate and share train delays via social media, addressing the limitations of existing systems by providing real-time, cost-effective delay information in high-demand areas.

JP2024115486AActive Publication Date: 2024-08-26中田 弦太朗 +4
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
JP2023033186
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-02-14
Publication Date
2024-08-26
Estimated Expiration
2043-02-14

AI Technical Summary

Technical Problem

Existing train delay detection systems are limited to specific routes, lack real-time minute-by-minute accuracy, and are costly to install, particularly in high-demand areas where they have not been introduced, such as the JR Sotobo Line in Chiba Prefecture, leading to inadequate passenger information.

Method used

A camera-based system that compares vehicle passing times with pre-surveyed data to calculate delays and transmit information via social media, using Raspberry Pi computers and Python programming to identify trains without additional tags, and provide delay information on social networking sites.

Benefits of technology

Enables real-time, cost-effective train delay detection and information provision on social media, improving passenger awareness and reducing installation costs, especially in areas without existing systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024115486000001
    Figure 2024115486000001
Patent Text Reader

Abstract

To develop a new system which can be introduced to a new route at a lower cost than the existing system, while enabling information provision at a speed comparable to that of excellent systems in the city center, even in a route in which a system for quickly reporting delay information is not introduced regardless of a high demand for railroad use.SOLUTION: A system is provided that compares the passing time of a vehicle detected by a camera with the passing time examined in advance and transmits the acquired delay information on an SNS.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field] Camera-based train delay detection and information provision system

[0001] The present invention relates to a train delay detection and provision system using a camera. [Background technology]

[0002] Railway delays occur constantly every day. The main causes are injuries, doors getting stuck, medical emergencies, and equipment problems, and delays can range from a few minutes to several hours. When a few minutes of train delays accumulate, they can become a large delay and have a major impact on passengers. For this reason, passengers need to be informed immediately when a delay occurs. The Tokyo Metropolitan Railway (JR East Japan) already has a system called ATOS (Tokyo Metropolitan Transport Control System) that quickly transmits delay information. However, there are several suburban lines that have not introduced this system, despite the high demand for rail travel. Among them, the JR Sotobo Line that runs through Chiba Prefecture has not introduced ATOS, but in terms of transportation density of each line section in fiscal 2021, it is ranked 13th out of all 395 JR lines. Furthermore, delay information is only released by the railway companies, and in many cases accurate information down to the minute is not provided. For example, "Yahoo! Route Information" provided by Yahoo Japan Corporation provides users with delay information based on delay information distributed by RescueNow Inc. (hereafter referred to as RescueNow). The information distributed by RescueNow is obtained from interviews with railway companies, information released by them, and information posted by monitors across the country, and for train delays it states, "Information on railway lines (sections) where operational delays of 15 minutes or more have been confirmed for JR in the Tokyo metropolitan area, and 30 minutes or more for other lines."

[0003] In Patent Document 1 (JP 2021-079742 A), the delay information of each train is compared to determine the degree of impact, but the present invention differs in that the delay is calculated for each train and each data is treated as independent. In Patent Document 2 (JP Patent Publication No. 2015-147481), trains are photographed from an upward angle and the images are processed, but the present invention differs in that images are photographed from an angle to the left or right of the tracks. In Patent Document 3 (JP Patent Publication No. 2003-312476), modifications are made to the towing vehicle and the carrier vehicle by installing ID tags on each vehicle, and each vehicle is detected. However, the present invention is different in that it can identify trains without making modifications to existing railway vehicles. [Prior art documents] [Patent documents]

[0004] [Patent Document 1] Patent Publication No. 2021-079742 [Patent Document 2] JP 2015-147481 A [Patent Document 3] JP 2003-312476 A Summary of the Invention [Problem to be solved by the invention]

[0005] The aim is to develop a new system that can provide information as quickly as excellent systems in urban areas, even on lines where there is high demand for rail travel but no system for providing rapid delay information is in place, and that can be introduced to new lines at a lower cost than the current system. [Means for solving the problem]

[0006] We provide a system that compares the passing time of vehicles detected by cameras with the passing times surveyed in advance, and disseminates the resulting delay information on social media. Effect of the Invention

[0007] Other objects, features and advantages of the present invention will become apparent from the following detailed description of the preferred embodiments of the present invention taken in conjunction with the accompanying drawings. [Brief description of the drawings]

[0008] [Figure 1] FIG. 1 is a block diagram showing the internal configuration of the main system of this embodiment. [Diagram 2] FIG. 2 shows the overall configuration of the system of this embodiment. [Diagram 3] FIG. 3 shows the layout of the overall configuration of the system of this embodiment. [Figure 4] FIG. 4 is a flow chart showing the operation of the main system of this embodiment. [Diagram 5] FIG. 5 is a flowchart showing the operation of the application according to this embodiment. [Figure 6] FIG. 6 shows the discrimination method of this embodiment. [Figure 7] FIG. 7 shows an example of a data structure used in this embodiment. [Figure 8] FIG. 8 shows an example of an actual Twitter (registered trademark) post when a delay occurs. [Figure 9] FIG. 9 shows an example of the display of the application of this embodiment, showing an example of the display of selectable routes. [Figure 10] FIG. 10 shows an example of the display of the application of this embodiment, which shows a display example of selectable stations within a selected line. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0009] <Overall> A camera is installed at a fixed point, and when the camera detects a vehicle, it refers to a database that records the time that trains passed at pre-determined fixed points, and compares it with the current time to calculate the train delay. The calculated delay time and a link to the JR East delay certificate corresponding to the current time are posted on Twitter (registered trademark). All programs are written in Python and run on small computers and processors such as Raspberry Pi (registered trademark).

[0010] <Vehicle detection> The basic method for identifying vehicles involves cropping the area of ​​the image that shows the train, masking the image based on hue, brightness, and saturation, and leaving only specific colors (colors that are close to the train's stripes) while filling all other pixels with black pixels. Next, the number of black pixels is subtracted from the total number of pixels in the image, and the number of pixels with a color close to the color of the train strip is counted, and if it exceeds a certain value, it is determined that a train is passing.In addition, since it is considered that hue information is not preserved because the brightness of sunlight is lost in the above method, a method is adopted in which the brightness of pixels at the coordinates of the vehicle window is measured at night, and if it exceeds a certain value, it is determined that a train has passed. During the day, the right and left sides of the photographs in which the train appears (the two white framed areas in the photographs in FIG. 6) are trimmed, and the above-mentioned method is used to check whether the train appears in each of the trimmed photographs. There are four patterns of photograph states: ▲1▼ "the left side was detected, but the right side was not detected", ▲2▼ "the left side was detected and the right side was detected", ▲3▼ "the left side was not detected, but the right side was detected", and ▲4▼ "the left side was not detected, and the right side was not detected either". When the state of the first photograph of the two photographs is ▲1▼ and the state of the second photograph is ▲2▼ (the state in FIG. 6), it is possible to detect the direction by determining that the train passed from the left side. Note that "taking a photograph" described in this embodiment is synonymous with "capturing an image".

[0011] <About the database> The database that records the original passing times uses data that calculates the average time required to travel from the station from which the train departed before passing the shooting location (the camera installation location), i.e., the station that serves as the time base, to the shooting location, and adds this calculated time to the timetable of the station that serves as the time base. In addition, in order to quickly respond to the timetable changes that occur every March, a program was created that automatically retrieves data from the JR East website and rewrites the contents of the database when a timetable change occurs, making it easy to respond even outside the experimental location. Since the timetable does not show seconds, the reference seconds were unified to 30 and all were put in the hhmmss format. (Figure 7) This is because in many lines (excluding the overcrowded lines in the capital region), the diagram is compiled in 15 - second units, and it is expected that the error will be minimized. After detecting the train with a camera, it is a mechanism to detect delays by referring to the database based on the number of passages counted from the start and comparing with the current time.

[0012] <Regarding Twitter (registered trademark)> Twitter (registered trademark) posts · Individual identification for each train · The time when passage was detected at the camera installation location · The time in the timetable of the nearest station to the shooting location · The type of the train and its destination · Whether it is delayed or not · Link to the electronic delay certificate These six items of information. (Figure 8)

[0013] <Regarding the application> Currently, an Android application using this Twitter (registered trademark) post is being developed. The UI is as shown in Figures 9 and 10, and the operation flow is: route selection → station selection → selection of up / down direction, weekday / holiday → selection of a train from the timetable → display of delay information. This enables visual operation instead of searching using text on Twitter (registered trademark), thus improving convenience. The icons for route selection have illustrations of the fronts of representative vehicles of each route pasted on them. Also, currently it only supports the Chuo Line, but it can be immediately supported when other lines are introduced.

[0014] <The effects of this embodiment> The system only provides delay information for trains over 30 minutes, and does not provide detailed information, which is insufficient. Another problem is that the only source of delay information is the railway company. This system is expected to become a second source of information on delays, separate from the railway company. Currently, JR East uses a system called ATOS to provide detailed delay information, but it is only available on certain lines, such as the Tokyo metropolitan area, and accurate delay information is rarely provided on lines where it has not been introduced. These lines include those used by many tourists, such as the Nikko Line, the Ito Line, and the Narita Line between Narita and Narita Airport. This system is in demand as it is cheaper to implement than ATOS, and it is expected that it will spread especially to routes where ATOS has not yet been introduced. EXAMPLES

[0015] FIG. 1 is a block diagram showing the internal configuration of the main system of this embodiment. The main system of this embodiment is composed of a small computer such as a camera-equipped Raspberry Pi (registered trademark) or processor, and an external output means (SNS such as Twitter (registered trademark)) connected to the computer via electromagnetic means such as a wired or wireless network (see the LAN in FIG. 1). The small computer of this embodiment is also composed of an image recognition unit, a time collation unit, and an SNS transmission unit. Although not shown, a memory unit capable of constructing a database may be provided inside and / or outside the small computer of this embodiment, allowing transmission and reception of signals (commands, data) to and from the small computer. The image recognition unit of this embodiment distinguishes the color of a specific part of a specific train based on an image obtained through an imaging means such as a camera, and also executes information processing such as s1 to s3 in FIG. The time collation unit performs, for example, processing related to time. For example, it calculates the difference between the time recorded in the database and the train passing time. It also performs information processing such as s4 to s10 and s12 in FIG. The SNS sending unit (or output unit) transmits data corresponding to an arbitrary SNS to an external SNS, etc., based on data generated by the time information unit of the small computer, etc. It also executes information processing such as s11 and s13 in FIG. The database stores data (data structure) required for the explanation of this embodiment.

[0016] FIG. 2 shows the overall configuration of the system of this embodiment. The system of this embodiment is composed of an imaging means such as a camera, a Raspberry Pi (registered trademark), a router, and an external output means such as Twitter (registered trademark). The imaging means such as a camera in this embodiment is used to capture an image of a part of a train on the track and to determine a specific color of a specific part of the train. Rasphebby Pi (registered trademark) has the same functions as Rasphebby Pi (registered trademark) in Figure 1. The router is a general-purpose network device used on the LAN in Figure 1.

[0017] FIG. 3 shows the layout of the overall configuration of the system of this embodiment. Fig. 3 shows the imaging means such as the camera shown in Fig. 1 and Fig. 2, and Rasphebby Pi (registered trademark). Fig. 3 particularly shows an example of an optimal arrangement of the imaging means such as the camera, and for example, the camera in this embodiment is installed near a window of a building where there are no obstacles so that a specific part of the train can be imaged. In another embodiment, for example, multiple cameras may be installed according to the number of tracks.

[0018] FIG. 4 is a flow chart showing the operation of the main system of this embodiment.

[0019] s1: Extract an image of the train belt from the captured train image, treat the extracted image as an array of pixels, and convert each pixel expressed in RGB to HSV using libraries such as OpenCV for image processing and image analysis. Next, binarize the converted pixels using the following procedure, and calculate the percentage of pixels that match the color of the train belt. First, compare the hue range of the train belt prepared in advance (in a database, etc.) with each (converted) pixel, and generate a new image by setting pixels that match (pixels that are within the hue range) to 1 and pixels that do not match (pixels that are not within the hue range) to 0. Next, if it is determined that the percentage of pixels that are 1 among the pixels of the binary image obtained by this exceeds a predetermined percentage such as 60%, branch to YES, otherwise branch to NO.

[0020] s2: Perform the same process as s1. Here, define the state of the image. The state when branching to YES (the state of "Second Photo" at the bottom of Figure 6) is B, and the state when branching to NO (the state of "First Photo" at the top of Figure 6) is A.

[0021] s3: If the image state transitions from A to B, it is treated as a train passing and the following blocks are executed.

[0022] s4: Obtain the time from the clock in the small computer. The time on the small computer is synchronized with an external NTP server every other day, so the time is always provided in Japan Standard Time.

[0023] s5: First, the time table of a station near the measurement location is added to the travel time from that station to the measurement location, and this is stored in the database as the scheduled time at the measurement location.

[0024] s6: When a train passes, the difference between the passing time of the nth train (n = the first train count is 1) from the database is calculated.

[0025] s7: Add 1 to the train count variable n in the database, and memorize the number of the next train that is passing by from the first train.

[0026] s8: Next, calculate the difference between the database time and the passing time. If the difference is 2 minutes or more (above the specified time) or less than 2 minutes (below the specified time), the condition branches.

[0027] s9: If the delay is more than 2 minutes (more than a specified time), prepare a tweet template to inform the user that there is a delay. This tweet includes the current time, the departure time from stations near the measurement point, the delay time, etc. The template may be stored in any storage means such as a database. Twitter (registered trademark) has a character limit of 140 characters, so there is a limit to the information that can be posted, so if you want to include other information, you need to replace the information.

[0028] s10: Then, the current time, departure time from the station near the measurement point, and delay time are entered into the tweet. The current time is taken from the time obtained in s4, the departure time from the station near the measurement point is taken from the database of the measurement point, and the delay time is taken from s6.

[0029] s11: The tweet created in s10 is sent to Twitter (registered trademark).

[0030] s12: Also, if it is less than 2 minutes (less than the specified time), prepare a tweet template to inform the user that operations are currently normal. The current time is the one obtained in s4, just like in s10.

[0031] s13: The tweet created in s12 is sent to Twitter (registered trademark).

[0032] FIG. 5 is a flowchart showing the operation of the application according to this embodiment.

[0033] s14: The "Select Line" screen is the first screen displayed when the app is opened. From this screen, select the button for the line for which you want to search for delays, and then proceed to the next station selection screen. The app created this time is a prototype and implements buttons for major lines in the Tokyo metropolitan area of ​​JR East, but the buttons actually work only on the Chuo Line where the experiment is being conducted. Originally, only lines where cameras are installed and the system is operated are displayed. The buttons are basically arranged vertically, and additional buttons are added using the Android app creation software "Androidstudio". To improve usability, the buttons are sized to be easy to press with your finger and can be scrolled. Each button uses the line color of the respective line, and from the left of the button, the line symbol, line name, and front of the train are arranged in that order.

[0034] In s15: "Select Station," the user selects the station they will actually board at. As with the previous line selection, the buttons are arranged vertically, and the color of the buttons is the line color of the line. The numbering of each station is the same as that on the actual station sign, improving convenience.

[0035] s16: "Go to the railway company's timetable page for that station" uses a WebView to display the station timetable page of the railway company selected by the user within the app.

[0036] s17: "Select up and down" allows the user to select the up and down route they want to ride. In some cases, they may select weekdays, weekends, and holidays.

[0037] s18: "Select departure time" allows the user to select the departure time of the train they want to board. They can specify exactly what time they want to board.

[0038] s19: When the user taps the "Check this train" button in the top right of the app screen and a page for a specific train timetable is open, the application obtains the URL of the page displayed in WebView. Next, it extracts the last six characters of the obtained URL, excluding .html. Finally, WebView displays the Twitter (registered trademark) post containing the train delay information, with the hashtag "DISS_" added to the beginning of the extracted six characters.

[0039] FIG. 6 shows the discrimination method of this embodiment. The process can be broadly divided into "taking a photo," "determining whether a train is in the photo," and "posting the information on social media." The basic method for identifying vehicles is to crop the area of ​​the image that shows the train, mask the image according to hue, brightness, and saturation, and leave only certain parts of the train's stripe color (orange in the case of the Center Line), filling all other pixels with black. Next, the number of black pixels is subtracted from the total number of pixels in the image, and the number of pixels that are the color of the vehicle stripe is counted, and if a certain value is exceeded, it is determined that a train has passed. In addition, because it was thought that the above method would not preserve hue information at night when the brightness of sunlight is lost, a method was adopted in which the brightness of the pixels in the vehicle's windows is measured and when it reaches a certain value or above, it is determined that a train has passed. During the day, the right and left sides of the photographs taken (the two white framed areas in the photographs in Figure 3) where the train appears are cropped, and it is confirmed whether the train appears in each photograph. The detection situation can be divided into four patterns: ▲1▼ "Left side → detected, right side → not detected", ▲2▼ "Left side → detected, right side → detected", ▲3▼ "Left side → not detected, right side → detected", and ▲4▼ "Left side → not detected, right side → not detected". For example, if the state of the first photograph is ▲1▼ and the state of the second photograph is ▲2▼ as shown in Figure 3, it can be determined that "a train passed from left to right."

[0040] FIG. 7 shows an example of a data structure used in this embodiment. A database that records the original passing times is needed to determine train delays. First, add the time at the station before the shooting location (where the camera was installed) to the average travel time from there to the shooting location to find the passing time of the train at the shooting location. A comma-separated file containing the passing times of each train is used as the database. Since station timetables do not list seconds, the standard number of seconds was unified to 30. This was done to minimize errors, since most lines, except for the congested lines in the metropolitan area, have timetables set to 15-second intervals. After the train is detected by the camera, the system checks the database based on the number of passes counted from the first train and compares it with the current time to detect delays. Column A is the actual time the train passed at the location where the photo was taken, column B is the type of train, column C is the destination (left blank if bound for Tokyo), and column D is numbers related to the "train identification hashtag" described below. Additionally, in order to be able to respond immediately to the timetable changes that take place every March, a program will be created that automatically retrieves data from the JR East website and rewrites the contents of the database when a timetable change is made. Using the above method, train delays are calculated and information is provided on social media. The actual information provided is as follows: -Time when the camera detects someone passing through the area -Timetable of the nearest station to the shooting location Train type and destination Is it delayed? Link to electronic certificate of delay The standard for indicating a delay when providing information is 120 seconds (2 minutes) or more.

[0041] FIG. 8 shows an example of an actual Twitter (registered trademark) post when a delay occurs. In addition, to enable passengers to search for delays only for the specific train they are planning to take, Twitter (registered trademark) adds a "train identification hashtag" ("#DISS_158231" in Figure 8) to posts, which names the train in an absolute sense, and is not bound to a reference station that depends on the location of the camera. The currently implemented train identification hashtags are created based on the URLs of the train timetable pages provided by JR East. Although the plan was to run it on two Raspberry Pi (registered trademark), it was decided to run it on a single device, which would enable the program to be simplified and costs to be reduced. In addition, by changing the recognition method between day and night, we were able to successfully identify trains both during the day and at night, and detect the direction of passing trains. Detecting the hue of pixels makes it less susceptible to external factors such as shadows and sunlight, making it possible to accurately detect delays. In order to improve convenience, we have created an application that runs on Android (registered trademark) (hereinafter referred to as the Android app). We used Android Studio as the application development environment, and have confirmed that it works on Android smartphones with Android 11, 12, and 13. In order to improve convenience by eliminating the need to search, the Android app is based on button layout only. In addition, the numbering of each line and train icons are arranged to make it visually easy to understand.

[0042] FIG. 9 shows an example of the display of the application of this embodiment, showing an example of the display of selectable routes. The design of the route selection button at the top of Figure 9 places the route name in the center of the button, the route numbering on the left edge, and a representative vehicle icon that runs on that route on the right edge.

[0043] FIG. 10 shows an example of the display of the application of this embodiment, which shows a display example of selectable stations within a selected line. In Figure 10, the station selection button design places the station name on the right side of the button and the line numbering on the left edge, and the line numbering conforms to that of JR East. The smartphone screen in Figure 10 is an example of the app screen, and by following the steps of ▲1▼Select a route →▲2▼Select a station →▲3▼Select the timetable of the train you want to take →▲4▼Display delay information, you can find out the delay information for the selected train with just the touch of a button. The delay information posted by the user is displayed using a WebView.

[0044] As a possible development, the accuracy of image recognition could be improved and it could be used for route buses. By installing cameras at bus stops and comparing them with the bus stop timetable, it would be possible to know how late the bus is when it stops at the bus stop. Route buses, unlike train lines, do not run in the same place, so if machine learning and other methods can be used in addition to image recognition to distinguish the color of the bus, it could be used for route buses.

[0045] Although the embodiments of the present invention have been described above, various alternatives, modifications, and variations are possible for those skilled in the art based on the above description, and the present invention includes the above-mentioned various alternatives, modifications, and variations without departing from the spirit of the present invention.

Claims

1. A system for detecting and providing train delays using a camera, comprising: The system includes an image recognition unit, a time comparison unit, an output unit, and a database, The image recognition part is An image of the train belt is extracted from an image of the train captured by the camera, the extracted image is regarded as an array of pixels, each pixel expressed in RGB is converted to HSV using an image processing analysis library, the converted pixels are binarized, the proportion of pixels that make up the train belt is calculated, and the state of the image is defined according to whether or not the proportion of pixels in the image exceeds a predetermined proportion; When the state of the defined image transitions from a state exceeding a predetermined ratio to a state not exceeding the predetermined ratio, it is determined that a train is passing; The time collation unit is Get the time on the clock, The timetable of a station near the measurement location is added to the time required from that station to the measurement location, and the result is stored in the database as the scheduled time at the measurement location. When a train passes, the difference between the passing time of the nth train (n = the first train count is 1) and the passing time of the nth train is calculated from the database. Add 1 to the train count variable n in the database, Calculate the difference between the database time and the transit time, If the difference is greater than a predetermined time, an output data template is prepared to inform the user that there is a delay. The output data includes the current time, the departure time from the station near the measurement point, and the delay time. Prepare an output data template that indicates that the system is currently operating normally if the difference is less than a specified time. The output section is A system characterized by transmitting prepared output data to an external SNS.

2. The system described in claim 1, characterized in that, at night, the image recognition unit also measures the brightness of the pixel portion corresponding to the coordinate range of the vehicle window, and when the brightness becomes equal to or exceeds a predetermined value and the state of the defined image transitions from a state where the brightness exceeds a predetermined ratio to a state where the brightness does not exceed the predetermined ratio, it determines that a train has passed.

3. A program executed by a processor for detecting and providing train delays using a camera, comprising: An image of the train belt is extracted from an image of the train captured by the camera, the extracted image is regarded as an array of pixels, each pixel expressed in RGB is converted to HSV using an image processing analysis library, the converted pixels are binarized, the proportion of pixels that satisfy the color of the train belt is calculated, and the state of the image is defined according to whether or not the proportion of pixels in the image exceeds a predetermined proportion; When the state of the defined image transitions from a state exceeding a predetermined ratio to a state not exceeding the predetermined ratio, it is determined that a train is passing; Get the time on the clock, The timetable of a station near the measurement location is added to the time required from that station to the measurement location, and the result is stored in the database as the scheduled time at the measurement location. When a train passes, the difference between the passing time of the nth train (n = the first train count is 1) and the passing time of the nth train is calculated from the database. Add 1 to the train count variable n in the database, Calculate the difference between the database time and the transit time, If the difference is greater than a predetermined time, an output data template is prepared to inform the user that there is a delay. The output data includes the current time, the departure time from the station near the measurement point, and the delay time. Prepare an output data template that indicates that the system is currently operating normally if the difference is less than a specified time. A program characterized by transmitting prepared output data to an external SNS.

Citation Information

Patent Citations

  • Bus traffic control system

    JP2007264875A

  • Delay information distribution device

    JP2009073331A

  • Situation judging device, situation judging method, situation judging program, abnormality judging device, abnormality judging method and abnormality judging program

    JP2009110054A

  • Server, system, method and program for providing information on vehicle to get on

    JP2010264937A

  • Transfer guide system, transfer guide method and computer program

    JP2015137929A