Build real-world computer vision applications and develop cool demos using OpenCV for Python
About This Book
- Learn how to apply complex visual effects to images using geometric transformations and image filters
- Extract features from an image and use them to develop advanced applications
- Build algorithms to help you understand the image content and perform visual searches
Who This Book Is For
This book is intended for Python developers who are new to OpenCV and want to develop computer vision applications with OpenCV-Python. This book is also useful for generic software developers who want to deploy computer vision applications on the cloud. It would be helpful to have some familiarity with basic mathematical concepts such as vectors, matrices, and so on.
What You Will Learn
- Apply geometric transformations to images, perform image filtering, and convert an image into a cartoon-like image
- Detect and track various body parts such as the face, nose, eyes, ears, and mouth
- Stitch multiple images of a scene together to create a panoramic image
- Make an object disappear from an image
- Identify different shapes, segment an image, and track an object in a live video
- Recognize an object in an image and build a visual search engine
- Reconstruct a 3D map from images
- Build an augmented reality application
Computer vision is found everywhere in modern technology. OpenCV for Python enables us to run computer vision algorithms in real time. With the advent of powerful machines, we are getting more processing power to work with. Using this technology, we can seamlessly integrate our computer vision applications into the cloud. Web developers can develop complex applications without having to reinvent the wheel.
This book will walk you through all the building blocks needed to build amazing computer vision applications with ease. We start off with applying geometric transformations to images. We then discuss affine and projective transformations and see how we can use them to apply cool geometric effects to photos. We will then cover techniques used for object recognition, 3D reconstruction, stereo imaging, and other computer vision applications.
This book will also provide clear examples written in Python to build OpenCV applications. The book starts off with simple beginner's level tasks such as basic processing and handling images, image mapping, and detecting images. It also covers popular OpenCV libraries with the help of examples.
The book is a practical tutorial that covers various examples at different levels, teaching you about the different functions of OpenCV and their actual implementation.
Style and approach
This is a conversational-style book filled with hands-on examples that are really easy to understand. Each topic is explained very clearly and is followed by a programmatic implementation so that the concept is solidified. Each topic contributes to something bigger in the following chapters, which helps you understand how to piece things together to build something big and complex.
Downloading the example code for this book You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.
Table of Contents
OpenCV with Python By Example
- Table of Contents
- OpenCV with Python By Example
- About the Author
- About the Reviewers
1. Applying Geometric Transformations to Images
- Installing OpenCV-Python
- Reading, displaying, and saving images
- Image color spaces
- Image translation
- Image rotation
- Image scaling
- Affine transformations
- Projective transformations
- Image warping
2. Detecting Edges and Applying Image Filters
- 2D convolution
- Edge detection
- Motion blur
- Erosion and dilation
- Creating a vignette filter
- Enhancing the contrast in an image
- 3. Cartoonizing an Image
4. Detecting and Tracking Different Body Parts
- Using Haar cascades to detect things
- What are integral images?
- Detecting and tracking faces
- Fun with faces
- Detecting eyes
- Fun with eyes
- Detecting ears
- Detecting a mouth
- It's time for a moustache
- Detecting a nose
- Detecting pupils
5. 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)
- 6. Creating a Panoramic Image
- 7. Seam Carving
- 8. Detecting Shapes and Segmenting an Image
- 9. Object Tracking
10. 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?
- How do we actually implement this?
- 11. Stereo Vision and 3D Reconstruction
12. 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?
- How to augment our reality?
- Let's add some movements
- Title: OpenCV with Python By Example
- Release date: September 2015
- Publisher(s): Packt Publishing
- ISBN: 9781785283932