// 基于HOG特征的行人检测
// Author: ;
#include <iostream>
#include <opencv2/opencv.hpp>
int main(int argc, char** argv)
{
cv::Mat image = cv::imread("Test13.jpg");
if (image.empty())
{
std::cout<<"read image failed"<<std::endl;
}
// 1. 定义HOG对象
cv::HOGDescriptor hog; // 采用默认参数
// 2. 设置SVM分类器
hog.setSVMDetector(cv::HOGDescriptor::getDefaultPeopleDetector()); // 采用已经训练好的行人检测分类器
// 3. 在测试图像上检测行人区域
std::vector<cv::Rect> regions;
hog.detectMultiScale(image, regions, 0, cv::Size(8,8), cv::Size(32,32), 1.05, 1);
// 显示
for (size_t i = 0; i < regions.size(); i++)
{
cv::rectangle(image, regions[i], cv::Scalar(0,0,255), 2);
}
cv::imshow("hog", image);
cv::waitKey(0);
return 0;
}
没有合适的资源?快使用搜索试试~ 我知道了~
hog_detect.rar_hog visual_hog 行人_opencv hog_行人检测
共78个文件
tlog:32个
jpg:9个
bmp:5个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 165 浏览量
2022-07-15
10:53:08
上传
评论
收藏 18.98MB RAR 举报
温馨提示
利用opencv中的hog算法模块,对单张图片进行行人检测
资源推荐
资源详情
资源评论
收起资源包目录
hog_detect.rar (78个子文件)
行人检测
test.suo 17KB
test.sdf 39.14MB
test
Test10.jpg 68KB
Test9.jpg 29KB
Test11.jpg 25KB
Test4.bmp 173KB
test.vcxproj 5KB
Test2.bmp 397KB
Test1.bmp 352KB
test.vcxproj.filters 1KB
test.bmp 395KB
videoInput64.lib 2.06MB
Test5.jpg 26KB
Test12.jpg 15KB
Test13.jpg 95KB
Test3.bmp 396KB
videoInput.lib 2.05MB
Test8.jpg 7KB
videoInput.h 12KB
Test6.jpg 50KB
Debug
test.obj 108KB
test.log 3KB
vc100.idb 1.1MB
link.6960.write.1.tlog 2B
人脸识别.exe.embed.manifest.res 472B
link.5932-cvtres.read.1.tlog 2B
CL.write.1.tlog 1KB
CL.read.1.tlog 94KB
人脸识别.write.1.tlog 0B
link.852.read.1.tlog 2B
mt.read.1.tlog 854B
test.exe.embed.manifest.res 472B
rc.write.1.tlog 774B
人脸识别.exe.intermediate.manifest 381B
link.5932-cvtres.write.1.tlog 2B
rc.read.1.tlog 742B
link.852-cvtres.write.1.tlog 2B
test.exe.embed.manifest 406B
mt.command.1.tlog 1KB
人脸识别.exe.embed.manifest 406B
test_manifest.rc 198B
cl.command.1.tlog 4KB
link-cvtres.read.1.tlog 2B
test.lastbuildstate 45B
link.3408.read.1.tlog 2B
link.write.1.tlog 2KB
link.6960-cvtres.read.1.tlog 2B
test.vcxprojResolveAssemblyReference.cache 1KB
link.3408-cvtres.write.1.tlog 2B
link.6960.read.1.tlog 2B
test.exe.intermediate.manifest 381B
link-cvtres.write.1.tlog 2B
link.command.1.tlog 9KB
rc.command.1.tlog 2KB
link.read.1.tlog 17KB
link.852-cvtres.read.1.tlog 2B
mt.write.1.tlog 660B
link.5932.write.1.tlog 2B
link.3408.write.1.tlog 2B
test.write.1.tlog 0B
link.3408-cvtres.read.1.tlog 2B
Main.obj 182KB
test.Build.CppClean.log 2KB
link.852.write.1.tlog 2B
人脸识别.lastbuildstate 50B
人脸识别.obj 108KB
link.5932.read.1.tlog 2B
人脸识别_manifest.rc 198B
vc100.pdb 1.18MB
link.6960-cvtres.write.1.tlog 2B
test.vcxproj.user 143B
Main.cpp 787B
Test7.jpg 80KB
ipch
test-43609e7c
人脸识别-230e082f.ipch 54.19MB
Debug
人脸识别.pdb 1.75MB
人脸识别.exe 57KB
人脸识别.ilk 868KB
test.sln 879B
共 78 条
- 1
资源评论
御道御小黑
- 粉丝: 58
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功