dev-labs-bg / football-stats

Tracking of football players and analysis
GNU General Public License v3.0
93 stars 32 forks source link

Incorrect type of self must be 'BackgroundSubtractorMOG2' #13

Open VyBui opened 5 years ago

VyBui commented 5 years ago

Dear Mr. @cmihaylov and @Bratanov.

Thank you for putting up the libraries.

I followed accordingly your instruction in README file to get the video up and running. However, In step 5. When the video is loaded and freezed. I click 4 times to make UP/DOWN/LEFT/RIGHT corner. The program throws an error this like:

raceback (most recent call last): File "main.py", line 85, in <module> thresh = getThresholdedFrame(fgbg, frame) File "football-analysis/football-stats/lib/fgbg_calculations.py", line 15, in getThresholdedFrame fgmask = fgbg.apply(image, learningRate=0.02) TypeError: Incorrect type of self (must be 'BackgroundSubtractorMOG2' or its derivative)

I am not a Python developer but I am guessing the reason I getting the issue is because I use Python 3?

I would like to ask if you have noticed this issue before? And do you know how to resolve it?

Another guess is because the video, which I am using, was not the right format? I am using this video: https://www.youtube.com/watch?v=DTEA44jrkWw&t=2s

So I am looking forward to seeing your comment!

Best regards,

Vy

smritijha03 commented 4 years ago

Replace 'BackgroundSubtractorMOG2' with 'createBackgroundSubtractorMOG2'.