1.HOG特征提取
opencv里关于HOG特征的提取是通过函数HOGDescriptor()来完成的,主要有下面4个构造函数:
CV_WRAP HOGDescriptor() : winSize(64,128), blockSize(16,16), blockStride(8,8),
cellSize(8,8), nbins(9), derivAperture(1), winSigma(-1),
histogramNormType(HOGDescriptor::L2Hys), L2HysThreshold(0.2), gammaCorrection(true),
nlevels(HOGDescriptor::DEFAULT_NLEVELS)
{}
CV_WRAP HOGDescriptor(Size _winSize, Size _blockSize, Size _blockStride,
Size _cellSize, int _nbins, int _derivAperture=1, double _winSigma=-1,
int _histogramNormType=HOGDescriptor::L2Hys,
double _L2HysThreshold=0.2, bool _gammaCorrection=false,
int _nlevels=HOGDescriptor::DEFAULT_NLEVELS)
: winSize(_winSize), blockSize(_blockSize), blockStride(_blockStride), cellSize(_cellSize),
nbins(_nbins), derivAperture(_derivAperture), winSigma(_winSigma),
histogramNormType(_histogramNormType), L2HysThreshold(_L2HysThreshold),
gammaCorrection(_gammaCorrection), nlevels(_nlevels)
{}
CV_WRAP HOGDescriptor(const String& filename)
{
load(filename);
}
HOGDescriptor(const HOGDescriptor& d)
{
d.copyTo(*this);
}
实际应用过程中主要是第二个,其中有几个关键的参数:

本文介绍了如何利用OpenCV的HOGDescriptor类进行HOG特征提取,包括设置参数如窗口大小、块大小等。在提取特征后,提到了样本集的组织方式,通常存储在文本文件中,并且可以通过批处理程序生成文件列表。最后,文章提及了OpenCV中SVM的使用,建议参考官方文档进行深入学习。
最低0.47元/天 解锁文章
1219

被折叠的 条评论
为什么被折叠?



