Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any information or sample or tutorial on how to use OpenCV HAL to accelerate my code?

Tags:

c++

opencv

I noted that OpenCV 3 RC1 has a library called HAL which is for accelerating core functionality of OpenCV.

Is there any way that I can use this library to accelerate my code?

Is there any document/tutorial/... on how to use this library?

I want a way to accelerate my code so it can be run fast on Intel and ARM processors.

like image 761
mans Avatar asked Sep 28 '22 02:09

mans


1 Answers

If I understand it well then HAL is just a convenient, IPP-like, low-level API to accelerate OpenCV for different platforms (by hiding low-level operations i.e. core, imgproc, … => HAL) and to enable hardware vendors to implement accelerated imaging and vision algorithms.

OpenCV already had some acceleration API (i.e. parallel framework or OpenCL) and HAL fits into this sequence as a new one, HAL has a primary focus on enabling mobile and embedded systems and can be used by high-level libraries or applications directly.

The function set can be found whithin the cv::hal namespace - take a look at the documentation of HAL module for the implemented functions.

Methinks you shouldn't care with these functions, because they are just the (low-level) internal part of the API; in OpenCV 3.0 they are also referenced in some functions, e.g. cv::magnitude() calls cv::hal::magnitude() within itself. That is if OpenCV was built with NEON support then you will implicitly benefit by HAL.

like image 82
Kornel Avatar answered Nov 02 '22 06:11

Kornel