Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

MOG and GMG were moved to opencv_contrib with opencv3, and you have to call a "create" function, not a constructor, like:

 fgbg = cv2.BackgroundSubtractorMOG2_create()

MOG and GMG were moved to opencv_contrib with opencv3, and you have to call a "create" function, not a constructor, like:

 fgbg = cv2.BackgroundSubtractorMOG2_create()

also have a look at:

 >>> help(cv2.BackgroundSubtractorMOG2_create())

MOG and GMG were moved to opencv_contrib with opencv3, and you have to call a "create" function, not a constructor, like:

 fgbg = cv2.BackgroundSubtractorMOG2_create()
cv2.createBackgroundSubtractorMOG2()

also have a look at:

 >>> help(cv2.BackgroundSubtractorMOG2_create())
help(cv2.createBackgroundSubtractorMOG2())