You are previewing OpenCV 2 Computer Vision Application Programming Cookbook.
O'Reilly logo
OpenCV 2 Computer Vision Application Programming Cookbook

Book Description

If you have at least some basic knowledge of C++, this book will teach you how to write computer vision applications for the modern world. The recipe-based approach comes with explanations and screenshots for easy learning.

  • Teaches you how to program computer vision applications in C++ using the different features of the OpenCV library

  • Demonstrates the important structures and functions of OpenCV in detail with complete working examples

  • Describes fundamental concepts in computer vision and image processing

  • Gives you advice and tips to create more effective object-oriented computer vision programs

  • Contains examples with source code and shows results obtained on real images with detailed explanations and the required screenshots

  • In Detail

    In today's digital world, images are everywhere, and with the advent of powerful and affordable computing devices, it has become possible to create sophisticated applications manipulating images and videos. Adding special effects, enhancing image features, performing object recognition, and reconstructing 3D information are tasks that can be programmed easily with the OpenCV library, which is a widely used open source library that offers a rich set of advanced computer vision algorithms.

    OpenCV 2 Computer Vision Application Programming Cookbook will introduce you to numerous computer vision algorithms included in the OpenCV library. You will learn how to read, write, create and manipulate images. You will explore different techniques commonly used in image analysis and how they can be effectively implemented in C++. The book provides a complete introduction to the OpenCV library and explains how to build your first computer vision program. You will be presented with a variety of computer vision algorithms and be exposed to important concepts in image analysis that will enable you to build your own computer vision applications.

    The book helps you to get started with the library, showing you how to install and deploy the OpenCV library to write effective computer vision applications following good programming practices. The techniques to process an image and its pixels using the data structures offered by the library are explained in detail. You will learn how to build and manipulate an image histogram; how to detect lines and contours. You will be introduced to the concept of mathematical morphology and image filtering. The detection and use of interest points in computer vision is presented with applications for image matching and object recognition. Techniques to achieve camera calibration and 3D reconstruction are presented.

    OpenCV 2 Computer Vision Application Programming Cookbook is your guide to the development of computer vision applications. It is a comprehensive reference that exposes you to computer vision concepts illustrated with extensive examples.

    A step-by-step guide to computer vision programming using the C++ Interface of the OpenCV 2 library including advanced concepts

    Table of Contents

    1. OpenCV 2 Computer Vision Application Programming Cookbook
      1. Copyright
      2. Credits
      3. About the Author
      4. About the Reviewers
      5. www.PacktPub.com
        1. Support files, eBooks, discount offers and more
          1. Why Subscribe?
          2. Free Access for Packt account holders
      6. Preface
        1. What this book covers
        2. Who this book is for
        3. Conventions
        4. Reader feedback
        5. Customer support
          1. Downloading the example code
          2. Errata
          3. Piracy
          4. Questions
      7. 1. Playing with Images
        1. Introduction
        2. Installing the OpenCV library
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        3. Creating an OpenCV project with MS Visual C++
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        4. Creating an OpenCV project with Qt
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        5. Loading, displaying, and saving images
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        6. Creating a GUI application using Qt
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
      8. 2. Manipulating the Pixels
        1. Introduction
        2. Accessing pixel values
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        3. Scanning an image with pointers
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
            1. Other color reduction formulas
            2. Having input and output arguments
            3. Efficient scanning of continuous images
            4. Low-level pointer arithmetics
          5. See also
        4. Scanning an image with iterators
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        5. Writing efficient image scanning loops
          1. How to do it...
          2. How it works...
          3. There's more…
          4. See also
        6. Scanning an image with neighbor access
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        7. Performing simple image arithmetic
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
            1. Overloaded image operators
            2. Splitting the image channels
        8. Defining regions of interest
          1. Getting ready
          2. How to do it...
          3. How it works...
      9. 3. Processing Images with Classes
        1. Introduction
        2. Using the Strategy pattern in algorithm design
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        3. Using a Controller to communicate with processing modules
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        4. Using the Singleton design pattern
          1. Getting ready
          2. How to do it...
          3. How it works...
        5. Using the Model-View-Controller architecture to design an application
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        6. Converting color spaces
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
      10. 4. Counting the Pixels with Histograms
        1. Introduction
        2. Computing the image histogram
          1. Getting started
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        3. Applying look-up tables to modify image appearance
          1. How to do it...
          2. How it works...
          3. There's more...
          4. See also
        4. Equalizing the image histogram
          1. How to do it...
          2. How it works...
        5. Backprojecting a histogram to detect specific image content
          1. How to do it...
          2. How it works...
          3. There's more...
          4. See also
        6. Using the mean shift algorithm to find an object
          1. How to do it...
          2. How it works...
          3. See also
        7. Retrieving similar images using histogram comparison
          1. How to do it...
          2. How it works...
          3. See also
      11. 5. Transforming Images with Morphological Operations
        1. Introduction
        2. Eroding and dilating images using morphological filters
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        3. Opening and closing images using morphological filters
          1. How to do it...
          2. How it works...
        4. Detecting edges and corners using morphological filters
          1. Getting started
          2. How to do it...
          3. How it works...
          4. See also
        5. Segmenting images using watersheds
          1. How to do it...
          2. How it works...
          3. See also
        6. Extracting foreground objects with the GrabCut algorithm
          1. How to do it...
          2. How it works...
          3. See also
      12. 6. Filtering the Images
        1. Introduction
        2. Filtering images using low-pass filters
          1. How to do it...
          2. How it works...
          3. There's more...
          4. See also
        3. Filtering images using a median filter
          1. How to do it...
          2. How it works...
        4. Applying directional filters to detect edges
          1. How to do it...
          2. How it works...
          3. There's more...
          4. See also
        5. Computing the Laplacian of an image
          1. How to do it...
          2. How it works...
          3. There's more...
          4. See also
      13. 7. Extracting Lines, Contours, and Components
        1. Introduction
        2. Detecting image contours with the Canny operator
          1. How to do it...
          2. How it works...
          3. See also
        3. Detecting lines in images with the Hough transform
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
            1. Detecting circles
            2. Generalized Hough transform
          5. See also
        4. Fitting a line to a set of points
          1. How to do it...
          2. How it works...
          3. There's more...
        5. Extracting the components' contours
          1. How to do it...
          2. How it works...
          3. There's more...
        6. Computing components' shape descriptors
          1. How to do it...
          2. How it works...
          3. There's more...
      14. 8. Detecting and Matching Interest Points
        1. Introduction
        2. Detecting Harris corners
          1. How to do it...
          2. How it works...
          3. There's more...
            1. Good features to track
            2. Feature detector common interface
          4. See also
        3. Detecting FAST features
          1. How to do it...
          2. How it works...
          3. See also
        4. Detecting the scale-invariant SURF features
          1. How to do it...
          2. How it works...
          3. There's more...
          4. See also
        5. Describing SURF features
          1. How to do it...
          2. How it works...
          3. There's more...
          4. See also
      15. 9. Estimating Projective Relations in Images
        1. Introduction
          1. Image formation
        2. Calibrating a camera
          1. How to do it...
          2. How it works...
          3. There's more...
        3. Computing the fundamental matrix of an image pair
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        4. Matching images using random sample consensus
          1. How to do it...
          2. How it works...
        5. Computing a homography between two images
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
      16. 10. Processing Video Sequences
        1. Introduction
        2. Reading video sequences
          1. How to do it...
          2. How it works...
          3. There's more...
          4. See also
        3. Processing the video frames
          1. How to do it...
          2. How it works...
          3. There's more...
            1. Processing a sequence of images
            2. Using a frame processor class
          4. See also
        4. Writing video sequences
          1. How to do it...
          2. How it works...
        5. Tracking feature points in video
          1. How to do it...
          2. How it works...
          3. See also
        6. Extracting the foreground objects in video
          1. How to do it...
          2. How it works...
          3. There's more...
            1. The Mixture of Gaussian method
          4. See also