OpenCV2 Python createBackgroundSubtractor module not found

后端 未结 7 1570
抹茶落季
抹茶落季 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:04

    Thanks for the comments all. It seems that createBackgroundSubtractorMOG2() hasn't been added to OpenCV 2.4, but it is present in master branch, which can be compiled from github.

    I am finding that cv2.BackgroundSubtractor() is working for what I need at the moment.

    See http://code.opencv.org/issues/2812#note-5 for more details.

提交回复
热议问题