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

Chapter 1. Setting Up Software and Hardware

Every year since 2007, the iPhone has spawned a new generation of hardware, and eager buyers have queued up outside their local Apple Store to get it. The iPhone and iPad have become centerpieces of consumer culture, promising instant gratification, timely information, and easy achievements. Apps are designed for retirees, working people, job hunters, vacationers, students, gamers, hospital patients, babies, and cats. Like a Swiss Army knife, an iPhone is a premium product that supposedly prepares the user for all kinds of contingencies. Moreover, the iPhone is a fashion item and sometimes inspires idiosyncratic behavior. For example, it enables the user to share large numbers of selfies and pictures of lunch.

As software developers and scholars of computer vision, we need to think a bit harder about the iPhone, the iPad, and their cameras. We need to make preparations before we can properly use these versatile tools in our work. We also need to demystify Apple's proprietary systems and appreciate the role of open source, cross-platform libraries such as OpenCV. Apple provides a fine mobile platform in iOS, but computer vision is not a fundamental part of this platform. OpenCV uses this platform efficiently but adds a layer of abstraction, providing high-level functionality for computer vision.

This chapter is the primer for the rest of the book. We assume that you already have a computer running Mac OS 10.10 (or a later version) as well as an iPhone, iPad, or iPod Touch running iOS 9 (or a later version). We will take the following steps to prepare a workspace and learn good habits for our future projects:

  1. Set up Apple's standard tools for iOS developers, which include Xcode, iOS SDK, and Xcode Command Line Tools.

  2. Set up OpenCV 3.1 (or a later version) for iOS. We have the option to use a standard, prebuilt version or a custom-built version with extra functionality.

  3. Develop a minimal application that uses the iOS SDK and OpenCV to display an image with a special effect.

  4. Join Apple's iOS Developer Program and obtaining permission to distribute an application to other users to test.

  5. Find documentation and support for the iOS SDK and OpenCV.

  6. Learn about the kinds of lights, tripods, and lens attachments that may enable us to capture specialized images with an iPhone or iPad.

By the end of this chapter, you will possess the necessary software and skills to build a basic OpenCV project for iOS. You will also have a new appreciation of your iPhone or iPad's camera as a tool for scientific photography and computer vision.