Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
OpenCV: Master OpenCV 3 Application Development Using Python
Rating: 3.2 out of 5(32 ratings)
291 students

OpenCV: Master OpenCV 3 Application Development Using Python

Build computer vision OpenCV 3 applications with Python
Last updated 6/2018
English

What you'll learn

  • Build an Image Search Engine from Scratch based on feature extraction
  • Build an Android selfie camera app with emotion-based selfie filters
  • Build an Android App to generate panoramas with HDR and AR capabilities
  • Learn how to make a car learn how to drive itself based on imitation learning
  • Explore the new OpenCV functions for text detection and recognition with Tesseract
  • Get to grips with the computer vision workflows and understand the basic image matrix format and filters

Course content

3 sections92 lectures9h 18m total length
  • The Course Overview5:49

    This video gives an overview of the entire course.

  • The Human Visual System and Understanding Image Content4:56

    Before we jump into OpenCV functionalities, we need to understand why those functions were built. Let’s understand how the human visual system works so that we can develop the right algorithms.

    •         Learn how the human eye captures information
    •         See why machines find it difficult to understand image content
  • What Can You Do with OpenCV?12:09

     Real-life problems require us to use many blocks together to achieve the desired result. So, we need to know what modules and functions to use. Let's understand what OpenCV can do out of the box.

    •         Take a look at tasks we can do with OpenCV
  • Installing OpenCV10:17

    Now that we know what tasks we can do with OpenCV, Let’s see how to get OpenCVupandrunning on various operating systems, viz. Windows, Mac and Linux.

    •         Install OpenCV on Windows
    •         Install OpenCV on Mac OS X
    •         Install OpenCV on Linux
  • Basic CMakeConfiguration and Creating a Library4:04

    We are going to use CMake to configure and check all the required dependencies of our project. So, let’s learn basic CMake configuration files and creating a library.

    •         Take a look CMakelists.txt file
    •         Use add_library function
  • Managing Dependencies3:16

    CMake has the ability to search our dependencies and external libraries, giving us the facility to build complex projects depending on external components in our projects and by adding some requirements. One of the most important dependency is, of course, OpenCV. Let’s learn how to add it to our projects.

    •         Add OpenCVdependencyto all projects
  • Making the Script More Complex3:42

     Now that we know managing dependencies, let’s take a look at a bit more complex script. This video we will show us a more complex script that includes subfolders, libraries, and executables, all in only two files and a few lines, as shown in the script.

    •         Define two CMakelists.txt files
    •         Write a new library in the CMakeLists.txt file in the UTILS folder
    •         Use the add_definitions(-DLOG) function
  • Images and Matrices2:33

    The most important structure in computer vision is without any doubt the images. The image in computer vision is a representation of the physical world captured with a digital device. Let’s now learn about images and matrices.

    •         Learn about pixels
    •         Take a look at matrix format and matrix storage
  • Reading/Writing Images5:07

    After the introduction of matrix, we are ready to start with the basics of the OpenCV code. This video will guide us how to read and write images.

    •         Take a look at imread and IM imwrite function
    •         Use .cols and .rows attributes of a matrix
    •         Useimshow function to show the image
  • Reading Videos and Cameras3:09

    We now know how to read and write images but reading video can be a bit tricky. This video introduces us reading a video and camera with simple example.

    •         Take a look at the Command Line Parser class
    •         Use the .get function
    •         Show the frames with the named Window function
  • Other Basic Object Types2:03

    We have learned about the Mat and Vec3b classes, but we need to learn about otherclasses as well. In this video, we will learn about the most basic object types required in most of the projects.

    •         Take a look at different object types
  • Basic Matrix Operations, Data Persistence, and Storage4:39

    In many applications, such as calibration or machine learning, when we are done with the calculations, we need to save the results in order toretrieve them in the next executions. Before we finish this section, we will explore the OpenCV functions to storeand read our data.

    •         Use mat constructor
    •         Use zeros, ones, and eye function
    •         Write to a file storage
  • The OpenCVUser Interface and a Basic GUI5:25

     OpenCV has its own cross-operating system user interface that allows developers to create their own applications without the need to learn complex libraries for theuser interface. This video will introduce the OpenCV user interface and help us creating a basic UI with OpenCV.

    •         Learn about the OpenCV user interface
    •         Create a basic user interface with OpenCV
  • The Graphical User Interface with QT1:49

     The QT user interface gives more control and options to work with images. Let’s explore the interface and learn how to use it.

    •         Take a look at toolbar buttons
    •         Use displayOverlay function
    •         Learn about status bar
  • Adding Slider and Mouse Events to Our Interfaces4:37

    Mouse events and slider controls are very useful in Computer Vision and OpenCV. Using these controls, users can interact directly with the interface and change the properties of their input images or variables. However, using these controls can be a bit tricky. Let’s see how to use them.

    •         Create a variable to save the slider position
    •         Load an imageand create a new window calledLena
    •         Create the slider
  • Adding Buttons to a User Interface3:56

    Now that we have learned how to create normal or QT interfaces and interact with them using a mouse and slider, let’s see how we can create different types of buttons to add more interactivity.

    •         Create a basic sample with buttons
    •         Apply blur filter, a sobel filter, and a color conversion to gray
  • OpenGL Support4:37

    OpenCV includes OpenGL support which is a graphical library that is integrated in graphic cards as a standard. OpenGL allows us to draw from 2D to complex 3D scenes. This video shows us how to use OpenGL support.

    •         Create a window with OpenGL support
    •         Draw a rotated plane that shows the web camera frames
  • Generating a CMakeScript File1:59

    Prepare a CMake script file that enables us to compile our project, structure, and executable.

    •         Generate CMakeLists.txt file
    •         Finad the OpenCV library and show a message about the OpenCV library version
    •         Add the source files to link them to OpenCV library.
  • Creating the Graphical User Interface2:25

    The main graphical user interface can be used in the application to create single buttons.

    •         Add the required OpenCV headers
    •         Set up the instructions and print the help message
    •         Show the input image and wait for a key press to finish our application
  • Drawing a Histogram4:38

    Histogram is a statistical graphic representation of variable distribution that allows us to understand the density estimation and probability distribution of data.

    •         Create three matrices to process each input image channel
    •         Calculate the histogram using the OpenCVcalcHist function
    •         Show the histogram image with the imshow function
  • Image Color Equalization2:57

    Image equalization obtains a histogram with a uniform distribution of values.

    •         Convert the input BGR image into YCrCb using the cvtColor function
    •         Split the YCrCb image into different channels matrices
    •         Merge the resulted channels and convert the result to the BGR format
  • Lomography Effect4:18

    Lomography is a photographic effect used in different mobile applications, such as Google Camera or Instagram.

    •         Manipulate the red color with a curve transform
    •         Split our input image by channels using the split function
    •         Convert the flat image matrix result to an 8-bit image
  • The CartoonizeEffect4:56

    The Cartoonize effect creates an image that looks like a cartoon

    •         Detect the most important edges of the image
    •         Multiply our edges' result image by the color image
    •         Merge the color and edges' results
  • Isolating Objects in a Scene2:22

    Isolating different parts or objects in a scene.

    •         Preprocess The image
    •         Segment the image
  • Creating an Application for AOI1:49

    Create our new application.

    •         Enable user selection using command line parser class
    •         Checks the parameters
    •         Check whether the input image is correctly loaded
  • Preprocessing the Input Image9:17

    Extract the information from image.

    •         Remove noise
    •         Remove the background using the light pattern
    •         Binarize the image
  • Segmenting Our Input Image11:19

    Extract each region of interest of our image where our target objects appear.

    •         Apply each algorithm to the next binarized image
    •         Return an integer with the number of detected labels
    •         Draw each detected contour that we detect
  • Introducing Machine Learning Concepts7:05

    Pattern recognition and the learning theory in artificial intelligence and are related to computational statistics.

    •         Use a supervisedlearning classification algorithm
    •         Learn and Categorize results obtain from machine learning
  • Computer Vision and the Machine Learning Workflow2:46

     We will learn how to implement our own application that uses machine learning to classify objectsin a slide tape.

    •         See the basic structure of Computer Vision applications with machine learning
    •         Preprocess involves light removal conditions, noise, thresholding, blur and so on
    •         Extract the regions of image and isolate each one as a unique object
  • Automatic Object Inspection Classification Example2:21

    We will be able to recognize different objects to send notifications to a robot or put each one in different boxes.

    •         Preprocessand Segment the image
    •         Create an SVM model and train our SVM model with the training feature vector.
    •         For each object detected: Extract the features and predict with an SVM model
  • Feature Extraction11:25

     To extract the features of each object

    •         We will create a function that has one image as the input and returns two vectors of left and top position for each object detected in the image as parameters
    •         We need to create the output vector variable and contours variable that are to be used in our FindContoursalgorithm segmentation
    •         Show the detected objects in a window for the user feedback

  • Understanding Haar Cascades4:32

    It is simply a concatenation of a set of weak classifiers that can be used to create a strong classifier.

    •         Extract these features
    •         Pass them through a cascade of classifiers
    •         Check all the different rectangular sub regions and keep discarding the ones that don't have faces in them
  • What Are Integral Images2:57

    You have to avoid huge redundancy during the area computation, to avoid this, we can use integral images

    •         Pick up the right values
    •         Substitute them in the previous equation
    •         Extract the features
  • Overlaying a Facemask in a Live Video4:26

    You have to load the cascade file and use it to detect the faces in an image.

    •         Read input frames from the webcam
    •         Convert image to grayscale
    •         Extract the region of interest to overlay the mask
  • Get Your Sunglasses On3:23

     You have to overlay sunglass on face.

    •         Run the eye detector
    •         Adjust, the size of the sunglasses
    •         Overlay the sunglasses mask
  • Tracking Your Nose, Mouth, and Ears1:32

    You have to track nose, mouth and ears.

    •         Use a nose detector
    •         Overlay a nose
    •         Cascade files used to track different parts
  • Background Subtraction4:13

    The background subtraction technique performs really well where we need to detect moving objects in a static scene.

    •         Build a model of the background
    •         Background model is then used to detect background pixels
    •         The difference between background model and image is computed
  • Frame Differencing2:53

    We cannot keep a static background image that can be used to detectobjects.

    •         The difference between successive frames and displaying the difference
    •         Take the frame differences and apply a bitwise AND operator
    •         Resize the frame and convert it to grayscale
  • The Mixture of Gaussians Approach3:16

    Formulating and implementing a mixture of gaussians.

    •         Identify whether the data has multiple groups inside the subpopulation
    •         We represent each subpopulation using the Gaussian function
  • Morphological Image processing3:22

     Morphological Image processing is used in processing the shapes of features in the image.

    •         Use a structuring element to modify an image
    •         Use erosion operation
    •         Use dilation operation
  • Other Morphological Operators4:18

     To apply various morphological operators on image.

    •         Apply erosion followed by dilation
    •         use the morphological gradient
    •         Apply Top-Hat transform and Black Hat transform
  • Tracking Objects of a Specific Color3:18

    Understand what characteristics can be used to make our tracking robust and accurate.

    •         Use colorspaces to come up with a good visual tracker
    •         Take the pixels of an image to the HSV space
    •         Use colorspace distances and threshold in this space thresholding to track a given object
  • Building an Interactive Object Tracker5:56

    We want to randomly pick an object, learn the characteristics of the selected object and track it automatically.

    •         Select a bunch of points based on the color histogram
    •         We move the bounding box of the object to a new location so that the new centroid becomes the center
    •         Use CAMShift algorithm
  • Detecting Points Using the Harris Corner Detector3:28

    Detect interest points in the image.

    •         Construct a 2 x 2 matrix based on partial derivatives
    •         Check whether this patch has a corner in it
    •         Compute the intensity difference between our patch and all those neighboring patches
  • Shi-Tomasi Corner Detector2:24

    Improve the overall quality of image

    •         Find the N strongest corners in the given image
    •         Use goodFeaturesToTrackto detect the corners
    •         Draw circles on these points to display the output image
  • Feature-Based Tracking8:21

    Tracking individual feature points across successive frames in the video.

    •         Choose a bunch of feature points
    •         Track them through the video stream
    •         Compute the displacement vectors and show the motion of those key points
  • Introducing Optical Character Recognition2:41

    Basics of OCR.

    •         Text preprocessing and segmentation
    •         Text identification
  • The Preprocessing Step10:00

    Classification results can be improved greatly if the input text is clear so Adjust the text.

    •         Threshold the image
    •         Text segmentation
    •         Text extraction and skew adjustment
  • Installing Tesseract OCR on Your Operating System6:22

    Install Tesseract on Windows or Mac.

    •         Download the installer
    •         Choose a suitable location for your installation
    •         set up Tesseract dependencies
  • Using Tesseract OCR Library8:07

    Studying tesserct API.

    •         Create a OCR function
    •         Call the SetImagemethod with the signature
    •         Send the output to a file

Requirements

  • Familiarity with OpenCV's concepts and Python libraries is assumed
  • Basic knowledge of Python programming is expected and assumed.
  • Basic understanding of computer vision and image processing will be useful

Description

OpenCV is a cross-platform, used for real-time computer vision and image processing. It is one of the best open source libraries that helps developers focus on constructing complete projects on image processing, motion detection, and image segmentation.

This comprehensive 3-in-1 course is a step-by-step tutorial to developing real-world computer vision applications using OpenCV 3 with Python. Program advanced computer vision applications in Python using different features of the OpenCV library. Boost your knowledge of computer vision and image processing by developing real-world projects in OpenCV 3 with Python.

Contents and Overview

This training program includes 3 complete courses, carefully chosen to give you the most comprehensive training possible.

The first course, OpenCV 3 by Example, covers a practical approach to computer vision and image processing by developing real-world projects in OpenCV 3. This course will teach you the basics of OpenCV such as matrix operations, filters, and histograms, as well as more advanced concepts such as segmentation, machine learning, complex video analysis, and text recognition. You’ll create optical flow video analysis or text recognition in complex scenes, and learn computer vision techniques to build your own OpenCV projects from scratch.

The second course, Practical OpenCV 3 Image Processing with Python, covers amazing computer vision applications development with OpenCV 3. This course will teach you how to develop a series of intermediate-to-advanced projects using OpenCV and Python, rather than teaching the core concepts of OpenCV in theoretical lessons. Working projects developed in this video teach you how to apply theoretical knowledge to topics such as image manipulation, augmented reality, object tracking, 3D scene reconstruction, statistical learning, and object categorization.

The third course, Hands-on TensorFlow Lite for Intelligent Mobile Apps, covers development of advanced OpenCV3 projects with Python. This course will teach you how to to perform 3D reconstruction by stitching multiple 2D images and recovering camera projection angles. You’ll learn to capture facial landmark points and recognize emotion in images, including in real time. You’ll generate a panorama of a scene and augment a camera view with virtual objects.

By the end of the course, you’ll boost your knowledge of computer vision and image processing and develop real-world applications in OpenCV 3 with Python.

About the Authors
  • David Millán Escrivá was eight years old when he wrote his first program on an 8086 PC with Basic language, which enabled the 2D plotting of basic equations. In 2005, he finished his studies in IT through the Universitat Politécnica de Valencia with honors in human-computer interaction supported by computer vision with OpenCV (v0.96). He had a final project based on this subject and published it on HCI Spanish congress. He participated in Blender, an open source, 3D-software project, and worked on his first commercial movie Plumiferos - Aventuras voladorasas, as a Computer Graphics Software Developer. David now has more than 10 years of experience in IT, with experience in computer vision, computer graphics, and pattern recognition, working on different projects and start-ups, applying his knowledge of computer vision, optical character recognition, and augmented reality. He is the author of the DamilesBlog, where he publishes research articles and tutorials about OpenCV, computer vision in general, and Optical Character Recognition algorithms. David has reviewed the book gnuPlot Cookbook, Packt Publishing, written by Lee Phillips.
  • Prateek Joshi is an Artificial Intelligence researcher, the published author of five books, and a TEDx speaker. He is the founder of Pluto AI, a venture-funded Silicon Valley startup building an analytics platform for smart water management powered by deep learning. His work in this field has led to patents, tech demos, and research papers at major IEEE conferences. He has been an invited speaker at technology and entrepreneurship conferences including TEDx, AT&T Foundry, Silicon Valley Deep Learning, and Open Silicon Valley. Prateek has also been featured as a guest author in prominent tech magazines. His tech blog has received more than 1.2 million page views from over 200 countries and has over 6,600+ followers. He frequently writes on topics such as Artificial Intelligence, Python programming, and abstract mathematics. He is an avid coder and has won many hackathons utilizing a wide variety of technologies. He graduated from University of Southern California with a Master's degree, specializing in Artificial Intelligence. He has worked at companies such as Nvidia and Microsoft Research. You can learn more about him on his personal website.
  • Vinícius Godoy is a computer graphics university professor at PUCPR. He started programming with C++ 18 years ago and ventured into the field of computer gaming and computer graphics 10 years ago. His former experience also includes working as an IT manager in document processing applications in Sinax, a company that focuses in BPM and ECM activities, building games and applications for Positivo Informática, including building an augmented reality educational game exposed at CEBIT and network libraries for Siemens Enterprise Communications (Unify). As part of his Master's degree research, he used Kinect, OpenNI, and OpenCV to recognize Brazilian sign language gestures. He is currently working with medical imaging systems for his PhD thesis. He was also a reviewer of the OpenNI Cookbook, Packt Publishing. He is also a game development fan, having a popular site entirely dedicated to the field called Ponto V. He is the cofounder of a startup company called Black Muppet. His fields of interest includes image processing, Computer Vision, design patterns, and multithreaded applications.
  • Riaz Munshi has a Bachelor's and a Master's degree in Computer Science from University of Buffalo, NY. He is a computer vision and machine learning enthusiast. Riaz has 3.5 years' experience working on challenging problems in mobility, computing, and augmented reality. He has a solid foundation in Computer Science, with strong competencies in data structures, algorithms, and software design. Currently he works at Yahoo as a software engineer, exploring use-cases that harness the power of AR to control robots. He makes robots perform more efficiently at their job by guiding them remotely via holograms.

Who this course is for:

  • Software developer with a basic understanding of computer vision and image processing and want to develop interesting computer vision applications with OpenCV.
  • Anyone with a basic knowledge of OpenCV who would like to enhance their knowledge to develop advanced practical applications