mahaveerverma / hand-gesture-recognition-opencv

A project on hand detection and hand gesture recognition developed using OpenCV on Python 2.7.
MIT License
315 stars 132 forks source link

I'm getting this error.How to solve this? #8

Closed saisuhas closed 6 years ago

saisuhas commented 6 years ago

Traceback (most recent call last): File "C:\Users\Suhas\Desktop\Mahaveer Varma hand-gesture-recognition-opencv-master\HandRecognition.py", line 190, in fg_frame=remove_bg(frame) File "C:\Users\Suhas\Desktop\Mahaveer Varma hand-gesture-recognition-opencv-master\HandRecognition.py", line 166, in remove_bg fg_mask=bg_model.apply(frame) TypeError: Incorrect type of self (must be 'BackgroundSubtractorMOG2' or its derivative)

beingabstrac commented 6 years ago

Replace 'BackgroundSubtractorMOG2' with 'createBackgroundSubtractorMOG2'. That worked for me.

saisuhas commented 6 years ago

Thank you so much!This one worked for me

mahaveerverma commented 6 years ago

Thanks @rishirD for solving this one :)