Extention using OpenCV


I’m very new to javascript and extension development, and I wanted to know if I was possible to use OpenCV in an extension? I’ve seen that opencv works in some capacity with javascript, so I thought that maybe it was possible. I haven’t been able to find anything about it though

Thank you :slight_smile:

1 Like

C and C++ libraries that are compiled to WebAssembly (AKA wasm) can be called from JavaScript. I see some results for searches of OpenCV wasm out on the web, but don’t know which ones would be good choices to consider.

If you include any compiled code in your extension, you also need to supply the source files, and this will increase the time for review. I’m not the best person to discuss that aspect.

1 Like

Alright thank you, I’ll be looking into it. Do you know if I could just use opencv.js (https://docs.opencv.org/4.1.1/d5/d10/tutorial_js_root.html)? I don’t mean to be spoonfed, but perhaps including the file (https://docs.opencv.org/4.1.1/opencv.js) and importing it could work?
I’m familiar with OpenCV on C++, but webdev stuff looks alien to me

Unfortunately, I don’t think either of us could say whether that will work in an extension without trying it.

1 Like

Fair enough, I’ll give it a shot. Thank you :slight_smile: