I'm using openCV in a multithreaded software and I'm starting as many threads as CPUs are available. Further I'm using some openCV functions and there my problem starts. It seems to me that openCV internally starts own threads.
$ ps huH p 30266 | wc -l
1650
1650 Threads??? What are the cmake flags to stop openCVs multithreading support?
As mainactual mentioned, you can set the number of threads at runtime using cv::setNumThreads(int nthreads)
.
Refer here for more information.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With