full example for building opencv libraries; upgrade box demo SDL version
This commit is contained in:
parent
ecce532abf
commit
f793073348
25
README.md
25
README.md
|
@ -317,6 +317,31 @@ To link to the WASM libraries, add the `*.a` files from the build directory to E
|
|||
|
||||
$(wildcard $(addprefix $(WASM_BUILD_DIR)/lib/,*.a)) $(wildcard $(addprefix $(WASM_BUILD_DIR)/3rdparty/lib/,*.a))
|
||||
|
||||
#### Full example
|
||||
|
||||
This builds both the local and WASM libraries by downloading OpenCV 4.7.0 and the contributed modules source packages. See [Gunkiss][] for an example of using these libraries in a project.
|
||||
|
||||
$ wget https://github.com/opencv/opencv/archive/4.7.0.zip
|
||||
$ unzip 4.7.0.zip
|
||||
$ tar -xf opencv_contrib-4.7.0.tar.gz
|
||||
$ mkdir opencv_contrib-4.7.0-subset
|
||||
$ cp -r opencv_contrib-4.7.0/modules/barcode/ opencv_contrib-4.7.0-subset/
|
||||
$ rm -rf ~/local/opencv/
|
||||
$ cd opencv-4.7.0/
|
||||
$ mkdir build_linux
|
||||
$ cd build_linux/
|
||||
$ cmake -D CMAKE_INSTALL_PREFIX=$HOME/local/opencv -D OPENCV_EXTRA_MODULES_PATH="../../opencv_contrib-4.7.0-subset/" ..
|
||||
...
|
||||
-- OpenCV modules:
|
||||
-- To be built: barcode calib3d core dnn features2d flann gapi highgui imgcodecs imgproc java ml objdetect
|
||||
photo python3 stitching ts video videoio
|
||||
...
|
||||
$ make -j3 && make install
|
||||
$ cd ..
|
||||
$ source ~/ext/software/emsdk/emsdk_env.sh
|
||||
$ python3 platforms/js/build_js.py --cmake_option="-DOPENCV_EXTRA_MODULES_PATH=../../opencv_contrib-4.7.0-subset/" \
|
||||
--emscripten_dir ~/ext/software/emsdk/upstream/emscripten build_wasm_contrib --build_wasm
|
||||
|
||||
### ZBar
|
||||
|
||||
#### Linux
|
||||
|
|
|
@ -120,7 +120,7 @@ box_demo.js: $(addprefix $(SDLGFX2_DIR),SDL2_rotozoom.o SDL2_gfxPrimitives.o) $(
|
|||
# <https://imagemagick.org/>. The project source files are assumed to be just `$(SRC_DIR)/*.cpp`. If that is not the case, the revise_skeleton.sh script
|
||||
# must be edited.
|
||||
|
||||
SDL_SRC := $(HOME)/ext/software/SDL2-2.24.0-android
|
||||
SDL_SRC := $(HOME)/ext/software/SDL2-2.26.3
|
||||
SDL_IMAGE_SRC := $(HOME)/ext/software/SDL2_image-2.6.2-android
|
||||
SDL_MIXER_SRC := $(HOME)/ext/software/SDL2_mixer-2.6.2-android
|
||||
SDL_TTF_SRC := $(HOME)/ext/software/SDL2_ttf-2.20.1-android
|
||||
|
|
Loading…
Reference in New Issue