OpenCV的最新SVN版本包含(未记录)基于HOG的行人检测的实现。它甚至带有预训练的检测器和python包装器。基本用法如下:
from cv import *storage = CreateMemStorage(0)img = LoadImage(file) # or read from camerafound = list(HOGDetectMultiScale(img, storage, win_stride=(8,8), padding=(32,32), scale=1.05, group_threshold=2))
因此,您可以只在每帧中运行检测器并直接使用其输出,而不是进行跟踪。
请参阅参考资料
src/cvaux/cvhog.cpp中的实现和
samples/python/peopledetect.py更完整的python示例(均在OpenCV源代码中)。



