You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for sharing your example!
I'm struggling already quite some time getting wasm up and running in Node (to run OpenCv.js). Have tried all kind of stuff, but can't get it done. So hopefully you can give me some tips ...
OpenCv is a large C++ program for image processing. Recently they have ported it to Javascript (called OpenCv.js), to make it available for web applications. But I would like to run it in node:
var cv = require('opencv.js');
var matrix = new cv.Mat();
...
The above code uses the non-wasm (i.e. normal javascript) opencv.js file. That works fine in node, but it is VERY slow: takes 15 seconds to do some image processing on a single image. Since they have also build a WASM version of that opencv.js file, I tried to use that one (without success...).
I have installed wabt like in your repo, but some issues:
Can use "--expose-wasm" but not "--experimental-modules". Is there perhaps a minimal Node version required for (decent) Webassembly support?
When skipping the "--experimental-modules", the following error occurs:
Thanks in advance for your help!
Kind regards,
Bart Butenaers
The text was updated successfully, but these errors were encountered:
I don't quite understand yet if I need to load in node the .wasm file (like you do) or the opencv.js file that they generated during their wasm build. Do you have any idea about that?
I think you have pointed me in the correct direction (with this repo), but their .wasm file is not usable to be loaded in node. Saw this in my startup log:
Seems the original C++ contains __file__ and __dirname__ statements, which is not known by node. And this is only recently fixed in emscripten which is used by the opencv.js project...
So not that easy to run large (converted) wasm projects in node ;-(
Hi @kizerkizer,
Thanks for sharing your example!
I'm struggling already quite some time getting wasm up and running in Node (to run OpenCv.js). Have tried all kind of stuff, but can't get it done. So hopefully you can give me some tips ...
OpenCv is a large C++ program for image processing. Recently they have ported it to Javascript (called OpenCv.js), to make it available for web applications. But I would like to run it in node:
The above code uses the non-wasm (i.e. normal javascript) opencv.js file. That works fine in node, but it is VERY slow: takes 15 seconds to do some image processing on a single image. Since they have also build a WASM version of that opencv.js file, I tried to use that one (without success...).
I have installed wabt like in your repo, but some issues:
Thanks in advance for your help!
Kind regards,
Bart Butenaers
The text was updated successfully, but these errors were encountered: