我在理解Viola Jones 算法的训练阶段时遇到问题。
据我所知,我用伪代码给出算法:
# learning phase of Viola Jones
foreach feature # these are the pattern, see figure 1, page 139
# these features are moved over the entire 24x24 sample pictures
foreach (x,y) so that the feature still matches the 24x24 sample picture
# the features are scaled over the window from [(x,y) - (24,24)]
foreach scaling of the feature
# calc the best threshold for a single, scaled feature
# for this, the feature is put over each sample image (all 24x24 in the paper)
foreach positive_image
thresh_pos[this positive image] := HaarFeatureCalc(position of the window, scaling, feature)
foreach negative_image
thresh_neg[this negative image] := HaarFeatureCalc(position of the window, scaling, feature)
#### what's next?
#### how do I use the thresholds (pos / neg)?
这是,顺便说一句,这个 SO 问题中的框架:Viola-Jones 的面部检测声称有 18 万个特征
这个算法调用了 HaarFeatureCalc 函数,我想我理解了:
function: HaarFeatureCalc
threshold := (sum of the pixel in the sample picture that are white in the feature pattern) -
(sum of the pixel in the sample picture that are grey in the feature pattern)
# this is calculated with the integral image, described in 2.1 of the paper
return the threshold
到现在为止有什么错误吗?
Viola Jones 的学习阶段,基本上检测哪些特征/检测器是最具决定性的。我不明白论文中描述的 AdaBoost 是如何工作的。
问题:论文中的 AdaBoost 在伪代码中看起来如何?