gpt4 book ai didi

c++ - OpenCV HOGDescriptor 返回值

转载 作者:太空宇宙 更新时间:2023-11-03 22:10:47 25 4
gpt4 key购买 nike

为什么 HOG 描述符返回一个 float 而不是 int 的 vector ?它应该返回一个直方图..

最佳答案

根据这个 HoG note 来补充我认为正确的以前的答案我发现比最初的 Dalal & Triggs paper 更清楚,涉及两个归一化步骤:

  • block 规范化

Group the cells into overlapping blocks of 2 x 2 cells each, so that each block has size 2C x 2C pixels. Two horizontally or vertically consecutive blocks overlap by two cells, that is, the block stride is C pixels. As a consequence, each internal cell is covered by four blocks. Concatenate the four cell histograms in each block into a single block feature b and normalize the block feature by its Euclidean norm.

  • HOG 特征归一化

The final normalization makes the HOG feature independent of overall image contrast.

还应该在两个连续的 bin 之间进行双线性插值投票,以防止量化伪影。

此外,它不能是 int,因为您不仅要计算落入 bin 的梯度 vector 的数量,还要加上梯度幅度。

关于c++ - OpenCV HOGDescriptor 返回值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37959838/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com