andrewda / frc-livescore

A Python package to determine the score of an FRC game from images
MIT License
29 stars 4 forks source link

Parse match summary screen #2

Open andrewda opened 7 years ago

andrewda commented 7 years ago

2017

screen shot 2017-07-08 at 9 35 56 am

2018

blah

rjbell4 commented 6 years ago

Can I help with this in any way? I took a look, and it seems like you are well set for this. AFAICT, it would involve matching the screen to a template so that it's recognized, detecting red + blue sides (it does appear that they can be flipped), and then using OCR to detect the match name, scores, and individual data points.

Perhaps if I were were to help create a template for the match-end status screen? Presuming that's something you need to manually create in an image editor from a screenshot (i.e., you don't have access to the raw template image)

I think this project is extremely cool, and am happy to help it along.

andrewda commented 6 years ago

Yea, making a template would be great! Feel free to take this on if you'd like, I don't believe anyone is working on it.

rjbell4 commented 6 years ago

I'm not that familiar with how the OpenCV matching goes. But I took the screenshot, scrubbed it of match-specific data, switched the red and blue to "FIRST-standard" red and blue, trying to clean up some minor color artifacts from the video, etc., and this is what I came up with: status2018

What I'm in particular not sure of is how to resolve the red and blue colors flipping. Does one image suffice? Do need to use two alternative templates? Do we need to somehow "neutralize" the red and blue? I don't know enough about the current techniques to make an informed decision.

Here are some images that I thought could make for good tests: status1 status2 status3