As an iOS engineer, I remember reading that OpenCV is a few TIMES slower than alternatives like Core Image.

I wish OpenCV made use of the GPU and vector hardware on phones. Is there an alternative to OpenCV that does?

It does use gpu, you need to compile it with a flag.

Oh, which one? I was under the impression it uses only Nvidia GPUs (CUDA) on desktop.

There are a heap of CMake flags that turn on various features e.g. CUDA:

https://github.com/opencv/opencv/blob/4.0.0/CMakeLists.txt#L...

but also OpenCL:

https://github.com/opencv/opencv/blob/4.0.0/CMakeLists.txt#L...

and Vulkan (which was only merged around a month ago):

https://github.com/opencv/opencv/blob/4.0.0/CMakeLists.txt#L...

Perhaps that last one works on mobile, although I wouldn't get your hopes up.

I haven't really used OpenCV since 2.4.x, however assuming the same holds true, performance enhancements are on a feature by feature basis. Meaning that if you enable CUDA etc. then it's not going to work for everything. Not GPU, but a common compile time enhancement (at least it used to be) was to compile with Intel TBB (thread building blocks) as a lot of the APIs included optimisations.

Thanks, but iOS supports neither CUDA, OpenCL, Vulkan nor TBB. It's only Metal and higher-level frameworks like Core Image for GPU, and vImage for SIMD image manipulation.

You can use MoltenVK to run Vulkan via Metal (https://github.com/KhronosGroup/MoltenVK). Apparently performance is quite good for regular 3D rendering, compute support is officially listed, but I'm not at all sure what performance is like.