Ask Your Question

Setting parameters to compute HoG

asked 2016-04-01 11:44:03 -0500

bob409 gravatar image

updated 2016-04-01 13:50:17 -0500

LorenaGdL gravatar image

My image is of size 128x128. Should I use a win_Size of 128x128 as well? And how to select values for the other parameters as well: HOGDescriptor(Size win_size=Size(128, 128), Size block_size=Size(16, 16), Size block_stride=Size(8, 8), Size cell_size=Size(8, 8), int nbins=9, double win_sigma=DEFAULT_WIN_SIGMA, double threshold_L2hys=0.2, bool gamma_correction=true, int nlevels=DEFAULT_NLEVELS)

I have seen the explanation at but it is not clear enough on how to set the parameters properly.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2016-04-01 13:51:49 -0500

LorenaGdL gravatar image

When you say your image you mean a positive sample? You should use a win_size equal the size of your positive samples. You can leave default values for the rest of the params to start, they're reasonable enough to give you good results

edit flag offensive delete link more


Thnks. Should I normalize the feature vector afterwards or it is already normalized?

bob409 gravatar imagebob409 ( 2016-04-01 19:56:48 -0500 )edit

It has some internal normalization, but I usually perform a secondary normalization. In my case, results were almost the same (little better with normalization), others report more significant improvements with the additional normalization.

LorenaGdL gravatar imageLorenaGdL ( 2016-04-02 03:51:40 -0500 )edit

How to normalize hog feature?

bob409 gravatar imagebob409 ( 2016-04-02 04:48:20 -0500 )edit

Question Tools

1 follower


Asked: 2016-04-01 11:44:03 -0500

Seen: 405 times

Last updated: Apr 01 '16