Confusion in different HOG codes

天大地大妈咪最大 提交于 2019-12-01 18:38:43

All are correct. Thing is HOG feature extraction function default parameters vary with packages. (Eg - opencv, matlab, scikit-image etc). By parameters I mean, winsize, stride, blocksize, scale etc.

Usually HOG descriptor length is :

 Length = Number of Blocks x Cells in each Block x Number of Bins in each Cell

Since all are correct, which one you may use can be answered in many ways. You can experiment with different param values and choose the one that suits you. Since there is no fixed way to find right values, it would be helpful if you know how change in each parameters affect the result.

Cell-size : If you increase this, you may not capture small details.

Block-size : Again, large block with large cell size may not help you capture the small details. Also since large block means illumination variation can be more and due to gradient normalization step, lot of details will be lost. So choose accordingly.

Overlap/Stride: This again helps you capture more information about the image patch if you choose overlapping blocks. Usually it is set to half the blocksize.

You may have lot of information by choosing the values of the above params accordingly. But the descriptor length will become unnecessarily long.

Hope this helps :)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!