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 algorithms quicker before moving on to more challenging problems.  Two datasets we will be looking at are the simpler digits dataset provided with OpenCV and […]

Read more

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 use HOG to compare images for similarity, one practical application is to make it the input to a classifier so you can detect objects in […]

Read more

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 for the specific applications of image classification and detection.  In this tutorial, you will learn how to apply OpenCV’s Support Vector Machine algorithm on a […]

Read more

Hardware-Accelerated AI for Windows Apps Using ONNX RT

Sponsored Content   By Rajan Mistry Sr. Applications Engineer with the Qualcomm Developer Network Today, you can’t help but read the media headlines about AI and the growing sophistication of generative AI models like Stable Diffusion. A great example of a use case for generative AI on Windows is Microsoft 365 Copilot. This AI assistant can perform tasks such as analyzing your spreadsheets, generating content, and organizing your meetings. And while such intelligence can feel like magic, its capabilities don’t happen […]

Read more

Support Vector Machines for Image Classification and Detection Using OpenCV

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 this tutorial, you will learn how to apply OpenCV’s Support Vector Machine algorithm to solve image classification and detection problems.  After completing this tutorial, you […]

Read more

Normal Bayes Classifier for Image Segmentation Using OpenCV

The Naive Bayes algorithm is a simple but powerful technique for supervised machine learning. Its Gaussian variant is implemented in the OpenCV library. In this tutorial, you will learn how to apply OpenCV’s normal Bayes algorithm, first on a custom two-dimensional dataset and subsequently for segmenting an image.   After completing this tutorial, you will know: Several of the most important points in applying the Bayes theorem to machine learning. How to use the normal Bayes algorithm on a custom […]

Read more

Random Forest for Image Classification Using OpenCV

The Random Forest algorithm forms part of a family of ensemble machine learning algorithms and is a popular variation of bagged decision trees. It also comes implemented in the OpenCV library. In this tutorial, you will learn how to apply OpenCV’s Random Forest algorithm for image classification, starting with a relatively easier banknote dataset and then testing the algorithm on OpenCV’s digits dataset.  After completing this tutorial, you will know: Several of the most important characteristics of the Random Forest […]

Read more

Using Haar Cascade for Object Detection

Before the deep learning revolution redefined computer vision, Haar features and Haar cascades were the tools you must not ignore for object detection. Even today, they are very useful object detectors because they are lightweight. In this post, you will learn about the Haar cascade and how it can detect objects. After completing this post, you will know: What is Haar features How Haar cascade is using Haar features to detect objects Some predefined Haar cascade object detectors in OpenCV […]

Read more

Training a Haar Cascade Object Detector in OpenCV

Using a Haar cascade classifier in OpenCV is simple. You just need to provide the trained model in an XML file to create the classifier. Training one from scratch, however, is not so straightforward. In this tutorial, you will see how the training should be like. In particular, you will learn: What are the tools to train a Haar cascade in OpenCV How to prepare data for training How to run the training Kick-start your project with my book Machine […]

Read more

K-Means Clustering in OpenCV and Application for Color Quantization

The k-means clustering algorithm is an unsupervised machine learning technique that seeks to group similar data into distinct clusters to uncover patterns in the data that may not be apparent to the naked eye.  It is possibly the most widely known algorithm for data clustering and is implemented in the OpenCV library. In this tutorial, you will learn how to apply OpenCV’s k-means clustering algorithm for color quantization of images.  After completing this tutorial, you will know: What data clustering […]

Read more
1 86 87 88 89 90 920