First time here? Check out the FAQ!

Ask Your Question
-1

A way to ensure Canny runs in serial?

asked Nov 19 '14

updated Oct 24 '0

If I'm running version 2.4.9 on a Mac as part of a C++ project, is there a way to ensure the Canny function runs in serial, for benchmarking purposes?

I've looked around on this, and from what I've seen so far, it looks like you'd need to specifically make/build OpenCV such that no parallel libraries (like OpenMP or TBB) are used.

But I (a) want to make sure that's a correct understanding, and (b) want to make sure there isn't an easier way.

Thanks for any help!

Preview: (hide)

1 answer

Sort by » oldest newest most voted
0

answered Nov 22 '14

Hi,

Indeed, you have to make sure you build OpenCV without TEGRA_OPTIMIZATION or IPP (you have to install such library so by default, this is not enabled). Then, you have to disable opencl using cv::ocl::setUseOpenCL(false) to prevent OpenCV to use your graphic card.

After a brief investigation of the source code (2.4.9), it seems Canny (as well as Sobel) was not optimized using TTB... It should then run using only one processor. Please tell us if it's not the case!

Preview: (hide)

Question Tools

Stats

Asked: Nov 19 '14

Seen: 262 times

Last updated: Nov 22 '14