python - 从 OpenCV + Python 获取 HOG 图像特征?

标签 python image-processing opencv

我读过这篇关于如何使用 OpenCV 基于 HOG 的行人检测器的文章:How can I detect and track people using OpenCV?

我想使用 HOG 来检测图像中其他类型的对象(不仅仅是行人)。但是,HOGDetectMultiScale 的 Python 绑定(bind)似乎无法访问实际的 HOG 功能。

有没有办法使用 Python + OpenCV 直接从任何图像中提取 HOG 特征?

最佳答案

在 python opencv 中,你可以像这样计算 hog:

 import cv2
 hog = cv2.HOGDescriptor()
 im = cv2.imread(sample)
 h = hog.compute(im)

关于python - 从 OpenCV + Python 获取 HOG 图像特征?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6090399/

相关文章:

python - 这个日期检查是否更简洁?

python - 点击动态按钮不起作用(python)

python - 使用列列表和值列表查询数据框

python-3.x - 图片大小调整,IndexError : list assignment index out of range

android - 如何将 openCV 示例导入 Android Studio

Python如何获得用zlib压缩的数据长度?

matlab - 离散小波变换 Matlab

c++ - cvReleaseCapture() 错误

python - 将轮廓线转换为直线

java - 通过 JNI 执行 OpenCV native 函数的问题