
This video provides an overview of the entire course.
Before you get a kick start with a new technology, it is always a good practice to have an overview of it. Also, it adds to the motivation in learning, in the long run. This video, will provide you with those pair of eyes on OpenCV 4.
Understand what OpenCV is
Explore the scope and working principles
This video will walk you through a few simple steps, to let you install all dependencies to carry out the contents of this course fluidly.
Download Python3
Create a virtual environment
Download packages (opencv, scikit-learn, etc)
This video will be your first interaction with the OpenCV library where you will explore a few elementary operations on images and videos.
Get video/image input
Implement color space conversions
Use image Processing techniques
To locate movement in a video, we will employ the concept of image differences and learn to visualize it, by extending the same concept to video streams.
Calculate image differences
Extend to videos
The most important part of this app is to perform an action when it indeed detects motion, and that is exactly what we will do in this video.
Apply masks
Define the metric to trigger actions
Before we can begin to code this app, there are a few fundamentals we would need to learn. This video serves exactly this purpose!
Understand what a Histogram is
Understand what Back-projection is
Our first task is to read the video source and preprocess it so that we can segment and display only the hand. Let’s go ahead and do it now!
Calculate Skin Histograms using the cv2 library function
Use the histogram and apply back-projection on image
Remove noise using image processing
Let us take a step further and use the Histogram obtained from the previous video to locate all occurrences of skin in the forthcoming video frames.
Back-project the histogram on an image
Apply post-processing to the back-projected image to enhance it
Perform dilation, and erosion
Once we segment the hand, we need to outline its boundaries and display it so that we can quantify its location.
Implement Contour Extraction Algorithms
Find the largest contour
Draw the contour and display the image
The Contours of the hand can be used to extract a lot of useful information, like the location or coordinates of fingertips
Find the Convex Hull of the hand contour
Compute the Convexity Defects
Defect analysis to obtain fingertips
Our hand recognition library is now written, we can make use of it to make an application which translates hand gestures to onscreen hand writing.
Make surface to draw on
Use our API to locate the first fingertip
Use the location of the fingertip to draw on screen
In order to automatically pause and resume video playback, we need to detect keep track of the user’s face
Introduction to Haar Cascades
Using Haar Cascades to detect faces in live video
Drawing the bounding boxes of detected faces
Using a pre trained eye Haar cascade to detect eyes within the face
Using Haar Cascades to detect eyes in live video
Drawing the bounding boxes of eyes
We now have to trigger an action based on the user’s face position. The action has to pause/play video playback.
Defining the triggers
Tracking the states of the user’s face
Using GUI automation to send keyboard triggers from python to VLC
This video gives you a brief introduction to Deep Learning and neural networks
Explore Neural Network Architecture
Learn about Convolutional Neural Networks
Know the applications of Deep Leaning in Computer Vision
In this video, we will be discovering and learning about the pre-trained object detection model which we will use.
Load the model into our program and integrating with OpenCV
Design the high level pipeline for object detection
In this video, we will be loading the image, preprocessing it and feeding it into the pre-trained model and running detection on it.
Run detection on pre-processed image
Draw the bounding boxes
In this video, we are going to extend the concept of object detection from images to videos, to make application real-time
Define a video source – local file, web cam, external camera
Break video into frames
Run detection on individual frames
This video gives you an introduction to OCR, its applications and some necessary fundamentals like HOG and feature extraction.
Understand what OCR is
Learn about Histogram of Oriented Gradients (HOG)
To make an OCR app, we would need to train a machine learning algorithm which will be able to classify digits. So, let’s go ahead and do it right now!
Obtain the MNIST dataset
Compute the Histogram of Oriented Gradients
Train a KNN Classifier using the dataset
In this two-part video, we will create high level functions which a program can use in order to perform OCR on an image
Isolate each digit in a given image
Preprocess and computing HOG for each digit
Predict using the trained KNN classifier
We continue from where we left off in the previous part, and design more functions to complete the OCR Engine.
Isolate each digit in a given image
Preprocess and compute HOG for each digit
Predict using the trained KNN classifier
This app will calculate the square the number in the image and display it
Use the OCR Engine to interact with the image
Predict the number and performing some calculation
This video will give you an overview about the course.
In this video, you will see installation of Python, Virtualenv, Jupyter, and OpenCV.
Look at Downloading Python
Install OpenCV and Jupyter Notebook
Activate Virtual Environment
This video will read image from files.
Import OpenCV
Set the path
Read the image
This video will show you how to resize and flip the images.
Resize the image using OpenCV’s resize function
Flip the image on horizontal and vertical axis
Display using matplotlib
In this video, you will see how to save the images to disk.
Import OpenCV
Read image from the file
Save in the current directory
This video will show images using WINDOW_NORMAL and WINDOW_AUTOSIZE flags.
Import OpenCV, and reading image from the file
Differentiate between flags
Display the images
In this video, you will see how to draw lines, rectangle, and circle and adding text to image.
Import OpenCV and read image from the file
Use OpenCV’s line, rectangle, circle, and puttext functions
This video will show you how to flip the images depending upon user input from a keyboard.
Import OpenCV and read image from the file
Handle user’s input using selection structures
In this video, you will see how to draw circles depending on user’s click from a mouse.
Import OpenCV and read image from the file
Explore OpenCV’s Mouse Events
Create and attach mouse callback to window
This video will capture and show frame from a camera.
Use Built-in webcam to capture a frame
Display the size of the captured frame
Display the frame on screen
In this video, you will play frame stream from video.
Import OpenCV and set the video path
Play a video using while loop
In this video, you will see creation and initialization of matrices, access to its elements, pixels, and also how we can work with part of a matrix.
Create a matrix and fill it with 255 as a value
Set some individual pixels' values to white
Set the second channel of all pixels inside a certain region to 255
This video will explain you how to change the data type of matrix elements from uint8 to float32and perform arithmetic operations without worrying about clamping values.
Convert our image to one with floating data type elements
Scale the elements of our image by 2 and clip the values
Scale the elements of our image back
This video will explain you how to save any matrix (not only with image content) of any type and shape with NumPy's data persistence.
Create a matrix with random values
Save our random matrix
Load it from the file
In this video you will see getting access to individual channels, swapping them, and performing algebraic operations.
Import all necessary modules
Swap the red and blue channels
Swap the channels back and scale them differently
This video will explain you how to change the color space of an image.
Load an image
Convert the image to grayscale
Convert the image to HSV
In this video, you will see how to compute histograms.
Load the image as grayscale
Compute a histogram function
Plot histogram and display it
This video will explain you how to get rid of noise or dramatically decrease it.
Load an image, convert it to floating-point, and scale it down
Create noise in the image
Apply GaussianBlur to the noisy image
In this video, you will see how to create your own linear filter and apply it to images.
Read the test image
Create an 11x11 sharpening kernel
Filter the image using the kernel
In this video you will learn how to construct a Gabor filter kernel (useful for detecting edges in images) and apply it to an image.
Read the test image
Apply a simple binary threshold
Apply adaptive thresholding
This video will show you conversion of grayscale image into a binary image using different thresholding approaches.
Read the test image
Apply erosion and dilatation
Visualize the results
In this video, you will learn how to apply basic morphological operations to binary images.
Create a binary image with a circle mask
Create a binary image with a rectangle mask
Combine the circle and rectangle masks using a bitwise AND operator
This video will explain you how to binarize grayscale images using the Otsu algorithm resulting an image with only two colors; white and black.
Read the test image
Estimate the threshold using Otsu's method
And lastly, visualize the results
This video will explain you how to find external and internal contours in a binary image and learn about findContours function.
Load the test binary image
Find the external and internal contours
Visualize the results
In this video, you will see how to extract connected components from a binary image using OpenCV’s built-in function.
Open an image and find the connected components in it
Open another image, find its Otsu mask, & get connected components
Filter out the components with small areas and create a color image
In this video, you will see fitting lines and circles into two-dimensional point sets using fitEllipse and fitLine functions.
Draw and randomly generate parameters of the ellipse
Draw out the ellipse and generated points on the image
Draw the result, and display the image
This video will calculate image moments using a simple OpenCV built-in function.
Draw a test image—a white ellipse
Compute the moments and print their values
Perform a simple test to check whether the computed moments make sense
In this video, you will check whether a point is within a contour or not using pointPolygonTest function.
Find the contours of the image and display them
Define a callback function to handle a user click on the image
Show the image with our mouse click handler
This video will explain you how to compute distance between the maps and depict the results with gradient around the circle.
Draw a test image—a black circle
Compute the distance from every point to the circle
Visualize the results
In this video, you will see segmentation of pixels in different clusters using k-means algorithm.
Open an image and convert it to Lab color space
Perform k-means clusterization
Display the original and segmented images together
In this video, we’ll use OpenCV’s built-in functions for warping an image using affine and perspective transformations.
Define two functions to implement the process of points selection
Compute the affine transformation
Compute the perspective transformation
In this video, we’ll take two images from a window and try stitching them into Panorama.
Load the images we're going to combine into a panorama
Create a Panorama Stitcher and pass our images to it
Display the result
This video will leverage OpenCV to remove defects such as marks, ink and spots from a photo with image inpainting.
Define a class that encapsulates mask creation
Create its defect version and a mask
Apply inpaint algorithms
In this video, we’ll be finding corners in an image using Harris and FAST from OpenCV.
Load an image and find its corners with cv2.cornerHarris()
Create a FAST detector and apply it to the image
Display the results
This video will compute descriptors for image keypoints using SURF and SIFT’s alternative called ORB
Load modules and open image
Use SURF, BRIEF, and ORB for feature detection and description
Display the results
In this video, we’ll separate an object from other parts of a scene. In other words, where we want to create masks for the foreground and background.
Open an image
Define the mouse callback function
Call cv2.grabCut() to create an object mask
In this video, we’ll learn how to detect edges in images using the Canny algorithm.
Load the test image
Detect the edges using the Canny algorithm
Visualize the results
In this video, we’ll learn how to apply the Hough transform for the detection of lines and circles.
Detect lines using the probabilistic Hough transform
Detect circles using the Hough transform
Visualize the results
In this video, we’ll consider the methods for finding objects on the image which correspond to some of the template.
Load the test image
Use cv2.matchTemplate function
Visualize the results
In this video, we're going to apply the Median Flow object tracker to track objects.
Open a video file and read its frame
Create the Median Flow tracker and initialize it
Visualize the results
In this video, we’ll learn how to use the different tracking algorithms implemented in the OpenCV tracking contribution module.
Create the main window and loop over the different trackers
Open the test video file and select an object
Track until the video ends
In this video, we’ll find out how to compute and display the dense optical flow in several ways, using OpenCV functionality.
Define the function to display the optical flow
compute the dense optical flow using Gunnar Farneback's algorithm
Visualize the results
In this video, we’ll learn how to detect chessboard and circle grid patterns.
Load the test image with a chessboard
Detect the chessboard pattern
Detect the circle grid pattern
In this video, we’ll learn how to detect pedestrians using a pre-trained SVM model with HOG features.
Load the test image
Create the HOG feature computer and detector
Visualize the results
In this video, we'll learn how to train KNN- and SVM-based digit recognition models.
Prepare the train and test data (features and labels)
Create a KNN & SVM model
Evaluate the KNN and SVM models
In this video, we’ll learn how to detect faces using OpenCV’s HAAR cascades.
Load the test image
Invokes a detector to find all of the faces in the image
Visualize the results
In this video, we’ll understand how to detect QR codes and remove perspective distortions to get a canonical view of the codes.
Load the test image
Find the outer corners of the QR code
Show the code corners and un-warp the code to get a canonical view
In this video, you’ll learn how to convert an image to a tensor.
Read the image
Turn HWC into CHW
Add a new dimension to make it NCHW
This video loads model from different deep learning frameworks.
Import the modules
Load models using OpenCV’s built-in functions
Display data-type of returned objects
This video will preprocess the images before inserting it to neural network.
Load an image
Explore OpenCV’s blobFromImage function
Use setInput() and forward() functions on CNN model
This video will explain what ImageNet is and how to download images from ImageNet.
Provide keyword for the dataset required
Fetch a list of URLs of all the images
In this video, we’ll learn what annotation is and when it’s used.
Introduction to data annotation
Download and run LabelImg tool
Annotate an image using LabelImg tool
This video will give you a basic idea of dataset augmentation and how it’s applied
Why we need Dataset augmentation
Operations like flip, rotate and translations
In this video, we’ll try to classify the space-shuttle video accurately.
Import the modules
Load the model
Pass each from the video to the model
We’ll detect the vehicles in a video with high accuracy.
Use readNetFromCaffe function
Set a confidence threshold
Detect and display the results
This video segments the regions in a picture.
Use readNetFromCaffe function
Compute image with per-pixel class labels
Segment and display the results
This video gives you an intro to Open Model Zoo. There are pre-trained deep learning models and samples.
Study OpenVINO Toolkit
Introduce Open Model Zoo
This video will show you ONNX (Open Neural Network Exchange), which is an open source artificial intelligence ecosystem.
Learn more about ONNX
G-API is used to declare image processing task in form of expression and then submit it for execution.
Learn more about G-API
Developing an Age and Gender Recognition system using OpenCV.
Use cv2.dnn.readNetFromCaffe to load a trained model
Use cv2.resize() and np.transpose() to subtract source image
Classify Gender and Age Group
This video develops a Face Detection & Emotion Recognition system.
Use cv2.CascadeClassifier() to load classifier for haarcascade
Use Keras emotion classifier for emotion detection
Visualize the results
Human detection task involves both identification of the presence of the objects and identification of the rectangular boundary surrounding each object.
Use readNetFromCaffe function
Set a confidence threshold to detect Human
Detect and display the results
In this video, we give a brief study of pre-trained models for vehicle detection and Roadside Objects identification.
Look at the advanced application with OpenVINO
A brief introduction to the course, its contents and flow. You will get a gist of what this course has to offer you.
An overview of Machine Learning on visual data like images and videos, its applications and impact.
Brief discussion on ML
Real Life examples of ML on visual data
Installing all dependencies to carry out the contents of this course fluidly
Install Python 3.6
Create a virtual environment
Download packages (opencv, scikit-learn, etc)
In order to perform operations on images, we first need to know how to load them into our program
Use the imread() function to read images
Break a video into smaller frames and reading them
Learn about different types of color spaces and convert from one format to the other. Along with that you will see how to perform binary thresholding on grayscale images.
Change colorspaces
Use binary thresholding
Resize and save an image
OpenCV provides functions to draw objects and shapes on images. Let’s explore these amazing function now!
Draw Rectangles
Drawg Circles
Write text on images
Machine learning can be either done in a supervised way or in an unsupervised way. In this video, we look at the supervised approach.
Learn different categories of Learning algorithms
Understand what is Supervised Learning is
Explore few examples
We explore two famous supervised learning algorithms and see how they work internally.
Learn how KNN works
Learn how SVM works
To put the ML algorithms to test, we use the Quick, Draw Dataset! from Google. We write some code to visualize the dataset and then look at the steps to establish a ML pipeline.
Download the dataset
Visualize the dataset
Implement step to establish an ML pipeline
Use the scikit-learn library to train a ML model on the Quick, Draw! Dataset, using both KNN and SVM
Preprocess dataset
Build the training and testing sets
Train the model, using both KNN and SVM
Differences between the supervised learning approach and unsupervised learning is discussed in this video
Get introduced to Unsupervised Learning
Understand the differences between the two
In this video, we will discuss in detail what clustering is and how the K Means algorithm works to train on an unlabeled dataset.
Explore clustering
Learn how to use Euclidean distance to measure similarity
Look into the implementation of the K Means algorithm
We now use the scikit-learn library to perform binary classification using the K Means Algorithm on the Quick, Draw! Datatset.
Use K Means in scikit-learn
Visualize the clustered dataset
Classify test images
In order to perform Object Detection using Color, we will first need to understand what a Histogram is. Then, we can apply BackProjection to segment out the image based on color.
Understand what a Histogram is
Learn what Backprojection is
In this video, we detect an object in a live video feed based solely on its color. We get its coordinates and draw bounding boxes as well
Capture histogram of the object color
Perform Segmentation using Backprojection
Get Contours and bounding rectangles
In this video we discuss what a Haar Cascade is, and how it works.
Get an in-depth understanding of what a Haar Cascade is
Understand how does it work
In this video, we are going to use a pre-trained Haar Cascades to detect Cat faces in images and videos
Load the classifier
Perform detection on images
Draw bounding boxes
How has Deep Learning impacted the way we look at Computer Vision and the role of Convolutional Neural Networks in doing so.
Learn what a CNN is
Know the important Applications of CNNs in Computer Vision
In order to detect objects, we need a deep learning model which has already been trained and integrate it with OpenCV
Import a pre-trained model which is stored locally
Use the model to run detection on images
TensorFlow is a Deep Learning library by Google and it provides an API for a user to train their own custom object detector.
Get introduced to the API
Implement the steps to train a custom object detector
In order to train our object detector, we first need to train it with a lot of images of our object. In this video, we download these images and annotate them.
Download Images
Understand what annotating is
Use LabelImg / RectLabel to annotate images
In order to train our model, we need to convert the dataset into a format which Tensorflow understands – TFRecords. Then we choose and download a base model for re-training.
Generate TFRecords
Choose and download Base Model
Start Training
Now that the training is complete, in order to use our model, we need to export it into a usable format.
Export the Inference Graph
Test the Model
The application of Machine Learning and Deep Learning is rapidly gaining significance in Computer Vision. OpenCV lies at the intersection of these topics, providing a comprehensive open-source library for classic as well as state-of-the-art Computer Vision and Machine Learning algorithms. If you wish to build systems that are smarter, faster, sophisticated, and more practical by combining the power of Computer Vision, Machine Learning, and Deep Learning with OpenCV 4, then you should surely go for this Learning Path.
This hands-on course on OpenCV not only helps you learn computer vision and ML with OpenCV 4 but also enables you to apply these skills to your projects. You will firstly set up your development environment for building 5 interesting computer vision applications for Face and Eyes detection, Emotion recognition, and Fast QR code detection. You will then explore essential machine learning and deep learning concepts such as supervised learning, unsupervised learning, neural networks, and learn how to combine them with other OpenCV functionality for image processing and object detection. Along the way, you will also get some tips and tricks to work efficiently.
Contents and Overview
This training program includes 3 complete courses, carefully chosen to give you the most comprehensive training possible.
The first course, Hands-On OpenCV 4 with Python, is designed for you to develop some real-world computer vision applications. You will begin with setting up your environment. You will then build five exciting applications. You will also be introduced to all necessary concepts and then moving into the field of Artificial Intelligence (AI) and deep learning such as classification and object detection with OpenCV 4.
The second course, OpenCV 4 Computer Vision with Python Recipes, starts off with an introduction to OpenCV 4 and familiarizes you with the advancements in this version. You will learn how to handle images, enhance, and transform them. You will also develop some cool applications including Face and Eyes detection, Emotion recognition, and Fast QR code detection & decoding which can be deployed anywhere.
The third course, Hands-On Machine Learning with OpenCV 4, will immerse you in Machine Learning and Deep Learning, and you'll learn about key topics and concepts along the way.
By the end of this course, you will be able to tackle increasingly challenging computer vision problems faced in day-to-day life and leverage the power of machine learning algorithms to build machine learning systems and computer vision applications that are smarter, faster, more complex, and more practical.
Meet Your Expert(s):
We have the best work of the following esteemed author(s) to ensure that your learning journey is smooth:
Colibri Digital is a technology consultancy company founded in 2015 by James Cross and Ingrid Funie. The company works to help their clients navigate the rapidly changing and complex world of emerging technologies, with deep expertise in areas such as Big Data, Data Science, Machine Learning, and Cloud Computing. Over the past few years, they have worked with some of the world's largest and most prestigious companies, including a tier 1 investment bank, a leading management consultancy group, and one of the world's most popular soft drinks companies, helping each of them to better make sense of their data, and process it in more intelligent ways.
The company lives by their motto: Data -> Intelligence -> Action.
Sourav Johar has over two years of experience with OpenCV and over three years of experience coding in Python. He has also developed an open source library built on top of OpenCV. Along with this, he has developed several Deep Learning solutions, using OpenCV for video analysis. As a computer vision enthusiast, he completely understands what problems students face. He is very passionate about programming and enjoys making programming tutorials on YouTube. He is currently working for Colibri Digital (@colibri_digital) as an instructor.
Muhammad Hamza Javed is a self-taught Machine Learning engineer, an entrepreneur and an author having over five years of industrial experience. He and his team has been working on several Computer Vision and Machine Learning international projects. He started working when he was 17 and kept learning new technologies and skills since then. His areas of expertise include Computer Vision, Machine Learning and Deep Learning. He learned skills own his own without a direct mentor - so he knows how troublesome it is for everyone to find to-the-point content that really improves one’s skill-set. He’s designed this course considering the challenges he faced when he learned and, in the projects, so you don’t have to spend too much time on finding what’s best for you.