-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
Multiple MOG2_GPU objects share the same parameter values #5296
Description
Hi,
While using MOG2_GPU class, I realized that if you have two MOG2_GPU objets whenever you modify any parameter of one of the objects, the other is affected too.
Taking a look at OpenCV code, I think that this is related to the declaration of MOG2_GPU parameters in file "opencv/modules/cudabgsegm/src/cuda/mog2.cu", where MOG2_GPU variables are allocated only once, independently from the number of MOG2_GPU objects . As a consequence, each object that calls the loadConstants method, overwrites the variables values affecting every MOG2_GPU object.
I think that this implementation is similar to other gpu classes, so I suppose the same situation takes place with these classes.
My question is whether there is any plan to modify this behavior or this was implemented intentionally and there will be no modification in the future.