Well, if it’s actually readind the match data from a livestream, just get the current time since start, and use it to create starts and stops, and then you could run it through ffmpeg to extract only the start of a match and the end (plus or minus like 5 seconds I suppose.)
I’m looking at it like a programmer, but this overall is awesome!
Score screens in the DS wouldn’t work. Unless I’m mistaken, driver stations don’t have access to the internet during a match, and even if they did, there would be a huge lag. Also, this would probably blow out your bandwidth limit.
This looks really neat. I am looking into parsing rotors/balls/climbs scored and maybe teams on both alliances as well. I am wondering if maybe if the OCR can be used to read how many exact gears are on an airship for semi-automatic scouting (however this might be too inconsistent).
I don’t think exact gears are possible, but interpolations from rotors would be. You could from the times and rotors derive a gear scoring rate. There would be some problems still because of the unequal tiers. The first rotor rate wouldn’t be reliable because it doesn’t take multiple gears and is automatic. The fourth rate wouldn’t always happen. So you might need to take some average of the 2nd and 3rd rotor rates. You also then have to deconvolute this to make it a team-based rather than an alliance-based rate.
I’d researched ocr’ing the stream (for gear rates), so I’m glad someone has at least done it for the score. I’d found this example: https://waldo.jaquith.org/blog/2011/02/ocr-video/, but didn’t get very far. I basically reached the part before the Tesseract part, but I wasn’t processing the stream in a systematic way. I hadn’t yet figured how to start/stop the match time. The background color changes throughout the match and at key times, so that was where I was thinking I could key onto (like the color change at 30 seconds remaining).
It’s now spamming twitter at @FRClivescore](https://twitter.com/FRClivescore). Please report any incorrect scores if possible! It seems like it’s most inaccurate with the blue score at the moment, occasionally appending a number at the end.
With a huge amount of help from Eugene Fang, the 2018 version of FRC Livescore is ready to go for the season. There are a ton of new changes for this latest version, including (but not limited to):
Using SURF to detect the scale and position of the scoreboard,
Only trying to detect the position of the scoreboard if OCR fails. Otherwise, uses the last detected positions. This allows for much faster results.
Detecting if the red/blue alliances are swapped on the scoreboard.
Detecting the match mode: pre_match, auto, teleop, post_match
Using a KNN classifier trained by Tesseract for faster digit OCR
Some of you may have already seen this in Week 0, but FRC Livescore is now being used on The Blue Alliance to show the real-time scoreboard on an event’s page! This feature is still in the very early stages and is subject to change as the season progresses, but it’s a very cool use of this technology and am super excited for it to be used during the season. It should also provide us with some unique statistics about matches this year, and how different ownership times affect the outcomes of games.
The current plan is to deploy workers onto Google Cloud Platform (where the rest of TBA runs) for each ongoing event. Each worker will monitor the webcast video stream, run FRC Livescore, push live data to TBA, and save data to a SQL database.
The backend code is here, and is still a work in progress. 3 more days.