OpenCV: Computer Vision Projects with Python
eBook - ePub

OpenCV: Computer Vision Projects with Python

Joseph Howse, Prateek Joshi, Michael Beyeler

Condividi libro
  1. 558 pagine
  2. English
  3. ePUB (disponibile sull'app)
  4. Disponibile su iOS e Android
eBook - ePub

OpenCV: Computer Vision Projects with Python

Joseph Howse, Prateek Joshi, Michael Beyeler

Dettagli del libro
Anteprima del libro
Indice dei contenuti
Citazioni

Informazioni sul libro

Get savvy with OpenCV and actualize cool computer vision applications

About This Book

  • Use OpenCV's Python bindings to capture video, manipulate images, and track objects
  • Learn about the different functions of OpenCV and their actual implementations.
  • Develop a series of intermediate to advanced projects using OpenCV and Python

Who This Book Is For

This learning path is for someone who has a working knowledge of Python and wants to try out OpenCV. This Learning Path will take you from a beginner to an expert in computer vision applications using OpenCV. OpenCV's application are humongous and this Learning Path is the best resource to get yourself acquainted thoroughly with OpenCV.

What You Will Learn

  • Install OpenCV and related software such as Python, NumPy, SciPy, OpenNI, and SensorKinect - all on Windows, Mac or Ubuntu
  • Apply "curves" and other color transformations to simulate the look of old photos, movies, or video games
  • Apply geometric transformations to images, perform image filtering, and convert an image into a cartoon-like image
  • Recognize hand gestures in real time and perform hand-shape analysis based on the output of a Microsoft Kinect sensor
  • Reconstruct a 3D real-world scene from 2D camera motion and common camera reprojection techniques
  • Detect and recognize street signs using a cascade classifier and support vector machines (SVMs)
  • Identify emotional expressions in human faces using convolutional neural networks (CNNs) and SVMs
  • Strengthen your OpenCV2 skills and learn how to use new OpenCV3 features

In Detail

OpenCV is a state-of-art computer vision library that allows a great variety of image and video processing operations. OpenCV for Python enables us to run computer vision algorithms in real time. This learning path proposes to teach the following topics. First, we will learn how to get started with OpenCV and OpenCV3's Python API, and develop a computer vision application that tracks body parts. Then, we will build amazing intermediate-level computer vision applications such as making an object disappear from an image, identifying different shapes, reconstructing a 3D map from images, and building an augmented reality application, Finally, we'll move to more advanced projects such as hand gesture recognition, tracking visually salient objects, as well as recognizing traffic signs and emotions on faces using support vector machines and multi-layer perceptrons respectively.

This Learning Path combines some of the best that Packt has to offer in one complete, curated package. It includes content from the following Packt products:

  • OpenCV Computer Vision with Python by Joseph Howse
  • OpenCV with Python By Example by Prateek Joshi
  • OpenCV with Python Blueprints by Michael Beyeler

Style and approach

This course aims to create a smooth learning path that will teach you how to get started with will learn how to get started with OpenCV and OpenCV 3's Python API, and develop superb computer vision applications. Through this comprehensive course, you'll learn to create computer vision applications from scratch to finish and more!.

Domande frequenti

Come faccio ad annullare l'abbonamento?
È semplicissimo: basta accedere alla sezione Account nelle Impostazioni e cliccare su "Annulla abbonamento". Dopo la cancellazione, l'abbonamento rimarrà attivo per il periodo rimanente già pagato. Per maggiori informazioni, clicca qui
È possibile scaricare libri? Se sì, come?
Al momento è possibile scaricare tramite l'app tutti i nostri libri ePub mobile-friendly. Anche la maggior parte dei nostri PDF è scaricabile e stiamo lavorando per rendere disponibile quanto prima il download di tutti gli altri file. Per maggiori informazioni, clicca qui
Che differenza c'è tra i piani?
Entrambi i piani ti danno accesso illimitato alla libreria e a tutte le funzionalità di Perlego. Le uniche differenze sono il prezzo e il periodo di abbonamento: con il piano annuale risparmierai circa il 30% rispetto a 12 rate con quello mensile.
Cos'è Perlego?
Perlego è un servizio di abbonamento a testi accademici, che ti permette di accedere a un'intera libreria online a un prezzo inferiore rispetto a quello che pagheresti per acquistare un singolo libro al mese. Con oltre 1 milione di testi suddivisi in più di 1.000 categorie, troverai sicuramente ciò che fa per te! Per maggiori informazioni, clicca qui.
Perlego supporta la sintesi vocale?
Cerca l'icona Sintesi vocale nel prossimo libro che leggerai per verificare se è possibile riprodurre l'audio. Questo strumento permette di leggere il testo a voce alta, evidenziandolo man mano che la lettura procede. Puoi aumentare o diminuire la velocità della sintesi vocale, oppure sospendere la riproduzione. Per maggiori informazioni, clicca qui.
OpenCV: Computer Vision Projects with Python è disponibile online in formato PDF/ePub?
Sì, puoi accedere a OpenCV: Computer Vision Projects with Python di Joseph Howse, Prateek Joshi, Michael Beyeler in formato PDF e/o ePub, così come ad altri libri molto apprezzati nelle sezioni relative a Computer Science e Programming in Python. Scopri oltre 1 milione di libri disponibili nel nostro catalogo.

Informazioni

Anno
2016
ISBN
9781787125490
Edizione
1

OpenCV: Computer Vision Projects with Python


Table of Contents

OpenCV: Computer Vision Projects with Python
OpenCV: Computer Vision Projects with Python
Credits
Preface
What this learning path covers
What you need for this learning path
Who this learning path is for
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Module 1
1. Setting up OpenCV
Choosing and using the right setup tools
Making the choice on Windows XP, Windows Vista, Windows 7, or Windows 8
Using binary installers (no support for depth cameras)
Using CMake and compilers
Making the choice on Mac OS X Snow Leopard, Mac OS X Lion, or Mac OS X Mountain Lion
Using MacPorts with ready-made packages
Using MacPorts with your own custom packages
Using Homebrew with ready-made packages (no support for depth cameras)
Using Homebrew with your own custom packages
Making the choice on Ubuntu 12.04 LTS or Ubuntu 12.10
Using the Ubuntu repository (no support for depth cameras)
Using CMake via a ready-made script that you may customize
Making the choice on other Unix-like systems
Running samples
Finding documentation, help, and updates
Summary
2. Handling Files, Cameras, and GUIs
Basic I/O scripts
Reading/Writing an image file
Converting between an image and raw bytes
Reading/Writing a video file
Capturing camera frames
Displaying camera frames in a window
Project concept
An object-oriented design
Abstracting a video stream – managers.CaptureManager
Abstracting a window and keyboard – managers.WindowManager
Applying everything – cameo.Cameo
Summary
3. Filtering Images
Creating modules
Channel mixing – seeing in Technicolor
Simulating RC color space
Simulating RGV color space
Simulating CMV color space
Curves – bending color space
Formulating a curve
Caching and applying a curve
Designing object-oriented curve filters
Emulating photo films
Emulating Kodak Portra
Emulating Fuji Provia
Emulating Fuji Velvia
Emulating cross-processing
Highlighting edges
Custom kernels – getting convoluted
Modifying the application
Summary
4. Tracking Faces with Haar Cascades
Conceptualizing Haar cascades
Getting Haar cascade data
Creating modules
Defining a face as a hierarchy of rectangles
Tracing, cutting, and pasting rectangles
Adding more utility functions
Tracking faces
Modifying the application
Swapping faces in one camera feed
Copying faces between camera feeds
Summary
5. Detecting Foreground/Background Regions and Depth
Creating modules
Capturing frames from a depth camera
Creating a mask from a disparity map
Masking a copy operation
Modifying the application
Summary
A. Integrating with Pygame
Installing Pygame
Documentation and tutorials
Subclassing managers.WindowManager
Modifying the application
Further uses of Pygame
Summary
B. Generating Haar Cascades for Custom Targets
Gathering positive and negative training images
Finding the training executables
On Windows
On Mac, Ubuntu, and other Unix-like systems
Creating the training sets and cascade
Creating <negative_description>
Creating <positive_description>
Creating <binary_description> by running <opencv_createsamples>
Creating <cascade> by running <opencv_traincascade>
Testing and improving <cascade>
Summary
2. Module 2
1. Detecting Edges and Applying Image Filters
2D convolution
Blurring
The size of the kernel versus the blurriness
Edge detection
Motion blur
Under the hood
Sharpening
Understanding the pattern
Embossing
Erosion and dilation
Afterthought
Creating a vignette filter
What's happening underneath?
How do we move the focus around?
Enhancing the contrast in an image
How do we handle color images?
Summary
2. Cartoonizing an Image
Accessing the webcam
Under the hood
Keyboard inputs
Interacting with the application
Mouse inputs
What's happening underneath?
Interacting with a live video stream
How did we do it?
Cartoonizing an image
Deconstructing the code
Summary
3. Detecting and Tracking Different Body Parts
Using Haar cascades to detect things
What are integral images?
Detecting and tracking faces
Understanding it better
Fun with faces
Under the hood
Detecting eyes
Afterthought
Fun with eyes
Positioning the sunglasses
Detecting ears
Detecting a mouth
It's time for a moustache
Detecting a nose
Detecting pupils
Deconstructing the code
Summary
4. Extracting Features from an Image
Why do we care about keypoints?
What are keypoints?
Detecting the corners
Good Features To Track
Scale Invariant Feature Transform (SIFT)
Speeded Up Robust Features (SURF)
Features from Accelerated Segment Test (FAST)
Binary Robust Independent Elementary Features (BRIEF)
Oriented FAST and Rotated BRIEF (ORB)
Summary
5. Creating a Panoramic Image
Matching keypoint descriptors
How did we match the keypoints?
Understanding the matcher object
Drawing the matching keypoints
Creating the panoramic image
Finding the overlapping regions
Stitching the images
What if the images are at an angle to each other?
Why does it look stretched?
Summary
6. Seam Carving
Why do we care about seam carving?
How does it work?
How do we define "interesting"?
How do we compute the seams?
Can we expand an image?
Can we remove an object completely?
How did we do it?
Summary
7. Detecting Shapes and Segmenting an Image
Contour analysis and shape matching
Approximating a contour
Identifying the pizza with the slice taken out
How to censor a shape?
What is image segmentation?
How does it work?
Watershed algorithm
Summary
8. Object Tracking
Frame differencing
Colorspace based tracking
Building an interactive object tracker
Feature based tracking
Background subtraction
Summary
9. Object Recognition
Object detection versus object recognition
What is a dense feature detector?
What is a visual dictionary?
What is supervised and unsupervised learning?
What are Support Vector Machines?
What if we cannot separate the data with simple straight lines?
How do we actually implement this?
What happened inside the code?
How did we build the trainer?
Summary
10. Stereo Vision and 3D Reconstruction
What is stereo correspondence?
What is epipolar geometry?
Why are the lines different as compared to SIFT?
Building the 3D map
Summary
11. Augmented Reality
What is the premise of augmented reality?
What does an augmented reality system look like?
Geometric transformations for augmented reality
What is pose estimation?
How to track planar objects?
What happened inside the code?
How to augment our reality?
Mapping coordinates from 3D to 2D
How to overlay 3D objects on a video?
Let's look at the code
Let's add some movements
Summary
3. Module 3
1. Fun with Filters
Planning the app
Creating a black-and-white pencil sketch
Implementing dodging and burning in OpenCV
Pencil sketch transformation
Generating a warmin...

Indice dei contenuti