Converting a cpp file with opencv modules to wasm

Could someone please help me with converting a cpp file that includes opencv modules to wasm? what are the steps I need to achieve the same? I tried the documentation Building Projects — Emscripten 2.0.16 documentation . But I have encountered several errors when I ran the emcmake cmake command on the opencv source. Could someone point me in the right direction?
please check this link for details regarding my issue here https://groups.google.com/g/emscripten-discuss/c/Giy-5WOp9Fg/m/ma3aS1_XAQAJ
I’m actually not sure if these are even the right steps to take in order to compile my application to wasm.

Basically I want to run my simple cpp application that prints a matrix and uses opencv module in the browser using wasm through emscripten.

Please help.
Thanks.

There seems to be a problem with ittnotify. It should be possible to leave it off an OpenCV build by turning Cmake flags BUILD_ITT and WITH_ITT off. If I understand right, it is optional and for just profiling purposes.

yes! you are correct. Thank you.

now I get this error…

Users/atul109/MyDocuments/work/new/emscripten_playground/opencv-3.4.14/modules/core/include/opencv2/core/hal/intrin_wasm.hpp:1566:1: error: always_inline function ‘wasm_v128_load’ requires target feature ‘simd128’, but would be inlined into function ‘v_load’ that is compiled without support for 'simd128’

OPENCV_HAL_IMPL_WASM_LOADSTORE_INT_OP(v_uint8x16, uchar)

Please help.