git clone https://github.com/opencv/opencv.git
emcmake python ./opencv/platforms/js/build_js.py build_wasm --build_wasm
cd ./build_wasm/bin/ && open .
接著打開loader.js會如下:
git clone https://github.com/opencv/opencv.git
emcmake python ./opencv/platforms/js/build_js.py build_wasm --build_wasm
cd ./build_wasm/bin/ && open .
wget https://download.lfd.uci.edu/pythonlibs/c3ylw7lc/opencv_python-3.4.1+contrib-cp36-cp36m-win_amd64.whl
pip install opencv_python-3.4.1+contrib-cp36-cp36m-win_amd64.whl
import cv2
print(cv2.__version__)
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install -y build-essential cmake pkg-config
sudo apt-get -y install libjpeg-dev libtiff5-dev libjasper-dev libpng12-dev libavcodec-dev libavformat-dev libswscale-dev libv4l-dev libxvidcore-dev libx264-dev libatlas-base-dev gfortran python3.5-dev
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingBottom="@dimen/activity_vertical_margin" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" tools:context="com.example.test.MainActivity" > <ImageView android:id="@+id/imageView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_alignParentLeft="true" android:layout_alignParentRight="true" android:layout_alignParentTop="true" /> </RelativeLayout>
core: The Core Functionality imgproc: Image Processing highgui: High-level GUI and Media I/O video: Video Analysis calib3d: Camera Calibration and 3D Reconstruction features2d: 2D Features Framework objdetect: Object Detection ml: Machine Learning flann: Clustering and Search in Multi-Dimensional Spaces gpu: GPU-accelerated Computer Vision photo: Computational Photography stitching: Images stitching nonfree: Non-free functionality contrib: Contributed/Experimental Stuff legacy: Deprecated stuff ocl: OpenCL-accelerated Computer Vision superres: Super Resolution