Ask Your Question

How the HoG features work with AdaBoost in openCV?

asked 2019-08-26 08:19:28 -0500

loviso gravatar image

as we know, the opencv traincascade can handle HOG in the old release. how the program handle the HOG features? what's the number or block, cell, bin informations? any one can explain the .xml file for hog detector?

edit retag flag offensive close merge delete



@loviso just curious, what kind of objects do you want to detect?

sturkmen gravatar imagesturkmen ( 2019-08-26 15:35:32 -0500 )edit

@sturkmen No matter what I want to detect. Usually when working with HOG features we have to choose some parameters like block size, orientation, normalization etc. I want to know the parameters of the HOG cascade used by the opencv_traincascade utility and what week leraners are fed to AdaBoost

loviso gravatar imageloviso ( 2019-08-26 15:51:37 -0500 )edit

i have no idea about training cascadeclassifier with HOG features. but (if you can use OpenCV 3.x) training HOGDescriptor is not hard and easily gives opportunity to see approximate results if the database you used to train a detector is good or bad.i think no matter you use traincascade or trainHOG , the most important thing is the database you used to create a good detector.

sturkmen gravatar imagesturkmen ( 2019-08-26 16:09:56 -0500 )edit

1 answer

Sort by » oldest newest most voted

answered 2019-08-26 12:48:45 -0500

berak gravatar image

updated 2019-08-26 13:31:24 -0500

the hog cascades were removed in 3.x (and won't come back)

the hog detector is using a linear SVM (not a boosted cascade) to predict candidate hog features from sliding windows, so the serialized xml file contains the single support vector (and -rho for thresholding the dot product later).

you can use the train_HOG sample to train your own classifier there.

edit flag offensive delete link more


The question talks about the opencv traincascade of the old (release) version

loviso gravatar imageloviso ( 2019-08-26 14:34:33 -0500 )edit

about the opencv traincascade of the old (release) version

indeed, it only exists in opencv 2.4, no more developed since almost a decade now.

berak gravatar imageberak ( 2019-08-26 15:25:37 -0500 )edit

No more development since years but companies worldwide still use a lot the cascade approach. I can suggest to use the OpenCV 2.4.10 version and keep working on haar, lbp and hog. More here:

ComputerVisionary gravatar imageComputerVisionary ( 2020-03-29 06:02:08 -0500 )edit

Question Tools

1 follower


Asked: 2019-08-26 08:19:28 -0500

Seen: 127 times

Last updated: Aug 26 '19