Extracting HoG features ?
Hi everyone, this is my first time posting here.
I am trying to train my own SVM using features extracted using HoG. So far I can use the given pedestrian detector SVM for HoG to detect people. But I want to detect more poses, so I decided to train my own SVM using HoG.
My question is: Is there any OpenCV's API that allow me to extract HoG features and train a SVM later on ?
So far I couldn't find any answer, so I am trying to port HoG library from http://hogprocessing.altervista.org/ to C++, but I just realized that the developers use libsvm library, I am unsure whether I should also port that library.
Edit: I found libsvm library. But I am still wondering if there's any API directly from OpenCV that I can use, or any existing code regarding extracting HoG features within OpenCV's source code.
Thank you very much !
[TRiBi] Hi there!
I have the same problem. I extract the hog features of every image to train and store them in a CvMat. How can I store them in a file to train?
@TRiBi, How do you extract the HoG features ? If you could, then maybe you could try to look into SVMLight or libsvm on the format that they required to train your own SVM. I am not sure how to pass it back to OpenCV though.
Problem solved!. I parsed every feature vector computed by the function compute() to the LIBSVM input format: <target> <featureNumber>:<featureValue>.