This is a swift package that exposes opencv2.xcframework built from the official OpenCV github repository. This simplifies the process of importing the prebuilt opencv2.xcframework into your project, eliminating the need for manual building.
To use OpenCV
in your own project, you can use:
// swift-tools-version:5.6
import PackageDescription
let package = Package(
name: "MyPackage",
dependencies: [
.package(
url: "https://github.com/abaltatech/opencv-ios.git",
.upToNextMajor(from: "4.7.0") // or `.upToNextMinor
)
],
targets: [
.target(
name: "MyTarget",
dependencies: [
.product(name: "OpenCV", package: "opencv-ios")
]
)
]
)
Add https://github.com/abaltatech/opencv-ios.git to your package dependencies
You can view the api reference docs at https://docs.opencv.org/4.x/
For more information you can visit the official OpenCV repository
This package uses the same license as the official OpenCV library. The license can be found in the LICENSE.md
file.
Include the c++ headers
#include <opencv2/opencv.hpp>