Does OpenCV for Mac use the Accelerate framework?

1k views Asked by At

The Accelerate framework is a Mac-specific framework that provides things like image convolutions and LAPACK, supposedly optimized to be as fast as possible on Macs. My question: Does OpenCV take advantage of this? Specifically, does the function "filter2D" use Accelerate?

3

There are 3 answers

0
Martin Beckett On

Not a mac expert but AFAIK openCV uses IPP (if installed) TBB (build option) and NVidia-CUDA (build option)

0
macarthy On

It does not use the Accelerate framework, but it looks like it has been speeded up using the CUDA stuff in 2.2

The relevant files in OpenCV2.2 ...

/modules/gpu/include/opencv2/gpu/gpu.hpp /modules/gpu/src/filtering.cpp

and

modules/imgproc/src/filter.cpp

for the non-gpu stuff

0
meduz On

If you use the MacPorts version, you can specify the options

$ port variants opencv
opencv has the variants:
   debug: Enable debug binaries
   python26: Add Python 2.6 bindings
     * conflicts with python27
   python27: Add Python 2.7 bindings
     * conflicts with python26
   tbb: Use Intel TBB
   universal: Build for multiple architectures

I have used

sudo port install py26-numpy
sudo port install opencv +python26 +tbb

with success. Concerning the Accelerate.framework specifically, this blog entry says "# Add Accelerate.framework which is used internally from OpenCV library.", but I have no clue as to know if it is the case here.