O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Learning Image Processing with OpenCV

Book Description

Exploit the amazing features of OpenCV to create powerful image processing applications through easy-to-follow examples

In Detail

OpenCV, arguably the most widely used computer vision library, includes hundreds of ready-to-use imaging and vision functions and is used in both academia and enterprises.

This book provides an example-based tour of OpenCV's main image processing algorithms. Starting with an exploration of library installation, wherein the library structure and basics of image and video reading/writing are covered, you will dive into image filtering and the color manipulation features of OpenCV with LUTs. You'll then be introduced to techniques such as inpainting and denoising to enhance images as well as the process of HDR imaging. Finally, you'll master GPU-based accelerations. By the end of this book, you will be able to create smart and powerful image processing applications with ease! All the topics are described with short, easy-to-follow examples.

What You Will Learn

  • Create OpenCV programs with rich user interfaces
  • Grasp basic concepts and tasks in image processing such as image types, pixel access techniques, and arithmetic operations with images and histograms
  • Explore useful image processing techniques such as filtering, smoothing, sharpening, denoising, morphology, and geometrical transformations
  • Get to know handy algorithms such as inpainting and LUTs
  • Leverage the color manipulation features of OpenCV to optimize image processing
  • Discover how to process a video and the main techniques involved such as stabilization, stitching, and even superresolution
  • Understand the new computational photography module that covers high-dynamic range imaging, seamless cloning, decolorization, and non-photorealistic rendering

Table of Contents

  1. Learning Image Processing with OpenCV
    1. Table of Contents
    2. Learning Image Processing with OpenCV
    3. Credits
    4. About the Authors
    5. About the Reviewers
    6. www.PacktPub.com
      1. Support files, eBooks, discount offers, and more
        1. Why subscribe?
        2. Free access for Packt account holders
    7. 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
    8. 1. Handling Image and Video Files
      1. An introduction to OpenCV
      2. Downloading and installing OpenCV
        1. Getting a compiler and setting CMake
        2. Configuring OpenCV with CMake
        3. Compiling and installing the library
      3. The structure of OpenCV
      4. Creating user projects with OpenCV
        1. General usage of the library
        2. Tools to develop new projects
        3. Creating an OpenCV C++ program with Qt Creator
      5. Reading and writing image files
        1. The basic API concepts
        2. Image file-supported formats
        3. The example code
          1. Reading image files
          2. Event handling into the intrinsic loop
          3. Writing image files
      6. Reading and writing video files
        1. The example code
      7. User-interactions tools
        1. Trackbars
        2. Mouse interaction
        3. Buttons
        4. Drawing and displaying text
      8. Summary
    9. 2. Establishing Image Processing Tools
      1. Basic data types
      2. Pixel-level access
      3. Measuring the time
      4. Common operations with images
      5. Arithmetic operations
      6. Data persistence
      7. Histograms
        1. The example code
        2. The example code
      8. Summary
    10. 3. Correcting and Enhancing Images
      1. Image filtering
        1. Smoothing
          1. The example code
        2. Sharpening
          1. The example code
        3. Working with image pyramids
          1. Gaussian pyramids
          2. Laplacian pyramids
          3. The example code
      2. Morphological operations
        1. The example code
      3. LUTs
        1. The example code
      4. Geometrical transformations
        1. Affine transformation
          1. Scaling
            1. The example code
          2. Translation
            1. The example code
          3. Image rotation
            1. The example code
          4. Skewing
            1. The example code
          5. Reflection
            1. The example code
        2. Perspective transformation
          1. The example code
      5. Inpainting
        1. The example code
      6. Denoising
        1. The example code
      7. Summary
    11. 4. Processing Color
      1. Color spaces
        1. Conversion between color spaces (cvtColor)
          1. RGB
            1. The example code
          2. Grayscale
            1. Example code
          3. CIE XYZ
            1. The example code
          4. YCrCb
            1. The example code
          5. HSV
            1. The example code
          6. HLS
            1. The example code
          7. CIE L*a*b*
            1. The example code
          8. CIE L*u*v*
            1. The example code
          9. Bayer
            1. The example code
      2. Color-space-based segmentation
        1. HSV segmentation
        2. YCrCb segmentation
      3. Color transfer
        1. The example code
      4. Summary
    12. 5. Image Processing for Video
      1. Video stabilization
      2. Superresolution
      3. Stitching
      4. Summary
    13. 6. Computational Photography
      1. High-dynamic-range images
        1. Creating HDR images
          1. Example
        2. Tone mapping
        3. Alignment
        4. Exposure fusion
      2. Seamless cloning
      3. Decolorization
      4. Non-photorealistic rendering
      5. Summary
    14. 7. Accelerating Image Processing
      1. OpenCV with the OpenCL installation
        1. A quick recipe to install OpenCV with OpenCL
        2. Check the GPU usage
      2. Accelerating your own functions
        1. Checking your OpenCL
          1. The code explanation
        2. Your first GPU-based program
          1. The code explanation
        3. Going real time
          1. The code explanation
          2. The performance
      3. Summary
    15. Index