生物特征 高性能服务 智能交互分享 http://blog.sciencenet.cn/u/bluewind23 带着鲜刺的玫瑰刺得血如雨下一如既往前行!

博文

Computer Vision on GPU with OpenCV

已有 6064 次阅读 2012-6-10 18:33 |个人分类:学习研究|系统分类:科研笔记| Vision, OpenCV, GPU

OpenCV GPU Module Example (Use HOG,Release 2.3)
Not use GPU Module:
Mat frame;
VideoCapture capture(camera);
cv::HOGDescriptor hog;
hog.setSVMDetector(cv::HOGDescriptor::
getDefaultPeopleDetectorector());
capture >> frame;
vector<Rect> found;
hog.detectMultiScale(frame, found,
1.4, Size(16, 16), Size(0, 0), 1.05, 16);

Use GPU Module:
Mat frame;
VideoCapture capture(camera);
cv::gpu::HOGDescriptor hog;
hog.setSVMDetector(cv::HOGDescriptor::
getDefaultPeopleDetectorector());
capture >> frame;
GpuMat gpu_frame;
gpu_frame.upload(frame);
vector<Rect> found;
hog.detectMultiScale(gpu_frame, found,
1.4, Size(16, 16), Size(0, 0), 1.05,16);



https://blog.sciencenet.cn/blog-297739-580754.html

上一篇:敏捷十二条
下一篇:VC环境下OpenGL多视图窗口的实现
收藏 IP: 58.249.118.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...
扫一扫,分享此博文

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-5-22 04:03

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部