UrielCh / opencv4nodejs

ESM Nodejs bindings to OpenCV 3/4
MIT License
254 stars 51 forks source link

Migrate to single opencv-wasm #145

Closed studentutu closed 4 months ago

studentutu commented 5 months ago

Good evening, I've tried many different ways to use open-cv with electron and other frameworks - and every time, opencv4node just breaks all of the sudden.

I've come to conclusion - it is better to use a pre-compiled wasm version, which is already done in a package - https://www.npmjs.com/package/opencv-web (it just needs to fix it's types)

Could you migrate the big api change done in this framework into a new opencvwasm4nodejs?

It will not have any issues with usage/installs that we currently have, and it will give you the satisfaction of finally making openCv whole again.

studentutu commented 4 months ago

There are even docker files for opencv wasm build, the only thing missing are type support. Used https://github.com/CezaryDanielNowak/fast-opencv-wasm to build latest opencv 4.10 and it did a great work building it even on windows ( needed to change path for the docker run, but otherwise completly seemless build expirience)

Sadly - provided auto-generated types ( custom script which basicly dumps keys and adds comments on top) does not yield any good types.

@UrielCh Can you help with auto-generating types based on the sources, js and wasm file?

UrielCh commented 4 months ago

Hi,

I do not use the WASM version of OpenCV because it lacks many features, is slower, and does not support CUDA.

Currently, I am not using OpenCV for any active projects, as I need to find a real job before investing more time in open-source projects.

I'm currently working on some data conversion tools, LLM, and voice cloning API, so no computer vision right now.