python-opencv AttributeError: 'module' object has no attribute 'createBackgroundSubtractorGMG'

后端 未结 4 1961
野趣味
野趣味 2020-12-29 12:43

I am trying to follow the tutorial given in: https://opencv-python-tutroals.readthedocs.org/en/latest/py_tutorials/py_video/py_bg_subtraction/py_bg_subtraction.html

4条回答
  •  抹茶落季
    2020-12-29 13:15

    bgsegm was in contrib module of opencv, but after the update I am not sure.

    But still, if you have not built contrib module:

    pip install opencv-contrib-python
    

    Make sure no console is running that has imported cv2 while you execute your installing process. Run the cmd as Administration

    It worked for me.

提交回复
热议问题