TRAIN_HOG.cpp
Hello! To begin with, I'm new to the opencv world so my questions about the implementation of train_hog.cpp, may be of basic nature.
A)First of all, in the main() what's the purpose of the line:
pos_image_size = pos_image_size / 8 * 8;
B)In the function computeHOGs, the choice of the specific part of the image(instead of starting from 0,0):
Rect r = Rect(( img_lst[i].cols - wsize.width ) / 2,
( img_lst[i].rows - wsize.height ) / 2,
wsize.width,
wsize.height);
is done in order to capture the region which probably has more information (a more 'central')?
C)In get_svm_detector function what's the meaning of
hog_detector[sv.cols] = (float)-rho;
Thanks in advance and sorry for the multiple questions...
hi @AP108 thank you for your question. i can answer A and B ( as the coder of related lines ). but before answering can i ask "do you have sample positive images and what is their dimensions" may be i will give some hints to change the code according to your needs. indeed train_HOG is only a sample ( not an official app like traincascade) so it doesn't cover all possibilities of training a HOG detector.
Actually, no I don't have sample images, not yet at least. Mainly, I wanted to familiarize with the general steps that have to be followed regarding HOG n SVM.