1. 程式人生 > >人體檢測HOG特徵 Finding People in Images and Videos

人體檢測HOG特徵 Finding People in Images and Videos

1. Introduction

Any given class has ahuge intra-class variation.

任何類的類內距離都可能很大。

Challenges:

Firstly, the imageinformation process suppresses 3-D depth information and creates dependencieson viewpoint such that even a small change in the object's position ororientation w.r.t. the camera center may change its appearance considerably. Arelated issue is the large variation in scales under which an object can beviewed. An object detector must handle the issues of viewpoint and scalechanges and provide invariance to them.

第一,3D深度資訊丟失使影象依賴於視角。物體和相機之間的相對位置和方向如果發生微小變化,可能引起影象的巨大變化。一個相關的問題是:多大尺寸的物體才會被系統檢測到。一個特徵檢測演算法必須能夠處理特徵尺度和視角的變化。

Secondly, mostnatural object classes have large within-class variations. For example, forhumans both appearance and pose change considerably between images anddifferences in clothing create further changes. A robust detector must try toachieve independence of these variations.

第二,大部分自然物體都有很大的類內變化。

Thirdly, backgroundclutter is common and varies from mage to image. Examples are images taken innatural settings, outdoor scenes in cities and indoor environments. Thedetector must be capable of distinguishing object class from complex backgroundregions.

第三,每一幅影象的背景都會有差異。

Fourthly, object colorand general illumination varies considerably.

第四,特徵顏色和光照會發生變化。

Finally, partialocclusions create further difficulties because only part of the object isvisible for processing.

最後,遮擋問題。

2. Stateof the Art

2.1 Image Features

2.1.1 Sparse LocalRepresentations

Sparserepresentations are based on local descriptors of relevant local image regions.The regions can be selected using either key point detectors or partsdetectors.

Point Detectors 點特徵

The hypothesis isthat key point detectors select stable and more reliable image regions, whichare especially informative about local image content. The overall detectorperformance thus depends on the reliability, accuracy and repeatabilitywith which these key points can be found for the given object class and theinformativeness of the points chosen.

One advantage ofsparse key point based approaches is the compactness of the representation:there are many fewer key point descriptors than image pixels, so thelatter stages of the classification process are speeded up. However note thatmost key point detectors are designed to fire repeatedly on particular objectsand may have limitations when generalizing to object classes or categories,i.e. they may not be repeatable for general object classes.

3.Overview of Detection Methodology and Results

3.1 OverallArchitecture


The first stage of learning is the creationof the training data. The positive training examples are fixed resolution imagewindows containing the centered object, and the negative examples are similarwindows that are usually randomly subsampled and cropped from set of images notcontaining any instances of the object.

第一步是建立訓練資料。正類樣本是以物體為中心的固定尺寸影象,負類樣本是不包含物體的影象。

Three properties oflinear SVM make it valuable for comparative testing work: it converges reliablyand repeatedly during training; it handles large data sets gracefully; and ithas good robustness towards different choices of feature sets andparameters. 

SVM的優點

As the linear SVMworks directly in the input feature space, it ensures that the feature set isas linearly separable as possible, so improvements in performance imply animproved encoding.

SVM直接在原特徵上進行分類,提高識別率意味著提高了特徵的可分性。

3.2 Overview ofFeature Sets

3.2.1 Static HOGDescriptors

The hypothesis isthat local object appearance and shape can often be characterized rather wellby the distribution of local intensity gradient or edge directions, evenwithout precise knowledge of the corresponding gradient or edge positions.

本方法基於一個假設:在一副影象中,區域性目標的表象和形狀(appearance and shape)能夠被梯度或邊緣的方向分佈很好地描述。(本質:梯度的統計資訊,而梯度主要存在於邊緣的地方)(http://blog.csdn.net/zouxy09/article/details/7929348)。

The first stageapplies an optional global image normalisation equalization that is designed toreduce the influence of illumination effects. Gamma compression 

採用Gamma校正法對輸入影象進行顏色空間的標準化(歸一化);目的是調節影象的對比度,降低影象區域性的陰影和光照變化所造成的影響,同時可以抑制噪音的干擾;

The second stagecomputes first order image gradients. These capture contour, silhouette andsome texture information, while providing further resistance to illumination variations. 

計算影象每個畫素的梯度(包括大小和方向);主要是為了捕獲輪廓資訊,同時進一步弱化光照的干擾。

The third stage aimsto produce an encoding that is sensitive to local image content while remainingresistant to small changes in pose or appearance.

給出與區域性影象內容相關的編碼,該編碼在姿態和表象發生微小變化的情況下保持不變。

The fourth stagecomputes normalisation, which takes local groups of cells and contrastnormalises their overall responses before passing to next stage. Normalisationintroduces better invariance to illumination, shadowing, and edge contrast. 

正則化。對每一個cell根據它所在的block進行正則化。這有助於克服光照,陰影,和邊緣的影響。一個cell通常屬於多個block,要根據它所屬的每一個block進行正則化。因此,一個cell會以不同的特徵出現多次。

The final stepcollects the HOG descriptors from all blocks of a dense overlapping grid ofblocks covering the detection window into a combined feature vector for use inthe window classifier.

把每一個block的特徵串起來,組成一個長的特徵向量。

 

4.Histogram of Oriented Gradients Based Encoding of Images

4.1.1 Static HOG Descriptors

All of the variantsshare the same basic processing chain described in section 3.2.1, i.e. they allare computed on a dense grid of uniformly spaced cells, they capture localshape information by encoding image gradients orientations in histograms, theyachieve a small amount of spatial invariance by locally pooling thesehistograms over spatial image regions, and they employ overlapping localcontrast normalisation for improved illumination invariance.

所有的變種都具有一些共性:在有規則的密集視窗上計算,對直方圖的梯度方向進行編碼以表達區域性形狀資訊,把多個位置的直方圖集中起來以克服位置的變化,使用有重疊的區域性正則化以改善光照的影響。

Rectangular HOG(R-HOG)

R-HOGs are similar toSIFT descriptors bust are used quite differently. SIFTs are computed at asparse set of scale-invariant key points, rotated to align their dominantorientations and used individually, whereas R-HOGs are computed in dense gridsat a single scale without dominant orientation alignment. The grid position ofthe block implicitly encodes spatial position relative to the detection windowin the final code vector. SIFTs are optimized for sparse wide baseline matching,R-HOGs for dense robust coding of spatial form.

R-HOG與SIFT相似,但適用於不同的應用。SIFT是稀疏的,需要進行旋轉,單獨使用;R-HOG是密集的,無須旋轉,同其它的特徵一起使用。

4.1.2 Circular HOG(C-HOG)

In circularHOG(C-HOG) block descriptors, the cells are defined into grids of log-polarshape. The input image is covered by a dense rectangular grid of centers. Ateach center, we divide the local image patch into a number of angular andradial bins. The angular bins are uniformly distributed over the circle. Theradial bins are computed over log scales, resulting in increasing bin size withincreasing distance from the center.

Cell是在log-polar座標系中劃分的。對於每個中心,我們在角度和半徑方向分別劃分小塊。因為角度是均勻劃分的,離中心越遠的塊包含的畫素越多。

The motivation forthe log-polar grid is that it allows fine coding of nearby structure to becombined with coarser coding of wider context.

可以把附近結構的精細化編碼同遠處背景的粗略編碼結合起來。

The C-HOG layout hasfour spatial parameters: the number of angular and radial bins; the radius ofthe central bin in pixels; and the expansion factor for subsequent radii.

C-HOG有四個引數:角度和徑度劃分的區間數,中心塊的半徑,非中心的半徑差。


4.1.3 Bar HOG

Bar HOG descriptors are computed similarly to thegradient HOG ones, but use oriented second derivative (bar) filters instead offirst derivatives.

Bar HOG的計算和HOG的計算過程相似,區別在於前者使用二階導數而後者使用一階導數。

4.1.4Centre-Surround HOG

4.2 other descriptors

       GeneralizedHaar Wavelets; shape contexts; PCA-SIFT (待看)

4.3 Implementationand Performance Study

4.3.1 Gamma/Color Normalisation

When available, color information alwayshelps, e.g. for the person detector RGB and LAB color space give comparableresults, while restricting to grayscale reduces performances.

顏色資訊是有用的。

Our experience isthat square root gamma compression gives better performance for man-made objectclasses such as bicycles, motorbikes, cars, buses, and also people (whosepatterned clothing results in sudden contrast changes). For animals involvinglot of within-class color variation such as cats, dogs, and horses,unnormalised RGB turns out to be better, while for cows and sheep square rootcompression continues to yield better performance.

Gamma compression: 人造的各類物體,包括人

Unnormalised RGB: 動物

Root compression: 牛羊等

4.3.2 Gradient Computation

We computed image gradients using optionalGaussian smoothing followed by one of several discrete derivative masks andtested how performance varies. For color images (RGB or LAB space), we computedseparate gradients for each color channel and took the one with the largestnorm as the pixel’s gradient vector.

計算影象梯度可以有選擇的進行高斯平滑,再用模板計算梯度。對於顏色影象,對每一個顏色通道計算梯度並取最大的梯度向量。

Overall detectorperformance is sensitive to the way in which gradients are computed and thesimplest scheme of centered 1-D [-1 0 1] masks at delta=0 works best. The useof any form of smoothing or of larger masks of any type seems to decrease theperformance. The most likely reason for this is the fine details are important:images are essentially edge based and smoothing decreases the edge contrast andhence the signal. A useful corollary is that the optimal image gradients can becomputed very quickly and simply.

計算梯度的時候,最簡單的方法是最有效的。梯度運算元是中心化的1-D運算元 [-1 0 1]並且delta0.使用更大的mask或者進行平滑,會降低演算法的效能。這可能是因為影象的細節被抵消的原因。

4.3.3 Spatial /Orientation Binning

Each pixel contributes a weighted vote fororientation based on the orientation of the gradient element centered on it.

基於以它為中心計算得到的梯度,每一個畫素都以一定的權重對最後的方向產生影響。權重取梯度的幅值,得到最優結果。

Fine orientationcoding turns out to be essential for good performance for all object classes,whereas spatial binning can be rather coarse.

把方向分得更細會明顯提高演算法的效能,但空間分得更細對效能的提高作用不大。把0-180度平均分成9份,得到最優結果。

4.3.4 BlockNormalisation Schemes and Descriptor Overlap

       Anumber of different normalisation schemes were evaluated. Most of them arebased on grouping cells into larger spatial blocks and contrast normalizingeach block separately. In fact, the blocks are typically overlapped so thateach scalar cell response contributes several components to the finaldescriptor vector, each normalized with respect to a different block. This mayseem redundant but good normalisation is critical and including overlap significantlyimproves the performance.

       正則化的方法有幾種。他們大都把cell放在一個更大的block裡,然後對每一個block分別正則化。實際上,這些block是互相重疊的,它們之間有交集。所以每個cell裡的響應在最終的描述子裡面會出現不只一次。這種冗餘性被證明是可以改善效能的。


輸入:當前尺度的影象和影象大小

輸出:任意指定位置的特徵編碼

初始化:

a. 對輸入影象的每一個顏色通道進行Gamma正則化

b. 對每一個顏色通道,分別沿著x和y方向利用模板[-1 0 1]進行卷積,得到梯度值。每個畫素的orientation 和magnitude等於所有通道計算得到的最大量。

c.如果使用R2-HOG,利用寬度為的高斯核對影象進行平滑,得到導數,利用公式計算主方向和公式計算振幅magnitude。

描述子的計算:對每一個使用者指定的視窗進行計算

a、把影象視窗均勻分成由點構成的風格。

b、如果使用R-HOG

        (1) 把以當前點為中的的視窗區域劃分成多個cell;

        (2) 對block內的影象梯度應該sigma= 的高斯視窗;

        (3) 建立一個的空間和方向直方圖;

        (4) 對於block內的每一個畫素,使用三線性插值來投票決定直方圖的梯度振幅gradient magnitude。

c、如果使用R2-HOG,對影象的一階梯度和二階梯度運用與R-HOG相同的步驟,得到兩個3D的直方圖。

d、如果使用C-HOG,

        (1) 把以當前點為中心的影象區域分成log-polar圓形區域;通過建立角度和徑度bins來把block分成多個cell。

        (2) 為每一個cell建立一個bin的方向直方圖;

        (3) 對block內的每一個畫素,在log-polar-orientation空間裡使用三線性插值來投票決定cell的直方圖。

結束步驟:

(a) 對每一個block獨立的運用L2-Hys或L1-Sqrt進行正則化;如果使用R2-HOG,對每一個3D直方圖進行獨立的正則化;

(b) 把所有的block的HOGs組成一個高維描述子。

 

輸入: 正則化和確定正類樣本的解析度(寬度和長度);負類樣本。

輸出:訓練得到的兩類分類器,分類對像是的影象視窗。

建立負類樣本,任何一個負類樣本都是從負類影象裡隨機選取的一個視窗。

初步學習階段(First phase learning):

       (a) 為每一個正類影象計算描述子;

       (b) 訓練得到一個SVM分類器。

生成難分的負類樣本(hard negative examples):對負類影象進行多尺度的掃描

       (a) 初始尺度定義為,計算結束尺度,其中和分別是影象的寬度和高度;

       (b) 計算掃描尺度數,是固定的步長

       (c) 對每一個尺度

              (1) 使用二插值的方法對影象進行縮放;

              (2) 使用編碼演算法並且按步長掃描影象

              (3) 把所有結果是的樣本(難分類的樣本hard examples)放入列表。

第二階段學習

       (a) 估計RAM中可以儲存的難分樣本個數

       (b) 如果難分類樣本個數大於上述個數,對難分類樣本進行取樣;

       (c) 利用正類樣本,初始的負類樣本,和難分類樣本學習得到最終的SVM分類器。

Overall we studiedthe influence of various descriptor parameters and concluded that fine-scalegradient, fine orientation binning, relatively coarse spatial binning, andhigh-quality local contrast normalisation in overlapping descriptor blocks areall important for good performance.

總體來說,精細的梯度,精細的方向bin,粗略的空間bin,有效的區域性對比度正則化都能提高最終的效能。

5 Multi-ScaleObject Localization

5.1Binary Classifier for object Localization

Scanning detection window based object detection and localizationrequires multiple overlapping detections to be merged. Our solution is based onthe following two hypotheses:

         1. If the detector is robust, it shouldgive a strong positive (though not maximum) response even if the detectionwindow is slightly off-center or off-scale on the object.

         2. A reliable detector will not firewith same frequency and confidence for non-object image windows.

檢測到的視窗需要融合在一起。我們的方法基於以下兩個假設:

         1. 如果檢測演算法是魯棒的,那麼既使檢測視窗稍微偏離物體中心或與物體的大小稍微不同,響應也應該足夠大;

         2. 對非物體的響應(頻率和可信度frequency and confidence)應該是各不相同的。

         An ideal fusion method wouldincorporate the following characteristics:

         1. The higher the peak detection score,the higher the probability for the image region to be a true positive.

         2. The more overlapping detectionsthere are in the neighborhood of an image region, the higher the probabilityfor the image region to be a true positive.

         3. nearby overlapping detections shouldbe fused together, but overlaps occurring at very different scales or positive positionsshould not be fused.

一個理想的融合演算法應該具有如下特徵:

         1.響應越大,被檢測視窗是正樣本的概率越大;

         2. 出現的較大響應越密集,被檢測視窗是正樣本的概率越大;

         3. 重疊的響應應該融合在一起,但如果重疊的響應在尺度和位置上具有較大差異就不應該融合。

         Werepresent detections using kernel density estimation (KDE) in 3-D position andscale space.  The bandwidth of thesmoothing kernel defines the local neighborhood. The kernel width should bechosen to meet several criteria. It should not be less than the spatial and scalestride at which window classifiers are run, nor less than the natural spatialand scale width of the intrinsic classifier response (the former should be obviouslybe chosen to be less than the latter). Also it should not be wider than theobject itself so that nearby objects are not confused.

         我們使用三維位置尺度空間裡的kernel densityestimation (KDE)來表示檢測結果。平滑核的寬度定義了近鄰的概念。核的寬度應該滿足幾個條件:不小於空域和尺度空間裡的步長;不小於空域和尺度空間裡分類器響應的自然長度。

         後面的部分大部分都是公式推理。確定KDE的引數,和求解KDE的極值。

6 OrientedHistograms of Flow and Appearance for Detecting People in Videos

6.1Formation of Motion Compensation

         The goal of this chapter is to exploitmotion cues to improve our person detector’s performance for films and videos.Detecting people in video sequences introduces new problems. Besides thechallenges already mentioned for static images such as variations in pose, appearance,clothing, illumination and background clutter, the detector has to handle themotion of the subject, the camera and the independent objects in thebackground. The main challenge is thus to find a set of features that characterizehuman motion well, while remaining resistant to camera and background motion.

         本章的目的是探索運動線索來改善人體檢測在電影和視訊中的效能。在視訊中檢測人體會有一些新問題。除了影象中姿態,表像,服飾,光照,背景的影響外,還要考慮物體,相機,和其它物體的運動問題。主要的挑戰是在降低相機和背景運動影響的前提下,找到一種表現人體運動的特徵。

其它參考資料

http://blog.csdn.net/zouxy09/article/details/7929348

http://stackoverflow.com/questions/18474897/fastest-hog-feature-extraction-implementation


以下轉自:  http://www.zhizhihu.com/html/y2010/1690.html

HOG descriptors 是應用在計算機視覺和影象處理領域,用於目標檢測的特徵描述器。這項技術是用來計算區域性影象梯度的方向資訊的統計值。這種方法跟邊緣方向直方圖(edge orientation histograms)、尺度不變特徵變換(scale-invariant feature transform descriptors) 以及形狀上下文方法( shape contexts)有很多相似之處,但與它們的不同點是:HOG描述器是在一個網格密集的大小統一的細胞單元(dense grid of uniformly spaced cells)上計算,而且為了提高效能,還採用了重疊的區域性對比度歸一化(overlapping local contrast normalization)技術。

這篇文章的作者Navneet Dalal和BillTriggs是法國國家計算機技術和控制研究所French National Institute for Research inComputer Science and Control (INRIA)的研究員。他們在這篇文章中首次提出了HOG方法。這篇文章被髮表在2005年的CVPR上。他們主要是將這種方法應用在靜態影象中的行人 檢測上,但在後來,他們也將其應用在電影和視訊中的行人檢測,以及靜態影象中的車輛和常見動物的檢測。

HOG描述器最重要的思想是:在一副 影象中,區域性目標的表象和形狀(appearance and shape)能夠被梯度或邊緣的方向密度分佈很好地描述。具體的實現方法是:首先將影象分成小的連通區域,我們把它叫細胞單元。然後採集細胞單元中各畫素 點的梯度的或邊緣的方向直方圖。最後把這些直方圖組合起來就可以構成特徵描述器。為了提高效能,我們還可以把這些區域性直方圖在影象的更大的範圍內(我們把 它叫區間或block)進行對比度歸一化(contrast-normalized),所採用的方法是:先計算各直方圖在這個區間(block)中的密 度,然後根據這個密度對區間中的各個細胞單元做歸一化。通過這個歸一化後,能對光照變化和陰影獲得更好的效果。

與其他的特徵描述方法相 比,HOG描述器後很多優點。首先,由於HOG方法是在影象的區域性細胞單元上操作,所以它對影象幾何的(geometric)和光學的 (photometric)形變都能保持很好的不變性,這兩種形變只會出現在更大的空間領域上。其次,作者通過實驗發現,在粗的空域抽樣(coarse spatial sampling)、精細的方向抽樣(fine orientation sampling)以及較強的區域性光學歸一化(strong local photometric normalization)等條件下,只要行人大體上能夠保持直立的姿勢,就容許行人有一些細微的肢體動作,這些細微的動作可以被忽略而不影響檢測效 果。綜上所述,HOG方法是特別適合於做影象中的行人檢測的。

上圖是作者做的行人檢測試驗,其中(a)表示所有訓練影象集 的平均梯度(average gradient across their training images);(b)和(c)分別表示:影象中每一個區間(block)上的最大最大正、負SVM權值;(d)表示一副測試影象;(e)計算完R- HOG後的測試影象;(f)和(g)分別表示被正、負SVM權值加權後的R-HOG影象。

演算法的實現:

色彩和伽馬歸一化 (color and gamma normalization)

作者分別在灰度空間、RGB色彩空間和LAB色彩空間上對影象進行色彩和 伽馬歸一化,但實驗結果顯示,這個歸一化的預處理工作對最後的結果沒有影響,原因可能是:在後續步驟中也有歸一化的過程,那些過程可以取代這個預處理的歸 一化。所以,在實際應用中,這一步可以省略。

梯度的計算(Gradient computation)

最常用的方法是:簡單地使用一個一維的離散微分模板(1-D centered point discrete derivative mask)在一個方向上或者同時在水平和垂直兩個方向上對影象進行處理,更確切地說,這個方法需要使用下面的濾波器核濾除影象中的色彩或變化劇烈的資料 (color or intensity data)

作者也嘗試了其他一些更復雜的模板,如3×3 Sobel 模板,或對角線模板(diagonalmasks),但是在這個行人檢測的實驗中,這些複雜模板的表現都較差,所以作者的結論是:模板越簡單,效果反而越好。作者也嘗試了在使用微分模板前加入 一個高斯平滑濾波,但是這個高斯平滑濾波的加入使得檢測效果更差,原因是:許多有用的影象資訊是來自變化劇烈的邊緣,而在計算梯度之前加入高斯濾波會把這 些邊緣濾除掉。

構建方向的直方圖(creating the orientation histograms)

第三步就是為影象的每個細胞單元構建梯度方向直方圖。細胞單元中的每一個畫素點都為某個基於方向的直方圖通道(orientation-based histogram channel)投票。投票是採取加權投票(weighted voting)的方式,即每一票都是帶權值的,這個權值是根據該畫素點的梯度幅度計算出來。可以採用幅值本身或者它的函式來表示這個權值,實際測試表明: 使用幅值來表示權值能獲得最佳的效果,當然,也可以選擇幅值的函式來表示,比如幅值的平方根(square root)、幅值的平方(squareof the gradient magnitude)、幅值的截斷形式(clipped version of the magnitude)等。細胞單元可以是矩形的(rectangular),也可以是星形的(radial)。直方圖通道是平均分佈在0-1800(無 向)或0-3600(有向)範圍內。作者發現,採用無向的梯度和9個直方圖通道,能在行人檢測試驗中取得最佳的效果。

把細胞單元組 合成大的區間(grouping the cells together into larger blocks)

由於區域性光照的變化(variations of illumination)以及前景-背景對比度(foreground-background contrast)的變化,使得梯度強度(gradient strengths)的變化範圍非常大。這就需要對梯度強度做歸一化,作者採取的辦法是:把各個細胞單元組合成大的、空間上連通的區間(blocks)。 這樣以來,HOG描述器就變成了由各區間所有細胞單元的直方圖成分所組成的一個向量。這些區間是互有重疊的,這就意味著:每一個細胞單元的輸出都多次作用 於最終的描述器。區間有兩個主要的幾何形狀——矩形區間(R-HOG)和環形區間(C-HOG)。R-HOG區間大體上是一些方形的格子,它可以有三個參 數來表徵:每個區間中細胞單元的數目、每個細胞單元中畫素點的數目、每個細胞的直方圖通道數目。作者通過實驗表明,行人檢測的最佳引數設定是:3×3細胞 /區間、6×6畫素/細胞、9個直方圖通道。作者還發現,在對直方圖做處理之前,給每個區間(block)加一個高斯空域視窗(Gaussian spatial window)是非常必要的,因為這樣可以降低邊緣的周圍畫素點(pixels around the edge)的權重。

R- HOG跟SIFT描述器看起來很相似,但他們的不同之處是:R-HOG是在單一尺度下、密集的網格內、沒有對方向排序的情況下被計算出來(are computed in dense grids at some single scale withoutorientation alignment);而SIFT描述器是在多尺度下、稀疏的影象關鍵點上、對方向排序的情況下被計算出來(are computed at sparse scale-invariant keyimage points and are rotated to align orientation)。補充一點,R-HOG是各區間被組合起來用於對空域資訊進行編碼(are used in conjunction to encode spatialform information),而SIFT的各描述器是單獨使用的(are used singly)。

C- HOG區間(blocks)有兩種不同的形式,它們的區別在於:一個的中心細胞是完整的,一個的中心細胞是被分割的。如右圖所示:

作者發現 C-HOG的這兩種形式都能取得相同的效果。C-HOG區間(blocks)可以用四個引數來表徵:角度盒子的個數(number of angular bins)、半徑盒子個數(number of radial bins)、中心盒子的半徑(radiusof the center bin)、半徑的伸展因子(expansion factor for the radius)。通過實驗,對於行人檢測,最佳的引數設定為:4個角度盒子、2個半徑盒子、中心盒子半徑為4個畫素、伸展因子為2。前面提到過,對於R-HOG,中間加一個高斯空域視窗是非常有必要的,但對於C-HOG,這顯得沒有必要。C-HOG看起來很像基於形狀上下文(Shape Contexts)的方法,但不同之處是:C-HOG的區間中包含的細胞單元有多個方向通道(orientation channels),而基於形狀上下文的方法僅僅只用到了一個單一的邊緣存在數(edge presence count)。

區間歸一化 (Block normalization)

作者採用了四中不同的方法對區間進行歸一化,並對結果進行了比較。引入v表示一個還沒有被歸一 化的向量,它包含了給定區間(block)的所有直方圖資訊。| | vk | |表示v的k階範數,這裡的k去1、2。用e表示一個很小的常數。這時,歸一化因子可以表示如下:

L2-norm:

L1-norm:

L1-sqrt:

還 有第四種歸一化方式:L2-Hys,它可以通過先進行L2-norm,對結果進行截短(clipping),然後再重新歸一化得到。作者發現:採用L2- Hys L2-norm 和 L1-sqrt方式所取得的效果是一樣的,L1-norm稍微表現出一點點不可靠性。但是對於沒有被歸一化的資料來說,這四種方法都表現出來顯著的改進。

SVM 分類器(SVMclassifier)

最後一步就是把提取的HOG特徵輸入到SVM分類器中,尋找一個最優超平面作為決策函式。作者採用 的方法是:使用免費的SVMLight軟體包加上HOG分類器來尋找測試影象中的行人。