Book Image

iOS Application Development with OpenCV 3

By : Joseph Howse
4 (1)
Book Image

iOS Application Development with OpenCV 3

4 (1)
By: Joseph Howse

Overview of this book

iOS Application Development with OpenCV 3 enables you to turn your smartphone camera into an advanced tool for photography and computer vision. Using the highly optimized OpenCV library, you will process high-resolution images in real time. You will locate and classify objects, and create models of their geometry. As you develop photo and augmented reality apps, you will gain a general understanding of iOS frameworks and developer tools, plus a deeper understanding of the camera and image APIs. After completing the book's four projects, you will be a well-rounded iOS developer with valuable experience in OpenCV.
Table of Contents (13 chapters)
iOS Application Development with OpenCV 3
Credits
About the Author
Acknowledgments
About the Reviewer
www.PacktPub.com
Preface
Index

Defining and laying out the view controllers


ManyMasks divides its application logic between two view controllers. The first view controller enables the user to capture and preview real faces. The second enables the user to review, save, and share merged faces. A type of callback method called a segue enables the first view controller to instantiate the second and pass a merged face to it.

Capturing and previewing real faces

Import copies of the VideoCamera.h and VideoCamera.m files that we created in Chapter 2, Capturing, Storing, and Sharing Photos. These files contain our VideoCamera class, which extends OpenCV's CvVideoCamera to fix bugs and add new functionality.

Rename ViewController.h and ViewController.m to CaptureViewController.h and CaptureViewController.m. Edit CaptureViewController.h so that it declares a CaptureViewController class, as seen in the following code:

#import <UIKit/UIKit.h>

@interface CaptureViewController : UIViewController

@end

CaptureViewController will have...