2019-02-25 17:22:29 -0600 | marked best answer | opencv two algorithms running in parallel Thanks for reading this post. My program is written in c++ run in visual studio 2017, opencv version 4.0.1 build with tbb and mkl. I am trying to run two instances of similar combination of opencv functions resize, thresholding, morphology open and close and lastly a findcontour. my application scenario is that I capture two frames from two cameras and trying to process them in parallel. One frame when run individually takes about 9 ms to finish the processing, two frames when run sequentially takes 17 ms to process. but i implement this code in parallel using std::thread, processing time doesn't improves but actually adds 1ms of thread creating overhead to it, so it takes 18ms to finish. i have tried the boost library but the results were similar to the std::thread. When i implement tbb task groups, while there is no task creating overhead but the processing time still stays 17ms. I have provided the codes below. I am wondering if there is something i am doing wrong or if this behavior is normal, this kind of processing. Because my expectations where that the process time will decrease to somewhat 9-12 ms while running the code in parallel. but this doesn't work that way. using std:: thread (more) |
2019-02-25 17:22:29 -0600 | received badge | ● Scholar (source) |
2019-02-24 10:53:18 -0600 | asked a question | opencv two algorithms running in parallel opencv two algorithms running in parallel Thanks for reading this post. My program is written in c++ run in visual stud |