![]()
iOS Application Development with OpenCV 3
Table of Contents
iOS Application Development with OpenCV 3
Credits
About the Author
Acknowledgments
About the Reviewer
www.PacktPub.com
eBooks, discount offers, and more
Why subscribe?
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
1. Setting Up Software and Hardware
Setting up Apple's developer tools
Setting up the OpenCV framework
Getting the prebuilt framework with standard modules
Building the framework from source with extra modules
Making the extra modules optional in our code
Developing a minimal application
Creating the project
Adding files to the project
Configuring the project
Laying out an interface
Writing the code
Connecting an interface element to the code
Building and running the application
Distributing to testers and customers
Finding documentation and support
Understanding the camera and setting up photographic accessories
Lights
Tripods and other stabilization
Lens attachments
Summary
2. Capturing, Storing, and Sharing Photos
Planning a photo sharing application
Configuring the project
Adding frameworks
Specifying the camera requirement
Defining and laying out the view controller
Controlling the camera
Subclassing CvVideoCamera
Using the CvVideoCamera subclass in the view controller
Working with various color formats
RGB, BGR, RGBA, and BGRA
YUV and grayscale
Starting and stopping the busy mode
Saving an image to the Photos library
Displaying an alert
Sharing an image via social media
Running the application
Summary
3. Blending Images
Thinking about hybrid images
Planning the blending controls
Expanding the view controller's interface
Expanding the view controller's implementation
Using the application for practical purposes
Seeing changes in a scene
Previewing a new object in a scene
Previewing a copy of a document or drawing
Summary
4. Detecting and Merging Faces of Mammals
Understanding detection with cascade classifiers
Haar-like features
Local binary pattern features
Understanding transformations
Planning a face merging application
Configuring the project
Defining faces and a face detector
Defining and laying out the view controllers
Capturing and previewing real faces
Reviewing, saving, and sharing hybrid faces
Seguing between the view controllers
Detecting a hierarchy of face elements
Aligning and blending face elements
Using the application and acting like a cat
Learning more about face analysis
Summary
5. Classifying Coins and Commodities
Understanding blob detection
Segmentation
Canny edge detection
Contour analysis
Understanding histogram analysis
Understanding keypoint matching
SURF and FLANN
ORB and brute-force Hamming-distance matching
Planning an object classification application
Configuring the project
Defining blobs and a blob detector
Defining blob descriptors and a blob classifier
Laying out the splash screen
Defining and laying out the view controllers
Capturing and previewing blobs
Reviewing, saving, and sharing classified blobs
Seguing between the view controllers
Detecting blobs against a plain background
Classifying blobs by color and keypoints
Using the application and testing the tough cases
An unevenly-lit background
Motion blur
Out of focus
Reflection
Overlapping blobs
Taking your study of OpenCV to the next level
Summary
Index
![]()
iOS Application Development with OpenCV 3
Copyright © 2016 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: June 2016
Production reference: 1230616
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78528-949-1
www.packtpub.com
![]()
Author
Joseph Howse
Reviewer
Mohit Athwani
Commissioning Editor
Sarah Crofton
Acquisition Editor
Rahul Nair
Content Development Editor
Samantha Gonsalves
Technical Editor
Vivek Arora
Copy Editor
Tasneem Fatehi
Project Coordinator
Sanchita Mandal
Proofreader
Safis Editing
Indexer
Mariammal Chettiyar
Graphics
Disha Haria
Production Coordinator
Arvindkumar Gupta
Cover Work
Arvindkumar Gupta
![]()
Joseph Howse lives in Canada. During the cold winters, he grows a beard and his four cats grow thick coats of fur. He combs the cats every day. Sometimes the cats pull his beard.
Joseph has been writing for Packt Publishing since 2012. His books include OpenCV for Secret Agents, OpenCV 3 Blueprints, Android Application Programming with OpenCV 3, iOS Application Development with OpenCV 3, Learning OpenCV 3 Computer Vision with Python, and Python Game Programming by Example.
When he is not writing books or grooming cats, Joseph provides consulting, training, and software development services through his company, Nummist Media (http://nummist.com/).
![]()
As always, Mom, Dad, and the cats have provided all kinds of support, including assistance with the photography in this book.
I am glad for this chance to recognize the iOS developers who trained me years ago. They include Alex Brodsky, Bill Wilson, Jesse Rusak, and Woody Lidstone.
During the writing of this book, I have benefitted from the opportunity to do other OpenCV projects with local colleagues such as Jeff Leadbetter, Matt Wright, Jad Tawil, and Kevin J. Gallant. I am proud that we are part of a growing computer vision community in Atlantic Canada.
Once again, the team at Packt Publishing has supported me with tremendous energy, skill, and loyalty. Thank you! Harsha Bharwani persuaded me to write another OpenCV book. After all, the set was incomplete without iOS. Samantha Gonsalves guided the project to completion, and she never let any complication discourage her or me. All the editors and the technical reviewer have added their marks of quality to the book, and...