How it works...

In our stop sign recognition example, each instance of our class is represented by a point in a 8100-dimensional HOG space. It is obviously impossible to visualize such a large space, but the idea behind SVMs is to trace a boundary in that space, which will segregate points that belong to one class from points belonging to another class. More specifically, this boundary will, in fact, be just a simple hyperplane. This idea is better explained considering a 2D space, where each instance is represented as a 2D point. The hyperplane is, in this case, a simple line:

This is a trivial example but, conceptually, working in a two-dimensional ...

Get OpenCV 4 Computer Vision Application Programming Cookbook - Fourth Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.