OpenCV SURF,捕获的视频有点滞后是否正常?如何加快速度? [英] OpenCV SURF, is it normal that the captured videos lag by a little? How to speed it up?

查看:91
本文介绍了OpenCV SURF,捕获的视频有点滞后是否正常?如何加快速度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何加快SURF的对应匹配过程?我使用提供的样本并将其更改为从网络摄像头捕获彩色图像进行处理,但是速度肯定需要改进.应该在哪里解决这个问题?

How do I speed up the correspondence matching processes of SURF? I used the samples provided and changed it to capture color images from the webcam for processing, however, the speed certainly needs improvement. Where should this be tackled on?

推荐答案

首先,SURF(至少是 OpenCV 的)仅支持 灰色 图像.

First, SURF (at least, OpenCV's one) supports only gray images.

有许多描述符参数可供调整,将它们设置为较低的值可以提高性能:

There are lots of descriptors parameters avalable to tune, setting them to lower values can increase performance:

typedef struct CvSURFParams
{
   int extended; // 0 means basic descriptors (64 elements each),
                 // 1 means extended descriptors (128 elements each)
   double hessianThreshold; // only features with keypoint.hessian
         // larger than that are extracted.
                 // good default value is ~300-500 (can depend on the
         // average local contrast and sharpness of the image).
                 // user can further filter out some features based on
         // their hessian values and other characteristics.
   int nOctaves; // the number of octaves to be used for extraction.
                 // With each next octave the feature size is doubled
         // (3 by default)
   int nOctaveLayers; // The number of layers within each octave
         // (4 by default)
}
CvSURFParams;

请参阅 OpenCV 的 SURF 文档.

另外,查看原始文章关于 OpenSURF 库的说明

这篇关于OpenCV SURF,捕获的视频有点滞后是否正常?如何加快速度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆