You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Multiple MOG2_GPU objects share the same parameter values #5296
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.
This one recently bit us... Any ideas if someone is working on it?
Seems like, at the very least, the API should prevent allowing the creation of multiple instances of this. And/or the documentation should point out that it is unsafe...
Activity
logidelic commentedon Dec 4, 2019
This one recently bit us... Any ideas if someone is working on it?
Seems like, at the very least, the API should prevent allowing the creation of multiple instances of this. And/or the documentation should point out that it is unsafe...