mahaveerverma / hand-gesture-recognition-opencv

A project on hand detection and hand gesture recognition developed using OpenCV on Python 2.7.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

saisuhas opened this issue · comments

commented

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)

commented

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

commented

Thank you so much!This one worked for me

Thanks @RishiRd for solving this one :)