Scoreboard digit recognition using OpenCV

前端 未结 5 1486
轻奢々
轻奢々 2021-01-31 05:59

I am trying to extract numbers from a typical scoreboard that you would find at a high school gym. I have each number in a digital \"alarm clock\" font and have managed to persp

5条回答
  •  Happy的楠姐
    2021-01-31 06:15

    Given the highly regular nature of your input, you could define a set of 7 target areas of the image to check. Each area should encompass some significant portion of one of the 7 segments of each digital of the display, but not overlap.

    You can then check each area and average the color / brightness of the pixels in to to generate a probability for a given binary state. If your probability is high on all areas you can then easily figure out what the digit is.

    It's not as elegant as a pure ML type algorithm, but ML is far more suited to inputs which are not regular, and in this case that does not seem to apply - so you trade elegance for accuracy.

提交回复
热议问题