OpenCV2 Python createBackgroundSubtractor module not found

后端 未结 7 1536
抹茶落季
抹茶落季 2020-12-31 05:02

I am trying to use cv2.createBackgroundSubtractorMOG2 () method in Python. I have tried both on my Mac and on my Raspberry Pi, and get the same error when running the follow

7条回答
  •  傲寒
    傲寒 (楼主)
    2020-12-31 05:28

    I'm using OpenCV-python 2.4.9, and Python2.7.8.

    In my environment, cv2.BackgroundSubtracorMOG and cv2.BackgroundSubtractorMOG2 are available.

    You can find out what attributes are available by using "help(cv2)" in your python shell.

    BackgroundSubtractorMOG(...)
        BackgroundSubtractorMOG([history, nmixtures, backgroundRatio[, noiseSigma]]) -> 
    
    BackgroundSubtractorMOG2(...)
        BackgroundSubtractorMOG2([history, varThreshold[, bShadowDetection]]) -> 
    

提交回复
热议问题