In a previous tutorial, we explored using the Support Vector Machine algorithm as one of the most popular supervised machine learning techniques implemented in the OpenCV library. So far, we have seen how to apply Support Vector Machines to a custom dataset that we have generated, consisting of two-dimensional points gathered into two classes. In […]
Archive | OpenCV
Support Vector Machines in OpenCV
The Support Vector Machine algorithm is one of the most popular supervised machine learning techniques, and it is implemented in the OpenCV library. This tutorial will introduce the necessary skills to start using Support Vector Machines in OpenCV, using a custom dataset we will generate. In a subsequent tutorial, we will then apply these skills […]
How to Train a Object Detection Engine with HOG in OpenCV
In the previous post, you saw that OpenCV can extract features from an image using a technique called the Histogram of Oriented Gradients (HOG). In short, this is to convert a “patch” of an image into a numerical vector. This vector, if set up appropriately, can identify key features within that patch. While you can […]
Image Datasets for Practicing Machine Learning in OpenCV
At the very start of your machine learning journey, publicly available datasets alleviate the worry of creating the datasets yourself and let you focus on learning to use the machine learning algorithms. It also helps if the datasets are moderately sized and do not require too much pre-processing to get you to practice using the […]
Extracting Histogram of Gradients with OpenCV
Besides the feature descriptor generated by SIFT, SURF, and ORB, as in the previous post, the Histogram of Oriented Gradients (HOG) is another feature descriptor you can obtain using OpenCV. HOG is a robust feature descriptor widely used in computer vision and image processing for object detection and recognition tasks. It captures the distribution of […]
Image Feature Extraction in OpenCV: Keypoints and Description Vectors
In the previous post, you learned some basic feature extraction algorithms in OpenCV. The features are extracted in the form of classifying pixels. These indeed abstract the features from images because you do not need to consider the different color channels of each pixel, but to consider a single value. In this post, you will […]
Image Feature Extraction in OpenCV: Edges and Corners
In the world of computer vision and image processing, the ability to extract meaningful features from images is important. These features serve as vital inputs for various downstream tasks, such as object detection and classification. There are multiple ways to find these features. The naive way is to count the pixels. But in OpenCV, there […]
K-Nearest Neighbors Classification Using OpenCV
The OpenCV library has a module that implements the k-Nearest Neighbors algorithm for machine learning applications. In this tutorial, you will learn how to apply OpenCV’s k-Nearest Neighbors algorithm for classifying handwritten digits. After completing this tutorial, you will know: Several of the most important characteristics of the k-Nearest Neighbors algorithm. How to use the […]
K-Means Clustering for Image Classification Using OpenCV
In a previous tutorial, we explored using the k-means clustering algorithm as an unsupervised machine learning technique that seeks to group similar data into distinct clusters to uncover patterns in the data. So far, we have seen how to apply the k-means clustering algorithm to a simple two-dimensional dataset containing distinct clusters and the problem […]
How to Transform Images and Create Video with OpenCV
When you work with OpenCV, you most often work with images. However, you may find it useful to create animation from multiple images. Chances are that showing images in rapid succession may give you different insight or it is easier to visualize your work by introducing a time axis. In this post, you will see […]