Skip to content

Wasm perf tests RuntimeError: abort(TypeError: cv.Size is not a constructor). #19754

@jlb6740

Description

@jlb6740

I am attempting to run perf tests using node. I think I built with:

emcmake python3 platforms/js/build_js.py build_wasm --build_wasm --simd --build_wasm_intrin_test --build_perf

using emscripten 2.0.15.

Everything builds fine, with the perf tests located here:

opencv/build_wasm/bin/perf

In fact from here I can launch a server and use a chrome (after enabling flags for "experimental-webassembly-features", "webassembly-simd", and "webassembly-threads") and run a test such as perf_threshold.js

However when I go into the same folder and try to run with node ... first doing "npm install" and then running from that directory with:

node --experimental-w asi-unstable-preview1 --experimental-wasm-simd --experimental-wasm-threads --experimental-wasm-type-reflection --experimental-wasm-mv perf_imgproc/perf_threshold.js

I have two issues/questions. (1) One there is a lot of text printed which clogs and takes a long time to scroll .. I assume it is printing out ascii values for some file being processed but I am only guessing. I assume it is not expected behavior because of the user experience but I am hoping for confirmation. (2) The second thing is that there is the same runtime error reported no matter the test RuntimeError: abort(TypeError: cv.Size is not a constructor). I thought my version of node (the very latest release) was using too old a V8 since it was older than Chromes, but even after downloading head the error remains. I assume I am just running wrong, but I followed instructions here: https://docs.opencv.org/master/d4/da1/tutorial_js_setup.html.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions