Sample programs for OpenCV and Swift and iOS and macOS.
Those projects uses OpenCV version 4.2. However, OpenCV binary isn't include in those projects. You can get OpenCV binary by following steps.
A binary version is available as it is.
- Download
opencv-4.2.0-ios-framework.zipfrom https://github.com/opencv/opencv/releases/download/4.2.0/opencv-4.2.0-ios-framework.zip. - Unpack the file.
- Copy
opencv2.frameworkintoOpenCVSample_iOSdirectory.
No binary version, so you need to build a source version.
- Prepare CMake. (e.g.
brew install cmake) - Download
opencv-4.2.0.zipfrom 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.frameworkintoOpenCVSample_macOSdirectory.
- macOS 10.15.2
- iOS 13.3
- Xcode 11.3
- Swift 5
Please read this file.
