![]() Update intrin_wasm.hpp #25909 See https://github.com/microsoft/vcpkg/issues/33443 for some build context when using ```vcpkg install opencv4:wasm32-emscripten``` `__EMSCRIPTEN_major__`, `__EMSCRIPTEN_minor__` and `__EMSCRIPTEN_tiny__` in `emsdk` >= 3.1.4 are in a header, as opposed to command line. We could potentially be more aggressive with how I'm checking this property; let me know if I should make the change. It should also be suggested that `-msimd128` is auto-included in the associated portfile for opencv, but that's a separate issue. Someone let me know if I should also make that change as well. Special thanks to https://github.com/youar for supporting this work; please inform if applying a copyright-header is appropriate attribution. ### Pull Request Readiness Checklist See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request - [x] I agree to contribute to the project under Apache 2 License. - [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV - [x] The PR is proposed to the proper branch - [x] There is a reference to the original bug report and related work - [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable Patch to opencv_extra has the same branch name. - [x] The feature is well documented and sample code can be built with the project CMake |
||
---|---|---|
.. | ||
perf_imgproc | ||
base.js | ||
package.json | ||
perf_64bits.html | ||
perf_64bits.js | ||
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 parameter, and then click the Run
button to run the specific case, or it will run all the cases.