You are previewing iOS Application Development with OpenCV 3.
O'Reilly logo
iOS Application Development with OpenCV 3

Book Description

Create four mobile apps and explore the world through photography and computer vision

About This Book

  • Efficiently harness iOS and OpenCV to capture and process high-quality images at high speed

  • Develop photographic apps and augmented reality apps quickly and easily

  • Detect, recognize, and morph faces and objects

  • Who This Book Is For

    If you want to do computational photography and computer vision on Appleā€™s mobile devices, then this book is for you. No previous experience with app development or OpenCV is required. However, basic knowledge of C++ or Objective-C is recommended.

    What You Will Learn

  • Use Xcode and Interface Builder to develop iOS apps

  • Obtain OpenCV's standard modules and build extra modules from source

  • Control all the parameters of the iOS device's camera

  • Capture, save, and share photos and videos

  • Analyze colors, shapes, and textures in ordinary and specialized photographs

  • Blend and compare images to create special photographic effects and augmented reality tools

  • Detect faces and morph facial features

  • Classify coins and other objects

  • In Detail

    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.

    Style and approach

    The book is practical, creative, and precise. It shows you the steps to create and customize five projects that solve important problems for beginners in mobile app development and computer vision. Complete source code and numerous visual aids are included in each chapter. Experimentation is an important part of the book. You will use computer vision to explore the real world, and then you will refine the projects based on your findings.

    Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the code file.

    Table of Contents

    1. iOS Application Development with OpenCV 3
      1. Table of Contents
      2. iOS Application Development with OpenCV 3
      3. Credits
      4. About the Author
      5. Acknowledgments
      6. About the Reviewer
      7. www.PacktPub.com
        1. eBooks, discount offers, and more
          1. Why subscribe?
      8. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Conventions
        5. Reader feedback
        6. Customer support
          1. Downloading the example code
          2. Downloading the color images of this book
          3. Errata
          4. Piracy
          5. Questions
      9. 1. Setting Up Software and Hardware
        1. Setting up Apple's developer tools
        2. Setting up the OpenCV framework
          1. Getting the prebuilt framework with standard modules
          2. Building the framework from source with extra modules
          3. Making the extra modules optional in our code
        3. Developing a minimal application
          1. Creating the project
          2. Adding files to the project
          3. Configuring the project
          4. Laying out an interface
          5. Writing the code
          6. Connecting an interface element to the code
          7. Building and running the application
        4. Distributing to testers and customers
        5. Finding documentation and support
        6. Understanding the camera and setting up photographic accessories
          1. Lights
          2. Tripods and other stabilization
          3. Lens attachments
        7. Summary
      10. 2. Capturing, Storing, and Sharing Photos
        1. Planning a photo sharing application
        2. Configuring the project
          1. Adding frameworks
          2. Specifying the camera requirement
        3. Defining and laying out the view controller
        4. Controlling the camera
          1. Subclassing CvVideoCamera
          2. Using the CvVideoCamera subclass in the view controller
        5. Working with various color formats
          1. RGB, BGR, RGBA, and BGRA
          2. YUV and grayscale
        6. Starting and stopping the busy mode
        7. Saving an image to the Photos library
        8. Displaying an alert
        9. Sharing an image via social media
        10. Running the application
        11. Summary
      11. 3. Blending Images
        1. Thinking about hybrid images
        2. Planning the blending controls
        3. Expanding the view controller's interface
        4. Expanding the view controller's implementation
        5. Using the application for practical purposes
          1. Seeing changes in a scene
          2. Previewing a new object in a scene
          3. Previewing a copy of a document or drawing
        6. Summary
      12. 4. Detecting and Merging Faces of Mammals
        1. Understanding detection with cascade classifiers
          1. Haar-like features
          2. Local binary pattern features
        2. Understanding transformations
        3. Planning a face merging application
        4. Configuring the project
        5. Defining faces and a face detector
        6. Defining and laying out the view controllers
          1. Capturing and previewing real faces
          2. Reviewing, saving, and sharing hybrid faces
          3. Seguing between the view controllers
        7. Detecting a hierarchy of face elements
        8. Aligning and blending face elements
        9. Using the application and acting like a cat
        10. Learning more about face analysis
        11. Summary
      13. 5. Classifying Coins and Commodities
        1. Understanding blob detection
          1. Segmentation
          2. Canny edge detection
          3. Contour analysis
        2. Understanding histogram analysis
        3. Understanding keypoint matching
          1. SURF and FLANN
          2. ORB and brute-force Hamming-distance matching
        4. Planning an object classification application
        5. Configuring the project
        6. Defining blobs and a blob detector
        7. Defining blob descriptors and a blob classifier
        8. Laying out the splash screen
        9. Defining and laying out the view controllers
          1. Capturing and previewing blobs
          2. Reviewing, saving, and sharing classified blobs
          3. Seguing between the view controllers
        10. Detecting blobs against a plain background
        11. Classifying blobs by color and keypoints
        12. Using the application and testing the tough cases
          1. An unevenly-lit background
          2. Motion blur
          3. Out of focus
          4. Reflection
          5. Overlapping blobs
        13. Taking your study of OpenCV to the next level
        14. Summary
      14. Index