Vehicle and other objects in HOGDescriptor [closed]
Hello,
In OpenCV cheat sheet, it describes HOGDescriptor as algorithm for detecting people, cars and other objects with well-defined silhouettes.
Using HOGDescriptors to detect people using the "setSVMDetector(HOGDescriptor.getDefaultPeopleDetector())", works fine.
I want to expand this to detect vehicles... Is there a way to download a trained SVM detector, or I have to train it myself? Can I train it in java?
You will indeed need to train the model yourself, which is quite complex due to the underdeveloped SVM module. Only the hogdescriptor for pedestrians is available hardcoded in OpenCV. An example on how to train a HOG model can be found here or here. There is even an official OpenCV sample on this.