Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
OpenCV 4 with Python Blueprints

You're reading from   OpenCV 4 with Python Blueprints Build creative computer vision projects with the latest version of OpenCV 4 and Python 3

Arrow left icon
Product type Paperback
Published in Mar 2020
Publisher Packt
ISBN-13 9781789801811
Length 366 pages
Edition 2nd Edition
Languages
Tools
Arrow right icon
Authors (4):
Arrow left icon
Michael Beyeler (USD) Michael Beyeler (USD)
Author Profile Icon Michael Beyeler (USD)
Michael Beyeler (USD)
Dr. Menua Gevorgyan Dr. Menua Gevorgyan
Author Profile Icon Dr. Menua Gevorgyan
Dr. Menua Gevorgyan
Michael Beyeler Michael Beyeler
Author Profile Icon Michael Beyeler
Michael Beyeler
Arsen Mamikonyan Arsen Mamikonyan
Author Profile Icon Arsen Mamikonyan
Arsen Mamikonyan
Arrow right icon
View More author details
Toc

Table of Contents (14) Chapters Close

Preface 1. Fun with Filters 2. Hand Gesture Recognition Using a Kinect Depth Sensor FREE CHAPTER 3. Finding Objects via Feature Matching and Perspective Transforms 4. 3D Scene Reconstruction Using Structure from Motion 5. Using Computational Photography with OpenCV 6. Tracking Visually Salient Objects 7. Learning to Recognize Traffic Signs 8. Learning to Recognize Facial Emotions 9. Learning to Classify and Localize Objects 10. Learning to Detect and Track Objects 11. Profiling and Accelerating Your Apps 12. Setting Up a Docker Container 13. Other Books You May Enjoy

Planning the app

The final app will consist of the following modules and scripts:

  • gestures: This is a module that consists of an algorithm for recognizing hand gestures.
  • gestures.process: This is a function that implements the entire process flow of hand gesture recognition. It accepts a single-channel depth image (acquired from the Kinect depth sensor) and returns an annotated Blue, Green, Red (BGR) color image with an estimated number of extended fingers.
  • chapter2: This is the main script for the chapter.
  • chapter2.main: This is the main function routine that iterates over frames acquired from a depth sensor that uses .process gestures to process frames, and then illustrates results.

The end product looks like this:

No matter how many fingers of a hand are extended, the algorithm correctly segments the hand region (white), draws the corresponding convex hull (the green line surrounding the hand), finds all convexity defects that belong to the spaces between fingers (large green points) while ignoring others (small red points), and infers the correct number of extended fingers (the number in the bottom-right corner), even for a fist.

Now, let's set up the application in the next section.

You have been reading a chapter from
OpenCV 4 with Python Blueprints - Second Edition
Published in: Mar 2020
Publisher: Packt
ISBN-13: 9781789801811
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime