Reputation: 1256
I would like to get the numbers from an image of a basketball scoreboard received from a camera device, by using OCR or any other algorithm. The input image is similiar to this:
How can I get the best result? Which algorithm should I use?
Upvotes: 1
Views: 276
Reputation: 51893
extract bright orange-red pixels only and binarize
so pixels near the Redish/Orange color above some threshold intensity are white the rest is black pixel.
remove gaps between segments by morphologic operators
enlarge white pixels area few times to cover the gaps between dot segments so digits will become single object
segmentate digits (for example by flood fill)
find first white pixel and flood fill recolor it to object 1 ID, then find next white pixel and recolor it to object 2 ID and so on until no more white pixels left. You can remember bbox of each object and filter out objects not matching digit properties: (aspect ratio, size, density)
OCR each digit and reconstruct text based on digit position
If your camera is fixed you can manually hardcode the digits regions elliminating the need for bullet #3. Also you can use the black areas to determine digit areas as the border is black...
Upvotes: 1