c2096771cb
[GSoC 2019] Improve the performance of JavaScript version of OpenCV (OpenCV.js) * [GSoC 2019] Improve the performance of JavaScript version of OpenCV (OpenCV.js): 1. Create the base of OpenCV.js performance test: This perf test is based on benchmark.js(https://benchmarkjs.com). And first add `cvtColor`, `Resize`, `Threshold` into it. 2. Optimize the OpenCV.js performance by WASM threads: This optimization is based on Web Worker API and SharedArrayBuffer, so it can be only used in browser. 3. Optimize the OpenCV.js performance by WASM SIMD: Add WASM SIMD backend for OpenCV Universal Intrinsics. It's experimental as WASM SIMD is still in development. * [GSoC2019] 1. use short license header 2. fix documentation node issue 3. remove the unused `hasSIMD128()` api * [GSoC2019] 1. fix emscripten define 2. use fallback function for f16 * [GSoC2019] Fix rebase issue |
||
---|---|---|
.. | ||
perf_imgproc | ||
base.js | ||
package.json | ||
perf_helpfunc.js | ||
README.md |
OpenCV.js Performance Test
Node.js Version
Prerequisites
-
node.js, npm: Make sure you have installed these beforehand with the system package manager.
-
Benchmark.js: Make sure you have installed Benchmark.js by npm before use. Please run
npm install
in the directory<build_dir>/bin/perf
.
How to Use
For example, if you want to test the performance of cvtColor, please run perf_cvtcolor.js
by node in terminal:
node perf_cvtcolor.js
All tests of cvtColor will be run by above command.
If you just want to run one specific case, please use --test_param_filter="()"
flag, like:
node perf_cvtcolor.js --test_param_filter="(1920x1080, COLOR_BGR2GRAY)"
Browser Version
How to Use
To run performance tests, please launch a local web server in <build_dir>/bin folder. For example, node http-server which serves on localhost:8080.
Navigate the web browser to the kernel page you want to test, like http://localhost:8080/perf/imgproc/cvtcolor.html.
You can input the paramater, and then click the Run
button to run the specific case, or it will run all the cases.