File: README.md

package info (click to toggle)
opencv 4.10.0%2Bdfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 282,092 kB
  • sloc: cpp: 1,178,079; xml: 682,621; python: 49,092; lisp: 31,150; java: 25,469; ansic: 11,039; javascript: 6,085; sh: 1,214; cs: 601; perl: 494; objc: 210; makefile: 173
file content (33 lines) | stat: -rw-r--r-- 1,326 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Custom HAL samples
==================

Samples in this folder are intended to demonstrate functionality replacement mechanism in the OpenCV library.

The __c_hal__ is the example of pure C replacement library with all functions returning error. It can be used to verify error handling in the function switching code.

The __slow_hal__ contains naive C++ implementations of the element-wise logical array operations (and, or, xor, not) making them twice slower than the default.

Build custom HAL replacement library
------------------------------------

1. Create folder for build (for example `<home-dir>/my-hal-build`)
2. Go to the created folder and run cmake: `cmake <opencv-src>/samples/hal/slow_hal`
3. Run make

After build you will find static library in the build folder: `libslow_hal.a`

Build OpenCV with HAL replacement
---------------------------------

1. Create folder for build (for example `<home-dir>/my-opencv-build`)
2. Go to the created folder and run cmake:
    ```
    cmake \
        -DOpenCV_HAL_DIR="<home-dir>/my-hal-build/" \
        <opencv-src>
    ```
3. Run make (or `make opencv_perf_core` to build the demonstration test executable only)
4. After build you can run the tests and verify that some functions works slower:
    ```
    ./bin/opencv_perf_core --gtest_filter=*bitwise_and*
    ```