提交 ff1fb9f7 编写于 作者: V Vladislav Vinogradov

minor stitching optimization (use cpu matchers instead of gpu matchers on multicore processors)

上级 cfdf4640
......@@ -411,7 +411,15 @@ namespace
BestOf2NearestMatcher::BestOf2NearestMatcher(bool try_use_gpu, float match_conf, int num_matches_thresh1, int num_matches_thresh2)
{
bool use_gpu = false;
if (try_use_gpu && getCudaEnabledDeviceCount() > 0)
{
DeviceInfo info;
if (info.majorVersion() >= 2 && cv::getNumberOfCPUs() < 4)
use_gpu = true;
}
if (use_gpu)
impl_ = new GpuMatcher(match_conf);
else
impl_ = new CpuMatcher(match_conf);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册