You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+28-4Lines changed: 28 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,7 +58,7 @@ import Warhol
58
58
[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. To integrate Alamofire into your Xcode project using Carthage, specify it in your `Cartfile`:
59
59
60
60
```ogdl
61
-
github "toupper/Warhol" ~> 0.1.2
61
+
github "toupper/Warhol" ~> 0.2.0
62
62
```
63
63
64
64
### Swift Package Manager
@@ -69,7 +69,7 @@ Once you have your Swift package set up, adding Warhol as a dependency is as eas
@@ -96,7 +96,7 @@ You can also integrate Warhol into your project manually.
96
96
97
97
## Usage example
98
98
99
-
### With Camera
99
+
### From Camera, Draw on Top
100
100
101
101
Import Warhol in the file you are going to use it. Create an instance of ```CameraFaceDetectionViewController```, and asign the view where you are going to draw to the ```cameraFrontView``` property of the former. You can then present the view controller:
102
102
@@ -134,8 +134,32 @@ final class FaceView: UIView, CameraFrontView {
If you want to add images on top of each Face Features, you have to compose a ```FaceLayout``` object defining an ```ImageLayout``` object for each type of Face Landmark you want to draw. You can set the desired offset and Size Ratio for each feature. Once you have it, you should then pass it to the faceLayout property of the ```CameraFaceDetectionViewController```. Please notice that if you do that the ```cameraFrontView``` property gets overriden:
145
+
146
+
```
147
+
let cameraViewController = CameraFaceDetectionViewController()
Apart from that, you can implement the ```CameraFaceDetectionDelegate``` protocol to react to any change in the Face Dectection. This can be convenient for the case when you do not want to draw on top, but just get the face features (landmarks) coordinates. These are encapsulated in the given parameter ```FaceViewModel```.
138
-
### With Image
162
+
### From Image
139
163
140
164
In order to detect a face features and draw on top, we should pass the sdk the UIImageView depicting the face, and a closure where we draw on top of the image:
0 commit comments