Parallelize OpenCV Processing with Qt?

First of all, my instinct is to say: "If it is really fast and works great, don't change it!

First of all, my instinct is to say: "If it is really fast and works great, don't change it! " If you just want to play around with threads, I recommend that you take a look at QtConcurrent. I don't know anything about performance differences between an implementation with QThread vs. QtConcurrent, but I prefer using QtConcurrent::run over using threads (I don't have performance critical rendering code).

First of all, make sure you don't create new threads for every frame - constructing threads are expensive. A lightweight solution could be to use QtConcurrent::run() to create N QFutures. Use QFuture::waitForFinished on each of the futures and collect the results.

However, I'm not convinced that QFutures are the right solution for realtime processing. An alternative approach would be to use QThreadPool directly. Again, make sure you don't create the pool every frame.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions