Chapter 20. The Basics of Machine Learning in OpenCV
In this chapter, we’ll begin a discussion of the machinery that is used to turn vision into perception—in other words, the machinery that turns the visual inputs into meaningful visual semantics.
In the previous chapters we have discussed how to turn 2D or 2D+3D sensor information into features, clusters, or geometric information. In the next three chapters, we’ll use the results of these techniques to turn features, segmentations, and their geometry into recognition of scenes or objects; it is this step that turns raw information into a percept: what the machine is seeing and where it is relative to the camera.
In this chapter we will cover the basics of machine learning, focusing mainly on what it is. We will look at some simple machine learning capabilities of the library that form a good starting point for understanding the basic ideas in machine learning as a whole. In the next chapter, we will get into more detail about how modern machine learning methods are implemented in the library.1
What Is Machine Learning?
The goal of machine learning (ML)2 is to turn data into information. After learning from a collection of data, we want a machine to be able to answer questions about the data: What other data is most similar to this data? Is there a car in the image? What ad will the user respond to? There is often a cost component, so this question could become: “Of our most profitable products, which one will the user most ...