Project Compilation Guide
Project Compilation Guide
1. Python Installation
2. CMake Installation
3. Ninja Installation
Note: Replace .\emsdk with the path where you cloned the Emscripten SDK if different.
Steps:
cd C:\emsdk
.\emsdk activate latest
.\emsdk_env.ps1
cd C:\Projects\TheProjectDirectory\
● Note: The include and lib directories specified are the OpenCV include and
lib directories.
● The lib directory should contain the following files:
liblibjpeg-turbo.a
liblibopenjp2.a
liblibpng.a
libopencv_world.a
libzlib.a
4. Generated Files
Running the above command should generate the following JavaScript and WebAssembly
files:
demo.js
demo.wasm
5. Testing Locally
If you place the provided video_utils.js and index.html files in the same directory as
the generated files, you can test your code immediately by starting a local HTTP server.
python -m http.server
Web Deployment
To deploy your application on the web, ensure that the server correctly serves .wasm files
with the appropriate MIME type.
Note: If the .htaccess file does not exist, you need to create it on your server.