Created
March 4, 2018 15:54
-
-
Save SubhiH/50d6edea4a8dcde44e18b12f3a5a8b5c to your computer and use it in GitHub Desktop.
Face detection
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import UIKit | |
| class ViewController: UIViewController, FrameExtractorDelegate { | |
| @IBOutlet var imageview: UIImageView! | |
| var frameExtractor: FrameExtractor! | |
| func captured(image: UIImage) { | |
| imageview.image = OpencvWrapper.detect(image); | |
| } | |
| override func viewDidLoad() { | |
| super.viewDidLoad() | |
| frameExtractor = FrameExtractor() | |
| frameExtractor.delegate = self | |
| } | |
| override func didReceiveMemoryWarning() { | |
| super.didReceiveMemoryWarning() | |
| // Dispose of any resources that can be recreated. | |
| } | |
| @IBAction func flip_camera(_ sender: UIButton) { | |
| frameExtractor.flipCamera() | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment