1

I'm working with OpenCV, and I am trying to extract the score from the scoreboard from a soccer video, and compare score changes to detect goals automatically. what is the best way to do that ?

I found that i can use OCR (optical character recognition), and other says that it can be done using SVM ...

I'm not asking a whole code, but if anyone has any example link or you can just type a walkthrough, it is of great help.

what i'm trying to do is something like that: ( As i can't post pics, please see the link below: https://docs.google.com/document/d/1Dxsjt4Wo_bjVDBh3VTa5ZMjzxKus9rdicEhO_jXdpY8/edit?usp=sharing )

1/ detect the score box [the score can be in any corner of the video, i.e automatically detected]

2/ Score detection

3/ and finally compare results and detect changes ==> goals

Aboullaite
  • 394
  • 1
  • 3
  • 17
  • 2
    if you show us how one frame is , may we could help you ! – Engine Mar 28 '14 at 11:35
  • You can try matching the the border of the score-box.. it is going to be similar if not same and probably on the same position. Now apply OCR on the extracted box or write your own little optimized OCR for this purpose only. If the score-box is moving or something then you can try searching the box-border near to last found-box-area. – Pervez Alam Mar 28 '14 at 12:00
  • thanks guys four you help. @Engine i modified the post, please refer to the link. – Aboullaite Mar 28 '14 at 12:25
  • thank you @Pervez Alam, but if a have to automatically detect and extract score box from multiple/different soccer videos ?! – Aboullaite Mar 28 '14 at 12:31

1 Answers1

0

I suggest you to make a filter/mask of portion of score box that is surely going to be there around the score-box and keep all such possible filter for different channel/video (assuming not a huge number of different types of score-boxes). It may be only first row of score-box, or a logo or some other signature e.g.

Mask to be search to find score-box

Now you can look for these masks in video frames and you can extract out the remaining part.

As shown in your image, the important data is always in specific location, extract that and you have it.

Algorithm will be fast as you don't need to search whole frame but a really small area and you can search only Y component with great detection rate.

Pervez Alam
  • 1,246
  • 10
  • 20
  • thanks, but i said, my main problem is that i have multiple videos from different sport channels and leagues i.e different score-boxs formats. the job must be done automatically ( detecting the score box), because, as you know, each league has it specific score-box format and it's gonna be a little bit hard to keep all possible filters for different formats – Aboullaite Mar 28 '14 at 15:30
  • Yes, you are right. My answer assumed not too many different types of scoreboards(as mentioned in answer) I have a better solution for it too. Try block matching to detect the part of frame that is not changing. By comparing 2 to 5 frames you can identify the past of video that is not moving and one of these parts is your score box. Now you can find the score box among these parts with some shapes or digit matching or more similar techniques. – Pervez Alam Mar 29 '14 at 16:12
  • Thank you @Pervez. Can you suggest me some algorithms to detect invariant frames in OpenCV. – Aboullaite Apr 01 '14 at 15:24
  • If you keep `AND`ing 3-4 frames, theoretically, the left part should be the invariant part of image, that is the score-box. I suggest you to AND every 3rd or 4th frame rather than continuous frames so that moving part can be removed appropriately. Please share your result in case of difficulty. – Pervez Alam Apr 03 '14 at 06:17
  • Thanks for the help @Pervez, i tried a different approach: as you said the score box most be the invariant part of image, i tried difference between two images, and that show encouraging results ( pls refer to to the second page of the googDrive doc https://docs.google.com/document/d/1Dxsjt4Wo_bjVDBh3VTa5ZMjzxKus9rdicEhO_jXdpY8/edit?usp=sharing). Do you have any suggestion to how extract the black part ?! – Aboullaite Apr 05 '14 at 14:53
  • Try AND original frame with not of your output image. AND and difference both have limitation according to type of motion. Try to use multiple method and use multiple frames result to experiment to minimise false positive areas. Happy coding – Pervez Alam Apr 05 '14 at 18:54