Synopses & Reviews
"This library is useful for practitioners, and is an excellent tool for those entering the field: it is a set of computer vision algorithms that work as advertised."-William T. Freeman, Computer Science and Artificial Intelligence Laboratory, Massachusetts Institute of Technology
Learning OpenCV puts you in the middle of the rapidly expanding field of computer vision. Written by the creators of the free open source OpenCV library, this book introduces you to computer vision and demonstrates how you can quickly build applications that enable computers to "see" and make decisions based on that data.
Computer vision is everywhere-in security systems, manufacturing inspection systems, medical image analysis, Unmanned Aerial Vehicles, and more. It stitches Google maps and Google Earth together, checks the pixels on LCD screens, and makes sure the stitches in your shirt are sewn properly. OpenCV provides an easy-to-use computer vision framework and a comprehensive library with more than 500 functions that can run vision code in real time.
Learning OpenCV will teach any developer or hobbyist to use the framework quickly with the help of hands-on exercises in each chapter. This book includes:
- A thorough introduction to OpenCV
- Getting input from cameras
- Transforming images
- Segmenting images and shape matching
- Pattern recognition, including face detection
- Tracking and motion in 2 and 3 dimensions
- 3D reconstruction from stereo vision
- Machine learning algorithms
Getting machines to see is a challenging but entertaining goal. Whether you want to build simple or sophisticated vision applications, Learning OpenCV is the book you need to get started.
The authors of "OpenCV" explain how to put computer vision to work. They bring readers up to speed with the latest updates in the field and show them how to program with existing free code.
About the Author
Dr. Gary Rost Bradski is a consulting professor in the CS department at Stanford University AI Lab where he mentors robotics, machine learning and computer vision research. He is also Senior Scientist at Willow Garage http://www.willowgarage.com, a recently founded robotics research institute/incubator. He has a BS degree in EECS from U.C. Berkeley and a PhD from Boston University. He has 20 years of industrial experience applying machine learning and computer vision spanning option trading operations at First Union National Bank, to computer vision at Intel Research to machine learning in Intel Manufacturing and several startup companies in between. Gary started the Open Source Computer Vision Library (OpenCV http://sourceforge.net/projects/opencvlibrary/ ), the statistical Machine Learning Library (MLL comes with OpenCV), and the Probabilistic Network Library (PNL). OpenCV is used around the world in research, government and commercially. The vision libraries helped develop a notable part of the commercial Intel performance primitives library (IPP http://tinyurl.com/36ua5s). Gary also organized the vision team for Stanley, the Stanford robot that won the DARPA Grand Challenge autonomous race across the desert for a $2M team prize and helped found the Stanford AI Robotics project at Stanford http://www.cs.stanford.edu/group/stair/ working with Professor Andrew Ng. Gary has over 50 publications and 13 issued patents with 18 pending. He lives in Palo Alto with his wife and 3 daughters and bikes road or mountains as much as he can.
Dr. Adrian Kaehler is a senior scientist at Applied Minds Corporation. His current research includes topics in machine learning, statistical modeling, computer vision and robotics. Adrian received his Ph.D. in Theoretical Physics from Columbia university in 1998. Adrian has since held positions at Intel Corporation and the Stanford University AI Lab, and was a member of the winning Stanley race team in the DARPA Grand Challenge. He has a variety of published papers and patents in physics, electrical engineering, computer science, and robotics.
Table of Contents
Preface; Purpose; About the Programs in This Book; Prerequisites; How This Book Is Best Used; Conventions Used in This Book; Using Code Examples; Safari® Books Online; We'd Like to Hear from You; Acknowledgments; Chapter 1: Overview; 1.1 What Is OpenCV?; 1.2 Who Uses OpenCV?; 1.3 What Is Computer Vision?; 1.4 The Origin of OpenCV; 1.5 Downloading and Installing OpenCV; 1.6 Getting the Latest OpenCV via CVS; 1.7 More OpenCV Documentation; 1.8 OpenCV Structure and Content; 1.9 Portability; 1.10 Exercises; Chapter 2: Introduction to OpenCV; 2.1 Getting Started; 2.2 First Program--Display a Picture; 2.3 Second Program--AVI Video; 2.4 Moving Around; 2.5 A Simple Transformation; 2.6 A Not-So-Simple Transformation; 2.7 Input from a Camera; 2.8 Writing to an AVI File; 2.9 Onward; 2.10 Exercises; Chapter 3: Getting to Know OpenCV; 3.1 OpenCV Primitive Data Types; 3.2 CvMat Matrix Structure; 3.3 IplImage Data Structure; 3.4 Matrix and Image Operators; 3.5 Drawing Things; 3.6 Data Persistence; 3.7 Integrated Performance Primitives; 3.8 Summary; 3.9 Exercises; Chapter 4: HighGUI; 4.1 A Portable Graphics Toolkit; 4.2 Creating a Window; 4.3 Loading an Image; 4.4 Displaying Images; 4.5 Working with Video; 4.6 ConvertImage; 4.7 Exercises; Chapter 5: Image Processing; 5.1 Overview; 5.2 Smoothing; 5.3 Image Morphology; 5.4 Flood Fill; 5.5 Resize; 5.6 Image Pyramids; 5.7 Threshold; 5.8 Exercises; Chapter 6: Image Transforms; 6.1 Overview; 6.2 Convolution; 6.3 Gradients and Sobel Derivatives; 6.4 Laplace; 6.5 Canny; 6.6 Hough Transforms; 6.7 Remap; 6.8 Stretch, Shrink, Warp, and Rotate; 6.9 CartToPolar and PolarToCart; 6.10 LogPolar; 6.11 Discrete Fourier Transform (DFT); 6.12 Discrete Cosine Transform (DCT); 6.13 Integral Images; 6.14 Distance Transform; 6.15 Histogram Equalization; 6.16 Exercises; Chapter 7: Histograms and Matching; 7.1 Basic Histogram Data Structure; 7.2 Accessing Histograms; 7.3 Basic Manipulations with Histograms; 7.4 Some More Complicated Stuff; 7.5 Exercises; Chapter 8: Contours; 8.1 Memory Storage; 8.2 Sequences; 8.3 Contour Finding; 8.4 Another Contour Example; 8.5 More to Do with Contours; 8.6 Matching Contours; 8.7 Exercises; Chapter 9: Image Parts and Segmentation; 9.1 Parts and Segments; 9.2 Background Subtraction; 9.3 Watershed Algorithm; 9.4 Image Repair by Inpainting; 9.5 Mean-Shift Segmentation; 9.6 Delaunay Triangulation, Voronoi Tesselation; 9.7 Exercises; Chapter 10: Tracking and Motion; 10.1 The Basics of Tracking; 10.2 Corner Finding; 10.3 Subpixel Corners; 10.4 Invariant Features; 10.5 Optical Flow; 10.6 Mean-Shift and Camshift Tracking; 10.7 Motion Templates; 10.8 Estimators; 10.9 The Condensation Algorithm; 10.10 Exercises; Chapter 11: Camera Models and Calibration; 11.1 Camera Model; 11.2 Calibration; 11.3 Undistortion; 11.4 Putting Calibration All Together; 11.5 Rodrigues Transform; 11.6 Exercises; Chapter 12: Projection and 3D Vision; 12.1 Projections; 12.2 Affine and Perspective Transformations; 12.3 POSIT: 3D Pose Estimation; 12.4 Stereo Imaging; 12.5 Structure from Motion; 12.6 Fitting Lines in Two and Three Dimensions; 12.7 Exercises; Chapter 13: Machine Learning; 13.1 What Is Machine Learning; 13.2 Common Routines in the ML Library; 13.3 Mahalanobis Distance; 13.4 K-Means; 13.5 Naïve/Normal Bayes Classifier; 13.6 Binary Decision Trees; 13.7 Boosting; 13.8 Random Trees; 13.9 Face Detection or Haar Classifier; 13.10 Other Machine Learning Algorithms; 13.11 Exercises; Chapter 14: OpenCV's Future; 14.1 Past and Future; 14.2 Directions; 14.3 OpenCV for Artists; 14.4 Afterword; Chapter 15: Bibliography; Colophon;