“Static” text detection in video

I am new to OpenCV and I’m wondering if someone would suggest what method of detection would be best for my use case so I can start reading the most relevant documentation and tutorials.

I want to detect text on a leaderboard. The leaderboard will always have the same font, may have a slightly different background, but the position and format will always be the same - just different text. The leaderboard will also scroll and this will be video footage - however it will pause on each part of the leaderboard for a few seconds so it doesn’t need to be high frame rate or anything. And of course it won’t need to worry about lighting, angles, camera quality etc.

The sort of leaderboard will be like this:

Except that it will extend past the bottom of the screen and will scroll.

It’s perfectly acceptable for this processing to be done on screenshots taken every few seconds if that makes a difference.

I have had a look at a few detection methods from my primitive knowledge. EAST/Tesseract text detection looks like it might be a bit overkill? And there seems to be lots of options in opencv text detection. So, a push in the right direction to help with my reading going forward would be greatly appreciated, thanks!

try sample in opencv_contrib/modules/text/samples at master · opencv/opencv_contrib · GitHub

you don’t need to “detect” the text. you know where it is already, and it’s always in the same place. just take the region containing the text… or a region per table row, if you want to be sure to get the right text for the right row.

you will need tesseract or some other OCR engine to actually extract text from the image data.

since lots of tesseract use is lazy and runs a subprocess, instead of using the library, using tesseract may be slow. quick re-recognition is possible since that text is always drawn the same. you can check a table cell against previously taken pictures of cells, and judge by pixelwise differences.

you can determine the right time for a “screenshot” by analyzing how the picture changes/moves. wait until it stopped moving. process. repeat after it starts moving again. you can work with pixelwise differences (cv::absDiff).