I'm getting this error.How to solve this?
saisuhas opened this issue · comments
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)
Replace 'BackgroundSubtractorMOG2' with 'createBackgroundSubtractorMOG2'.
That worked for me.
Thank you so much!This one worked for me
Thanks @RishiRd for solving this one :)