How to limit the number of threads that opencv uses in Python?
You can use cv2.setNumThreads(n) (Where n = number of threads)
But it didn't work for me, its still using all the CPU.
I am designing a program which will run continuously on a ROC64. It includes the usage of BackgroudsubtractorMOG2(a background-subtracting algorithm implemented in opencv). Opencv seems to use multithreading optimization in this algorithm and it eats up all the CPU resources. I understand that in C++ we can limit the number of threads by using setNumThreads().Is there a similar thing in Python or I must find another way to work around it?