Feature extraction

The next thing we need to do is extract the features for each object. To understand the feature vector concept, we are going to extract very simple features in our example, as this 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 nuts, rings, and screws in different positions and orientations in the image. The same object can be in any position of image and orientation, for example, the screw or the nut. We can see different orientations in the following image:

We are going to explore some features ...

Get Building Computer Vision Projects with OpenCV 4 and C++ 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.