Ask Your Question

Revision history [back]

Help building dlib example using opencv to js (Emscripten)

Have been trying to convert dlibs facial landmarks code to js using emscripten. It fails in parts where it has been using OpenCV where it uses the native c++ libraries instead of Emscripten libcxx libraries. There's an issue on Emscripten I have issued and have got some help from them - https://github.com/kripken/emscripten/issues/5435. I had even tried building opencv from source using Emscripten option as defined in its CMakelists.txt.

Need to get some help about what could be the procedure I may go about to tackle this. Any help will be appreciated.

Help building opencv js (Emscripten) for dlib example using opencv to js (Emscripten)example

Have been trying to convert dlibs facial landmarks code to js using emscripten. It fails in parts where it has been using OpenCV where it uses the native c++ libraries instead of Emscripten libcxx libraries. There's an issue on Emscripten I have issued and have got some help from them - https://github.com/kripken/emscripten/issues/5435. I had even tried building opencv from source using Emscripten option as defined in its CMakelists.txt.

Need to get some help about what could be the procedure I may go about to tackle this. Any help will be appreciated.

Help building opencv js (Emscripten) for dlib example

Have been trying to convert dlibs facial landmarks code to js using emscripten. It fails in parts where it has been using OpenCV where it uses the native c++ libraries instead of Emscripten libcxx libraries. There's an issue on Emscripten I have issued and have got some help from them - https://github.com/kripken/emscripten/issues/5435. I had even tried building opencv from source using Emscripten option as defined in its CMakelists.txt.

Need to get some help about what could be the procedure I may go about to tackle this. Any help will be appreciated.

Update: Was able to build and install OpenCV from source for EMSCRIPTEN. Tried to compile the dlib code to js which resulted in an error like

/home/akshay/Downloads/emsdk-portable/emscripten/1.37.19/build.emscripten/DLIB.js:110
      throw ex;
      ^
Runtime error: The application has corrupted its heap memory area (address zero)!

While building the code it generated warnings like :

warning: emitted code will contain very large numbers of local variables, which is bad for performance (build to JS with -O2 or above to avoid this - make sure to do so both on source files, and during 'linking')
warning: unresolved symbol: _ZNK4dlib6base646decodeERNSt3__213basic_istreamIcNS1_11char_traitsIcEEEERNS1_13basic_ostreamIcS4_EE
warning: unresolved symbol: _ZNK4dlib11base_window9is_closedEv
warning: unresolved symbol: _ZNK4dlib13image_display22get_image_display_rectEv
warning: unresolved symbol: _ZN4dlib6base64C1Ev
warning: unresolved symbol: _ZN4dlib24entropy_decoder_kernel_210set_streamERNSt3__213basic_istreamIcNS1_11char_traitsIcEEEE
warning: unresolved symbol: _ZN4dlib17popup_menu_region7disableEv
warning: unresolved symbol: _ZN4dlib24entropy_decoder_kernel_26decodeEjj
warning: unresolved symbol: _ZN9_IplImageC1ERKN2cv3MatE
warning: unresolved symbol: _ZN2cv8fastFreeEPv
warning: unresolved symbol: _ZN4dlib12image_windowC1Ev
warning: unresolved symbol: _ZN4dlib21draw_sunken_rectangleERKNS_6canvasERKNS_9rectangleEh
warning: unresolved symbol: _ZN4dlib12image_window13clear_overlayEv
warning: unresolved symbol: _ZN4dlib24entropy_decoder_kernel_2D1Ev
warning: unresolved symbol: _ZN4dlib17scrollable_region19set_total_rect_sizeEmm
warning: unresolved symbol: _ZN2cv3Mat8copySizeERKS0_