IRCameraSticker — a powerful face sticker and camera sticker for iOS
Screenshots
Features
- Support face sticker.
- Support GPUImage.
Future
- Support more customized settings.
Install
Git
- Git clone this project.
- Copy this project into your own project.
- Add the .xcodeproj into you project and link it as embed framework.
- Options: You can remove the “demo” and “ScreenShots” folder.
Cocoa-pods
Add "pod IRCameraSticker" in the Podfile
pod install
How does it work?
Using VNDetectFaceLandmarksRequestRevision3
Starting with iOS 13, you will get a different set of points (VNDetectFaceLandmarksRequestRevision3)
Get size of camera layer.
There are two methods to convert.
- Method one
2. Method two
Eyes
There are two methods to draw.
1. Method one
2. Method two
All points
Usage
Basic
- Setup Camera
- Setup `IRCameraStickerFilter` and `GPUImageView`
- Start Camera
[self.videoCamera startCameraCapture];
- LoadSticker
[IRCameraStickersManager loadStickersWithCompletion:^(NSArray<IRCameraSticker *> *stickers) {self.stickers = stickers;self.stickerFilter.sticker = [stickers firstObject];}];
- Set callbacks and detect face then detail with it.
Advanced settings
- Draw Face’s bound.
- Draw Eyes’ bounds.
Thanks list
- This project is inspired from FaceTracker.
- This project is inspired from CameraStickerDemo.