/ncnn-webassembly-ocrlite

Deploy OcrLite in your web browser with ncnn and webassembly

Primary LanguageC++GNU General Public License v2.0GPL-2.0

ncnn-webassembly-ocrlite

Requirements

Build

  1. Install emscripten
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
./emsdk install 2.0.8
./emsdk activate 2.0.8
./emsdk_env.sh
  1. Download and extract ncnn & OpenCV
Directory Tree

├─assets
├─demo
├─include
├─ncnn-static
│  └─webassembly
│      ├─basic
│      ├─simd
│      ├─simd-threads
│      └─threads
├─opencv-static
│  └─webassembly
│      ├─bin
│      ├─include
│      ├─lib
│      └─share
└─src

and

Get missing opencv2/imgcodecs.hpp Link
Path: opencv-static/webassembly/include/opencv2

  1. Build
mkdir build
cd build
cmake -DCMAKE_TOOLCHAIN_FILE=/PATH_TO_EMSDK/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake -DCMAKE_BUILD_TYPE=Release -DOCR_STATIC=ON ..
make

Demo

demo/index.html

Demo

demo/arknights.html

Demo-ArkNights-HR

References