Ask Your Question
0

Finding features in several threads

asked 2012-11-01 01:10:41 -0600

zenberg gravatar image

updated 2012-11-01 03:30:23 -0600

Hello,
From my experience it seems like OpenCV uses only one OS Core for all its calculations.

Can you please tell me if there is a way to make the "detect features" operation(for example) work in several threads on different cores?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
4

answered 2012-11-01 02:03:13 -0600

Kirill Kornyakov gravatar image

This is not true, OpenCV uses threads for some calculations. You can grep sources for parallel_for to see which functions are optimized. Of course we need more threading, and everybody (including you) can help with it. Just try to rewrite something with parallel_for and submit a pull request, like these: 116, 113, 36, plus some merged and closed.

I don't know what you mean by "find features" (FeatureDetector::detect() ??), but if the function doesn't use several threads, you can easily implement it by yourself. For example, you can cut your image into several horizontal stripes (actually create several submatrices), and run "find features" on these stripes in parallel. I think you'll get some visible performance improvement.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2012-11-01 01:10:41 -0600

Seen: 329 times

Last updated: Nov 01 '12