Feghal/ImageDetect
关于
✂️ Detect and crop faces, barcodes and texts in image with iOS 11 Vision api.
设计与媒体实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文ImageDetect
ImageDetect is a library developed on Swift. With ImageDetect you can easily detect and crop faces, texts or barcodes in your image with iOS 11 Vision api. It will automatically create new images containing each object found within a given image.
Example
To run the example project, clone the repo, and run pod install from the Example directory first.
Requirements
- Xcode 9.0 (beta) or higher.
- iOS 11.0 (beta) or higher.
Installation
CocoaPods
ImageDetect is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'ImageDetect'
Then, run the following command:
pod install
Manually
Drag and Drop it into your project
Import
ImageDetectYou are ready to go!
Usage
Crop your (UIImage or CGImage)
// `type` in this method can be face, barcode or text
image.detector.crop(type: .face) { [weak self] result in
switch result {
case .success(let croppedImages):
// When the `Vision` successfully find type of object you set and successfuly crops it.
print("Found")
case .notFound:
// When the image doesn't contain any type of object you did set, `result` will be `.notFound`.
print("Not Found")
case .failure(let error):
// When the any error occured, `result` will be `failure`.
print(error.localizedDescription)
}
}
Author
Arthur Sahakyan, [email protected]
License
ImageDetect is available under the MIT license. See the LICENSE file for more info.
探索相关项目
加载中…