Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect type of self must be 'BackgroundSubtractorMOG2' #13

Open
VyBui opened this issue May 22, 2019 · 1 comment
Open

Incorrect type of self must be 'BackgroundSubtractorMOG2' #13

VyBui opened this issue May 22, 2019 · 1 comment

Comments

@VyBui
Copy link

VyBui commented May 22, 2019

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
Copy link

Replace 'BackgroundSubtractorMOG2' with 'createBackgroundSubtractorMOG2'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants