1 | initial version |
Two approaches are possible:
1 - Use of Bag of Words. Usually have four steps:
Test in a image (not in training examples).
There is a example here and in opencv/samples/cpp/bagofwords.cpp
2 - Use of a latent svm detector. The explanation is here. Have a running example of detection/categorization in opencv/samples/cpp/latentsvmdetector.cpp. You also need the opencv_extra/testdata/cv/latentsvm to properly test it. However I don't know how to make the training of new models in OpenCV.