张建成
Computer Vision on GPU with OpenCV
2012-6-10 18:33
阅读:6050
标签: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://wap.sciencenet.cn/blog-297739-580754.html?mobile=1

收藏

分享到:

当前推荐数:0
推荐到博客首页
网友评论0 条评论
确定删除指定的回复吗?
确定删除本博文吗?