Feature extraction

Now, let's extract the features of each object. To understand the feature concept of a feature vector, we will extract very simple features, but it is enough to get good results. In other solutions, we can get more complex features, such as texture descriptors, contour descriptors, and so on.

In our example, we only have these three types of objects, nuts, rings, and screws, in different possible positions. All these possible objects and positions are shown in the following figure:

Feature extraction

We will explore the good characteristics that will help the computer to identify each object. The characteristics are as follows:

  • The area of an object ...

Get OpenCV By Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.