OpenCVSample
Sample programs for OpenCV and Swift and iOS and macOS.
OpenCV
Those projects uses OpenCV version 4.2. However, OpenCV binary isn't include in those projects. You can get OpenCV binary by following steps.
OpenCV for iOS
A binary version is available as it is.
- Download
opencv-4.2.0-ios-framework.zip
from https://github.com/opencv/opencv/releases/download/4.2.0/opencv-4.2.0-ios-framework.zip. - Unpack the file.
- Copy
opencv2.framework
intoOpenCVSample_iOS
directory.
OpenCV for macOS
No binary version, so you need to build a source version.
- Prepare CMake. (e.g.
brew install cmake
) - Download
opencv-4.2.0.zip
from https://github.com/opencv/opencv/archive/4.2.0.zip. - Prepare a working directory. (e.g.
mkdir ~/foo
) - Unpack the file into the working directory.
- Open terminal at the working directory. (e.g.
cd ~/foo
) - Run a build script by python 2.
python opencv-4.2.0/platforms/osx/build_framework.py osx
- Copy
osx/opencv2.framework
intoOpenCVSample_macOS
directory.
Requirements
- macOS 10.15.2
- iOS 13.3
- Xcode 11.3
- Swift 5
License
Please read this file.