Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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 part of the image:

             Rect r = Rect(( img_lst[i].cols - wsize.width ) / 2,
                      ( img_lst[i].rows - wsize.height ) / 2,
                      wsize.width,
                      wsize.height);

is random?

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...

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: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 random?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;     ??
(float)-rho;

Thanks in advance and sorry for the multiple questions...