Practical Computer Vision with SimpleCV.pdf

(6395 KB) Pobierz
Practical Computer Vision with
SimpleCV
Kurt Demaagd, Anthony Oliver, Nathan Oostendorp, and
Katherine Scott
Beijing
Cambridge
Farnham
Köln
Sebastopol
Tokyo
Practical Computer Vision with SimpleCV
by Kurt Demaagd, Anthony Oliver, Nathan Oostendorp, and Katherine Scott
Copyright © 2012 Ingenuitas. 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://my.safaribooksonline.com). For more information, contact our
corporate/institutional sales department: 800-998-9938 or
corporate@oreilly.com.
Editor:
Brian Jepson
Production Editor:
Iris Febres
Proofreader:
Gillian McGarvey
Revision History for the First Edition:
Cover Designer:
Karen Montgomery
Interior Designer:
David Futato
Illustrators:
Robert Romano and Rebecca Demarest
First release
2012-07-23
See
http://oreilly.com/catalog/errata.csp?isbn=9781449320362
for release details.
Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of
O’Reilly Media, Inc.
Practical Computer Vision with SimpleCV,
the image of the short-tail manis, and
related trade dress are trademarks of O’Reilly Media, Inc.
Many of the designations used by manufacturers and sellers to distinguish their products are claimed as
trademarks. Where those designations appear in this book, and O’Reilly Media, Inc., was aware of a
trademark claim, the designations have been printed in caps or initial caps.
While every precaution has been taken in the preparation of this book, the publisher and authors assume
no responsibility for errors or omissions, or for damages resulting from the use of the information con-
tained herein.
ISBN: 978-1-449-32036-2
[LSI]
1343142048
Table of Contents
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Why Learn Computer Vision
What Is the SimpleCV Framework?
What Is Computer Vision?
Easy Versus Hard Problems
What Is a Vision System?
Filtering Input
Extracting Features and Information
1
2
2
4
5
6
7
2. Getting to Know the SimpleCV Framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Installation
Windows
Mac
Linux
Installation from Source
Hello World
The SimpleCV Shell
Basics of the Shell
The Shell and The Filesystem
Introduction to the Camera
A Live Camera Feed
The Display
Examples
Time-Lapse Photography
A Photo Booth Application
9
10
10
11
12
12
14
15
18
19
23
24
27
28
29
3. Image Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Overview
Images, Image Sets, and Video
31
32
iii
Zgłoś jeśli naruszono regulamin