The OpenCV 2 Computer Vision Application Programming Cookbook

The good people at Packt Publishing sent me a copy of OpenCV 2 Computer Vision Application Programming Cookbook, by Robert Laganiere. I've been reading it for a few days now, and here's my take on the book - this book covers a lot of practical problems coders face when writing a computer vision application!

The first chapter deals with installing and using OpenCV with Microsoft Visual C++ and Qt. The Qt part is in-depth - a step by step guide to making an OpenCV + Qt GUI app (right down to signals and slots).

The book makes extensive use of the new C++ interface of OpenCV. You'll learn quite a bit of it. For example, you'll learn how to use iterators to go through each pixel (instead of having two loops - one for 'y' another for 'x'). You'll find lots of code snippets that use some neat C++ interface tricks.

The book also talks about a few coding patterns relevant to vision based applications. Patterns are solutions to certain problems faced by a lot of software developers. An example might be the Undo-redo problem. How would you implement that? Well, lots of people have worked on this problem (think Apple, Microsoft, OpenOffice, etc). And the pattern used to write undo/redo engines is the Memento pattern.

Then it goes through image filters, extracting lines, contours and morphological transforms (yes, that's a free chapter from the book). The last three chapters are cover interest points (Harris, FAST and SURF features), camera calibration stuff (homography matrix, fundamental matrix, etc) and video processing (optical flow, mixture of Gaussians).

They have some theory included as well, but it can be a little unsatisfying at certain points. They have references to relevant papers or articles though. You can get a rigorous mathematical description there.

Overall, you'll learn some new things from the book. You'll get acquiainted to using object oriented mechanisms to make your computer vision life easier and modular. Robert's background with object oriented programming really comse out in the book! And if you write code, FAST (no puns), then, this cookbook might just be for you!

Related posts

Implemention in OpenCV

Here's a simple task - given an image find the dominant colors in the image. I'll walk you through a lesser known technique that does not use kmeans.

Read more

Utkarsh Sinha created AI Shack in 2010 and has since been working on computer vision and related fields. He is currently at Microsoft working on computer vision.