OpenCV SURF,捕获的视频有点滞后,正常吗?如何加快速度?

发布于 2024-09-09 08:21:27 字数 81 浏览 6 评论 0原文

如何加快 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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

风情万种。 2024-09-16 08:21:27

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

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

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 lib 的说明

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;

See OpenCV's SURF docs.

Also, check out original article and notes on OpenSURF lib

绝影如岚 2024-09-16 08:21:27

SURF 代码广泛使用的 cvRound 函数存在一个问题。总而言之,函数重载伴随着 double 和 float 之间的额外类型转换,这会减慢舍入代码的速度。您可以在此处找到详细说明以及速度测量和补丁:http://computer-vision-talks.com/2011/06/a-few-thoughts-about-cvround/

There is an issue with the cvRound function, that is used extensively by SURF code. To sum up, function overloading comes with an additional type conversion between double and float, which slows the rounding code. You can find a detailed explanation, along with speed measurements and a patch here: http://computer-vision-talks.com/2011/06/a-few-thoughts-about-cvround/.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文