具有cuda的OpenCV 3.4.0中的连接组件(在GPU上) [英] Connected Components in OpenCV 3.4.0 with with cuda (on GPU)

查看:267
本文介绍了具有cuda的OpenCV 3.4.0中的连接组件(在GPU上)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用c ++和OpenCV 3.4.0编写了一个程序,用于连接组件的标签.

I wrote a program with c++ and OpenCV 3.4.0 for connected components labeling.

我使用了 ConnectedComponentsWithStats 函数.现在,我可以使用OpenCV + cuda编写相同的程序.但是OpenCV没有用于cuda的 ConnectedComponentsWithStats 函数.

I used ConnectedComponentsWithStats function for it. Now I can write same program with OpenCV + cuda. But OpenCV does not have ConnectedComponentsWithStats function for cuda.

有人对我说我必须使用 labelComponents 函数,但是当我编写 cv :: cuda :: labelComponents 时,C ++对我说:

Somebody said to me that I must use labelComponents function for it, but when I write cv::cuda::labelComponents, C++ say to me :

"cv :: cuda ::"没有成员"labelComponents"

推荐答案

它确实位于 cv :: cuda:labelComponents

It is indeed in cv::cuda:labelComponents

  1. 您使用旧版支持进行编译了吗?
  2. 您是否包含适当的头文件?我相信它是"opencv2/cudalegacy/cudalegacy.hpp" 参见: cudalegacy.hpp文件参考

这篇关于具有cuda的OpenCV 3.4.0中的连接组件(在GPU上)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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