PacktLib: OpenCV 2 Computer Vision Application Programming Cookbook

OpenCV 2 Computer Vision Application Programming Cookbook

Credits

About the Author

About the Reviewers

www.PacktPub.com

Preface

Playing with Images

Introduction

Installing the OpenCV library

Creating an OpenCV project with MS Visual C++

Creating an OpenCV project with Qt

Loading, displaying, and saving images

Creating a GUI application using Qt

Manipulating the Pixels

Introduction

Accessing pixel values

Scanning an image with pointers

Scanning an image with iterators

Writing efficient image scanning loops

Scanning an image with neighbor access

Performing simple image arithmetic

Defining regions of interest

Processing Images with Classes

Introduction

Using the Strategy pattern in algorithm design

Using a Controller to communicate with processing modules

Using the Singleton design pattern

Using the Model-View-Controller architecture to design an application

Converting color spaces

Counting the Pixels with Histograms

Introduction

Computing the image histogram

Applying look-up tables to modify image appearance

Equalizing the image histogram

Backprojecting a histogram to detect specific image content

Using the mean shift algorithm to find an object

Retrieving similar images using histogram comparison

Transforming Images with Morphological Operations

Introduction

Eroding and dilating images using morphological filters

Opening and closing images using morphological filters

Detecting edges and corners using morphological filters

Segmenting images using watersheds

Extracting foreground objects with the GrabCut algorithm

Filtering the Images

Introduction

Filtering images using low-pass filters

Filtering images using a median filter

Applying directional filters to detect edges

Computing the Laplacian of an image

Extracting Lines, Contours, and Components

Introduction

Detecting image contours with the Canny operator

Detecting lines in images with the Hough transform

Fitting a line to a set of points

Extracting the components' contours

Computing components' shape descriptors

Detecting and Matching Interest Points

Introduction

Detecting Harris corners

Detecting FAST features

Detecting the scale-invariant SURF features

Describing SURF features

Estimating Projective Relations in Images

Introduction

Calibrating a camera

Computing the fundamental matrix of an image pair

Matching images using random sample consensus

Computing a homography between two images

Processing Video Sequences

Introduction

Reading video sequences

Processing the video frames

Writing video sequences

Tracking feature points in video

Extracting the foreground objects in video