标签:histogram of oriente hog
HOG这种方法跟边缘方向直方图,尺度不变特征变换(SIFT)以及形状上下文方法(shape contexts)有很多相似之处,但与它们的不同点是:HOG描述器是在一个网格密集的大小统一的细胞单元上计算,而且为了提高性能,还采用了重叠的局部对比度归一化.HOG方法是在图像的局部细胞单元上操作,所以它对图像几何和光学的形变都能保持很好的不变性.
算法步骤step1:Gamma/Colour Normalization
作者分别在灰度空间、RGB色彩空间和LAB色彩空间上对图像进行色彩和 伽马归一化,但实验结果显示,这个归一化的预处理工作对最后的结果没有影响,原因可能是:在后续步骤中也有归一化的过程,那些过程可以取代这个预处理的归一化。所以,在实际应用中,这一步可以省略。
算法步骤step2:Gradient Computation
Several smoothing scales were testedinclude-ingσ=0 (none)
uncentred [?1, 1],centred [?1, 0, 1] and cubic-corrected[1,
?8, 0, 8, ?1]
2×2 diagonal
3×3 Sobel
Simple 1-D [?1, 0, 1] masks atσ=0 workbest
For colour images, wecalculate separate gradients for eachcolour
channel, andtake the one with the largest norm as the pixel’s gradient vector.
算法步骤step3:Spatial / Orientation Binning
0?– 180? (“unsigned” gradient) or 0?–360? (“signed”gradient),作者发现,采用无向的梯度和9个直方图通道,能在行人检测试验中取得最佳的效果
为每个cell统计方向梯度直方图,是一个9维的向量,采用三次插值进行投票。为什么是三次插值呢?[两次是偏移x,y,一次是角度,比如我的角度是20度的话,那就要分给0-20度和20-40度的]
it is useful to downweight pixels near the edges of the block by applying aGaussian spatial window to each pixel before accumulating orientation votesinto
cells. (σ = 0.5 ? blockwidth)
算法步骤step4:grouping the cells together into larger blocks
如左图,会有4*4个block,每个block里面都有4个cell,所以总共有(4*4)*(2*2)*9个特征
R-HOG区间大体上是一些方形的格子,它可以有三个参数来表征:每个区间中细胞单元的数目、每个细胞单元中像素点的数目、每个细胞的直方图通道数目
block的overlap提高了5%的performance,overlap可以消除block之间的突变
算法步骤step5:Normalization and Descriptor Blocks
L2-Hys, L2-norm followed by clipping (limitingthemaximumvaluesof
v to 0.2) and renormalizing
算法步骤step6:svm训练
我用的是libsvm
算法的总结
RGB colour space with nogammacorrection;
[?1, 0, 1]gradient filter with no smoothing ;
linear gradient voting into 9 orientation bins in 0?–180?;
16×16 pixelblocks of four 8×8 pixel cells; Gaussian spatial win-dow withσ
= 8 pixel;
L2-Hys
(Lowe-styleclipped L2 norm) block normalization;
block spacing stride of 8 pixels (hence 4-fold coverage of each cell);
64×128detection window ;
linear SVM classifier.
对于64*128的窗口,因为cell width = cell height = 8,又加上block的overlap,所以总共有7*15个block
每个block内又有4个cell,每个cell是一个9维的特征,所以每个block有36维特征
我们来计算一下特征数:(64/8-1)*(128/8-1) * 4 * 9 = 3780
作者还提到了圆形的block
e图就是生成的特征
根据f图就可以看出对于人来说,轮廓占的svm权重比较大
INRIA行人库 http://pascal.inrialpes.fr/data/human/
hog+svm源代码 timehandle的http://hi.baidu.com/nokltkmtsfbnsyq/item/f4b73d06f066cd193a53eec3
[2005CVPR]Histograms of Oriented Gradients for Human Detection,布布扣,bubuko.com
[2005CVPR]Histograms of Oriented Gradients for Human Detection
标签:histogram of oriente hog
原文地址:http://blog.csdn.net/abcd1992719g/article/details/37567043