c++ - 并行 SURF 和 SIFT 计算

标签 c++ opencv image-processing

如何加快 SURF 和 SIFT 操作?我知道我应该使用 TBB 但我应该使用 TBB 的什么功能??也许是 parallel_for? 我得到代码: int minHessian = 400;

SurfFeatureDetector detector( minHessian );
std::vector<KeyPoint> keypoints_object, keypoints_scene;
detector.detect( img_object, keypoints_object );
detector.detect( img_scene, keypoints_scene );
//-- Step 2: Calculate descriptors (feature vectors)
SurfDescriptorExtractor extractor;
Mat descriptors_object, descriptors_scene;
extractor.compute( img_object, keypoints_object, descriptors_object );
extractor.compute( img_scene, keypoints_scene, descriptors_scene );
//-- Step 3: Matching descriptor vectors using FLANN matcher
FlannBasedMatcher matcher;
std::vector< DMatch > matches;
matcher.match( descriptors_object, descriptors_scene, matches );

最佳答案

documentation说 SURF 在内部使用 TBB,因此您应该构建支持 TBB 的 OpenCV。

关于c++ - 并行 SURF 和 SIFT 计算,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28084343/

相关文章:

image - 如何使用其内容识别图像文件格式?

c++ - C++ 程序的 sleep 或时间延迟

c++ - 类的重新定义

python - 为什么应用高斯滤波器后图像的亮度会降低?

python-3.x - 类型错误 : ('Keyword argument not understood:' , 'input' )

opencv - 如何在 YUV420p 帧上绘制矩形

algorithm - 重叠图像选择算法

c++ - valgrind memcheck 是否支持检查 mmap

c++ - 当设置中/MT 时程序可以运行,但当/MD 时程序会失败

python - 如何使用 opencv 制作剪切图/使图像背景透明?