In this recipe, you will learn how to apply the Bag-of-Words (BoW) model for computing global image descriptors. This technique can be used for building a machine learning model to solve image classification problems.
BoW model for constructing global image descriptors
Getting ready
Before you proceed with this recipe, you need to install the OpenCV version 3.3 (or greater) Python API package.
How to do it...
You need to complete the following steps:
- Import the necessary modules:
import cv2
import numpy as np
import matplotlib.pyplot as plt
- Load the two train images: ...