A Support Vector Machine (SVM) is a supervised learning technique that constructs a hyperplane or a set of hyperplanes in a high-dimensional space by best separating the training examples according to its assigned class.
This can be seen in the next diagram, where the green line is the representation of the hyperplane that best separates the two classes because the distance to the nearest element of each of the two classes is the largest:
In the first case, the decision boundary is a line while, in the second case, the decision boundary is a circumference. The dashed lines and the dashed circumference represent other decision boundaries, but they do not best separate both classes.
SVM implementation in OpenCV is based on LIBSVM: A library for support vector machines (2011) (https://www.csie.ntu.edu.tw/~cjlin/libsvm/). To create an empty model, the cv2...