2.9 KiB
Blurit
Blurit is an SDK to anonymize picture and videos containing faces and car plates.
For more information about Blurit you can visit our website.
Installation
CocoaPods
CocoaPods is the recommended way to add Blurit to your project.
- Add a pod entry for Blurit to your Podfile :
pod 'Blurit_SDK'
-
Install the pod(s) by running
pod install
. -
Include Blurit wherever you need it with
#import <Blurit/Blurit.h>
from Objective-C orimport Blurit
from Swift.
Swift Package Manager
dependencies: [
.package(url: "https://github.com/wassafr/Blurit-ios.git", from: "1.0.0")
]
Manual installation
-
Download the latest code version or add the repository as a git submodule to your git-tracked project.
-
Include Blurit wherever you need it with
#import <Blurit_SDK/Blurit_SDK.h>
from Objective-C orimport Blurit_SDK
from Swift.
Usage
To run the example project just open it and run. The framework is already included. Make sure you also see Blurit documentation. Attention : To use the SDK, you need a License Key you can get on the Blurit website
The sample code is commented and show usage examples of the SDK.
###Basics
- Add the following import to the top of the file :
import Blurit
- Instantiate a Blurit object
`` bluritInstance = Blurit(licenceKey: "your license key", completion: nil)
3. Load the detection models in the Blurit instance
bluritInstance?.loadModels(completion: { (error) in if let error = error { print("❌ Cannot initialize Blurit (error.localizedDescription)") } else {
} })
4. Make prediction from picture
BluritService.shared.bluritInstance?.detectObjectsAsync(sourceImage: image, completion: { firstCompletionResult in
/// Handle detected objects
})
5. You can now use predictions to apply the blur
BluritService.shared.bluritInstance?.anonymizeAsync(sourceImage: image, predictionResult: predictionResult, completion: { secondCompletionResult in
/// Handle blurred picture
})
Requirements
- Xcode 13
- iOS 13
License
Blurit is available under a commercial license. See the LICENSE file for more info.
Author
Wassa, contact@wassa.fr