978-1-491-93799-0
[M]
Learning OpenCV 3
by Adrian Kaehler and Gary Bradski
Copyright © 2017 Adrian Kaehler, Gary Bradski. All rights reserved.
Printed in the United States of America.
Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472.
O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are
also available for most titles (http://www.oreilly.com/safari). For more information, contact our corpo‐
rate/institutional sales department: 800-998-9938 or corporate@oreilly.com.
Editor: Dawn Schanafelt Indexer: Ellen Troutman
Production Editor: Kristen Brown Interior Designer: David Futato
Copyeditor: Rachel Monaghan Cover Designer: Karen Montgomery
Proofreader: James Fraleigh Illustrator: Rebecca Demarest
December 2016: First Edition
Revision History for the First Edition
2016-12-09: First Release
See http://oreilly.com/catalog/errata.csp?isbn=9781491937990 for release details.
The O’Reilly logo is a registered trademark of O’Reilly Media, Inc. Learning OpenCV 3, the cover image,
and related trade dress are trademarks of O’Reilly Media, Inc.
While the publisher and the authors have used good faith efforts to ensure that the information and
instructions contained in this work are accurate, the publisher and the authors disclaim all responsibility
for errors or omissions, including without limitation responsibility for damages resulting from the use of
or reliance on this work. Use of the information and instructions contained in this work is at your own
risk. If any code samples or other technology this work contains or describes is subject to open source
licenses or the intellectual property rights of others, it is your responsibility to ensure that your use
thereof complies with such licenses and/or rights.
www.allitebooks.com
Table of Contents
Preface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv
1.
Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
What Is OpenCV? 1
Who Uses OpenCV? 2
What Is Computer Vision? 3
The Origin of OpenCV 6
OpenCV Block Diagram 8
Speeding Up OpenCV with IPP 9
Who Owns OpenCV? 10
Downloading and Installing OpenCV 10
Installation 10
Getting the Latest OpenCV via Git 13
More OpenCV Documentation 13
Supplied Documentation 14
Online Documentation and the Wiki 14
OpenCV Contribution Repository 17
Downloading and Building Contributed Modules 17
Portability 18
Summary 19
Exercises 19
2.
Introduction to OpenCV. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Include Files 21
Resources 22
First Program—Display a Picture 23
Second Program—Video 25
Moving Around 27
iii
www.allitebooks.com