Ask Your Question
0

AttributeError: module 'cv2.cv2' has no attribute 'createBackgroundSubtractorMOG'

asked 2016-09-04 14:12:12 -0600

jishnujcm gravatar image

using opencv 3.1.0 running opencv-python tutorial example

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-09-05 00:56:45 -0600

berak gravatar image
  • there is no such thing as cv2.cv2 (probably a typo on your side)
  • opencv's main repo has :
    1. cv2.createBackgroundSubtractorMOG2()
    2. cv2.createBackgroundSubtractorKNN()
  • both cv2.createBackgroundSubtractorMOG() and cv2.createBackgroundSubtractorGMG() were moved to the cv2.bgsegm module in opencv_contrib (to use those, you'll have to rebuild cv2 with contrib src)
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-09-04 14:12:12 -0600

Seen: 6,944 times

Last updated: Sep 05 '16