Mastering OpenCV with Practical Computer Vision Projects
eBook - ePub

Mastering OpenCV with Practical Computer Vision Projects

Shervin Emami, Khvedchenia Levgen, Naureen Mahmood, Jason Saragih, Roy Shilkrot, David Millan Escriva, Daniel Lelis Baggio

Partager le livre
  1. 340 pages
  2. English
  3. ePUB (adapté aux mobiles)
  4. Disponible sur iOS et Android
eBook - ePub

Mastering OpenCV with Practical Computer Vision Projects

Shervin Emami, Khvedchenia Levgen, Naureen Mahmood, Jason Saragih, Roy Shilkrot, David Millan Escriva, Daniel Lelis Baggio

DĂ©tails du livre
Aperçu du livre
Table des matiĂšres
Citations

À propos de ce livre

In Detail

Computer Vision is fast becoming an important technology and is used in Mars robots, national security systems, automated factories, driver-less cars, and medical image analysis to new forms of human-computer interaction. OpenCV is the most common library for computer vision, providing hundreds of complex and fast algorithms. But it has a steep learning curve and limited in-depth tutorials.

Mastering OpenCV with Practical Computer Vision Projects is the perfect book for developers with just basic OpenCV skills who want to try practical computer vision projects, as well as the seasoned OpenCV experts who want to add more Computer Vision topics to their skill set or gain more experience with OpenCV's new C++ interface before migrating from the C API to the C++ API.

Each chapter is a separate project including the necessary background knowledge, so try them all one-by-one or jump straight to the projects you're most interested in.

Create working prototypes from this book including real-time mobile apps, Augmented Reality, 3D shape from video, or track faces & eyes, fluid wall using Kinect, number plate recognition and so on.

Mastering OpenCV with Practical Computer Vision Projects gives you rapid training in nine computer vision areas with useful projects.

Approach

Each chapter in the book is an individual project and each project is constructed with step-by-step instructions, clearly explained code, and includes the necessary screenshots.

Who this book is for

You should have basic OpenCV and C/C++ programming experience before reading this book, as it is aimed at Computer Science graduates, researchers, and computer vision experts widening their expertise.

Foire aux questions

Comment puis-je résilier mon abonnement ?
Il vous suffit de vous rendre dans la section compte dans paramĂštres et de cliquer sur « RĂ©silier l’abonnement ». C’est aussi simple que cela ! Une fois que vous aurez rĂ©siliĂ© votre abonnement, il restera actif pour le reste de la pĂ©riode pour laquelle vous avez payĂ©. DĂ©couvrez-en plus ici.
Puis-je / comment puis-je télécharger des livres ?
Pour le moment, tous nos livres en format ePub adaptĂ©s aux mobiles peuvent ĂȘtre tĂ©lĂ©chargĂ©s via l’application. La plupart de nos PDF sont Ă©galement disponibles en tĂ©lĂ©chargement et les autres seront tĂ©lĂ©chargeables trĂšs prochainement. DĂ©couvrez-en plus ici.
Quelle est la différence entre les formules tarifaires ?
Les deux abonnements vous donnent un accĂšs complet Ă  la bibliothĂšque et Ă  toutes les fonctionnalitĂ©s de Perlego. Les seules diffĂ©rences sont les tarifs ainsi que la pĂ©riode d’abonnement : avec l’abonnement annuel, vous Ă©conomiserez environ 30 % par rapport Ă  12 mois d’abonnement mensuel.
Qu’est-ce que Perlego ?
Nous sommes un service d’abonnement Ă  des ouvrages universitaires en ligne, oĂč vous pouvez accĂ©der Ă  toute une bibliothĂšque pour un prix infĂ©rieur Ă  celui d’un seul livre par mois. Avec plus d’un million de livres sur plus de 1 000 sujets, nous avons ce qu’il vous faut ! DĂ©couvrez-en plus ici.
Prenez-vous en charge la synthÚse vocale ?
Recherchez le symbole Écouter sur votre prochain livre pour voir si vous pouvez l’écouter. L’outil Écouter lit le texte Ă  haute voix pour vous, en surlignant le passage qui est en cours de lecture. Vous pouvez le mettre sur pause, l’accĂ©lĂ©rer ou le ralentir. DĂ©couvrez-en plus ici.
Est-ce que Mastering OpenCV with Practical Computer Vision Projects est un PDF/ePUB en ligne ?
Oui, vous pouvez accĂ©der Ă  Mastering OpenCV with Practical Computer Vision Projects par Shervin Emami, Khvedchenia Levgen, Naureen Mahmood, Jason Saragih, Roy Shilkrot, David Millan Escriva, Daniel Lelis Baggio en format PDF et/ou ePUB ainsi qu’à d’autres livres populaires dans Ciencia de la computaciĂłn et Ciencias computacionales general. Nous disposons de plus d’un million d’ouvrages Ă  dĂ©couvrir dans notre catalogue.

Informations

Année
2012
ISBN
9781849517829

Mastering OpenCV with Practical Computer Vision Projects


Table of Contents

Mastering OpenCV with Practical Computer Vision Projects
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers and more
Why Subscribe?
Free Access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Cartoonifier and Skin Changer for Android
Accessing the webcam
Main camera processing loop for a desktop app
Generating a black-and-white sketch
Generating a color painting and a cartoon
Generating an "evil" mode using edge filters
Generating an "alien" mode using skin detection
Skin-detection algorithm
Showing the user where to put their face
Implementation of the skin-color changer
Porting from desktop to Android
Setting up an Android project that uses OpenCV
Color formats used for image processing on Android
Input color format from the camera
Output color format for display
Adding the cartoonifier code to the Android NDK app
Reviewing the Android app
Cartoonifying the image when the user taps the screen
Saving the image to a file and to the Android picture gallery
Showing an Android notification message about a saved image
Changing cartoon modes through the Android menu bar
Reducing the random pepper noise from the sketch image
Showing the FPS of the app
Using a different camera resolution
Customizing the app
Summary
2. Marker-based Augmented Reality on iPhone or iPad
Creating an iOS project that uses OpenCV
Adding OpenCV framework
Including OpenCV headers
Application architecture
Accessing the camera
Marker detection
Marker identification
Grayscale conversion
Image binarization
Contours detection
Candidates search
Marker code recognition
Reading marker code
Marker location refinement
Placing a marker in 3D
Camera calibration
Marker pose estimation
Rendering the 3D virtual object
Creating the OpenGL rendering layer
Rendering an AR scene
Summary
References
3. Marker-less Augmented Reality
Marker-based versus marker-less AR
Using feature descriptors to find an arbitrary image on video
Feature extraction
Definition of a pattern object
Matching of feature points
PatternDetector.cpp
Outlier removal
Cross-match filter
Ratio test
PatternDetector.cpp
Homography estimation
PatternDetector.cpp
Homography refinement
PatternDetector.cpp
Putting it all together
Pattern pose estimation
PatternDetector.cpp
Obtaining the camera-intrinsic matrix
Pattern.cpp
Application infrastructure
ARPipeline.hpp
ARPipeline.cpp
Enabling support for 3D visualization in OpenCV
Creating OpenGL windows using OpenCV
Video capture using OpenCV
Rendering augmented reality
ARDrawingContext.hpp
ARDrawingContext.cpp
Demonstration
main.cpp
Summary
References
4. Exploring Structure from Motion Using OpenCV
Structure from Motion concepts
Estimating the camera motion from a pair of images
Point matching using rich feature descriptors
Point matching using optical flow
Finding camera matrices
Reconstructing the scene
Reconstruction from many views
Refinement of the reconstruction
Visualizing 3D point clouds with PCL
Using the example code
Summary
References
5. Number Plate Recognition Using SVM and Neural Networks
Introduction to ANPR
ANPR algorithm
Plate detection
Segmentation
Classification
Plate recognition
OCR segmentation
Feature extraction
OCR classification
Evaluation
Summary
6. Non-rigid Face Tracking
Overview
Utilities
Object-oriented design
Data collection: Image and video annotation
Training data types
Annotation tool
Pre-annotated data (The MUCT dataset)
Geometrical constraints
Procrustes analysis
Linear shape models
A combined local-global representation
Training and visualization
Facial feature detectors
Correlation-based patch models
Learning discriminative patch models
Generative versus discriminative patch models
Accounting for global geometric transformations
Training and visualization
Face detection and initialization
Face tracking
Face tracker implementation
Training and visualization
Generic versus person-specific models
Summary
References
7. 3D Head Pose Estimation Using AAM and POSIT
Active Appearance Models overview
Active Shape Models
Getting the feel of PCA
Triangulation
Triangle texture warping
Model Instantiation – playing with the Active Appearance Model
AAM search and fitting
POSIT
Diving into POSIT
POSIT and head model
Tracking from webcam or video file
Summary
References
8. Face Recognition using Eigenfaces or Fisherfaces
Introduction to face recognition and face detection
Step 1: Face detection
Implementing face detection using OpenCV
Loading a Haar or LBP detector for object or face detection
Accessing the webcam
Detecting an object using the Haar or LBP Classifier
Grayscale color conversion
Shrinking the camera image
Histogram equalization
Detecting the face
Step 2: Face preprocessing
Eye detection
Eye search regions
Geometrical transformation
Separate histogram equalization for left and right sides
Smoothing
Elliptical mask
Step 3: Collecting faces and learning from them
Collecting preprocessed faces for training
Training the face recognition system from collected faces
Viewing the learned knowledge
Average face
Eigenvalues, Eigenfaces, and Fisherfaces
Step 4: Face recognition
Face identification: Recognizing people from their face
Face verification: Validating that it is the claimed person
Finishing touches: Saving and loading files
Finishing touches: Making a nice and interactive GUI
Drawing the GUI elements
Startup mode
Detection mode
Collection mode
Training mode
Recognition mode
Checking and handling mouse clicks
Summary
References
Index

Mastering OpenCV with Practical Computer Vision Projects

Copyright © 2012 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: November 2012
Production Reference: 1161112
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-84951-782-9
www.packtpub.com
Cover Image by Neha Rajappan ()

Credits

Authors
Daniel LĂ©lis Baggio
Shervin Emami
David MillĂĄn EscrivĂĄ
Khvedchenia Ievgen
Naureen Mahmood
Jason Saragih
Roy Shilkrot
Reviewers
Kirill Kornyakov
Luis DĂ­az MĂĄs
Sebastian Montabone
Acquisition Editor
Usha Iyer
Lead Technical Editor
Ankita Shashi
Technical Editors
Sharvari Baet
Prashant Salvi
Copy Editors
Brandt D'Mello
Aditya Nair
Alfida Paiva
Project Coordinator
Priya Sharma
Proofreaders
Chris Brown
Martin Diver
Indexer
Hemangini Bari
Tejal Soni
Rekha Nair
Graphics
Valentina D'silva
Aditi Gajjar
Production Coordinator
Arvindkumar Gupta
Cover Work
Arvindkumar Gupta

About the Authors

Daniel LĂ©lis Baggio started his work in comp...

Table des matiĂšres