Ask Your Question

Revision history [back]

Decreasing size of opencv.js

Hello there.

I'm trying to use Vue.js and webpack with opencv. I followed the tutorial in the docs to compile to js from sources. However, when I try to integrate the resulting js file, I'm getting a "javascript heap out of memory" error. The file works when used in a very simple server environment though. I tried increasing the heap, but the build won't ever finish. I have no idea how to resolve this issue, but to maybe decrease the size of the file. is there a way to pick which classes to compile into the js file? for example, I personally only need the image preprocessing stack. Besides that: Do i have to compile opencv to js or is there another source for a js implementation?

Any help would be greatly appreciated. Thx.