copy cv2.BackgroundSubtractorMOG2
Is there a way to create a duplicate copy of cv2.BackgroundSubtractorMOG2 in python? I want to train it for a single set of frames first, then train it for 2 different set of frames later.
copy.copy() and copy.deepcopy() did not work.
afaik, you can't do that (it's not allowed).
why do you even need a copy ?
if you want to use it with different frames later, you also have trained it on the wrong ones before, no ?
Thanks for the feedback.
It's not trained on the wrong ones before, but I want to test how the subtraction evolve under different environments. Is there a way to save the MOG model to a variable and then apply the background subtraction later? Or, a way to copy and assign the MOG parameters with pointer operations? I'll probably spend some time to look into this next, unless someone can confirm that this approach won't work either.