Ask Your Question

Revision history [back]

multiple opencv processes running

My CPU has 4 logical cores and OS is Linux Ubuntu. I have read that OpenCV internally spawns x number of threads where x = number of logical cores. I am using cv::SetNumThreads() to control the number of threads spawned. Now when I run my program by setting cv::SetNumThreads(y), I see y processes using htop. And when I use ps -o nlwp <PID> how many threads each of these processes have, I get 1 process containing all y threads. And the other processes containing no threads. Can anyone explain me what is happening ? I am also attaching my code if it matters. I am just doing some simple feature extraction. image description