OpenCV2.4.6 + CUDA5.0 + VS2010,在调试模式下,不显示图像 [英] OpenCV2.4.6 + CUDA5.0 + VS2010, in debug mode, don't display images

查看:106
本文介绍了OpenCV2.4.6 + CUDA5.0 + VS2010,在调试模式下,不显示图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

winodws 7,64位,图形适配器是NVIDIA GeForce GT 610,我已经正确安装了图形驱动程序和CUDA 5,我使用CMake正确编译OpenCV2.4.6 + GPU。在发布模式下,一切正常,在调试模式下,无法显示图像(例如,无法执行namedWindow函数)。调试错误:OpenCV错误,未指定错误。
我卸载了OpenCV,比我安装的GTK2,重新启动计算机,我再次安装了OpenCV。释放模式,这是正常的,调试模式仍然出错,它不能显示图像。我重复了几次,仍然没有解决问题。
请帮助我解决这个问题。
提前感谢。

winodws 7, 64-bit, Graphics adapter is NVIDIA GeForce GT 610, I have correctly installed the graphics driver and CUDA 5, I use CMake correctly compiled OpenCV2.4.6 + GPU.In Release mode, everything is normal, but, in Debug mode, the image can not be displayed(For example, namedWindow function can not be performed). Debug Error:OpenCV Error, Unspecified error . I uninstalled OpenCV, than I installed GTK2, restart the computer, I installed OpenCV again. Release mode, it is normal, Debug mode is still wrong, it can't show images. I repeated several times, still does not solve the problem. Please help me in solving this problem. Thanks in advance.

推荐答案

使用CMake链接库和包含目录。

Use CMake to link libraries and include directories. It makes your life easier and also for anyone else who will be extending/reading your code in the future.

例如,要链接OpenCV,请使用以下代码行:

For example, to link OpenCV, use the follow lines of code:

FIND_PACKAGE( OpenCV REQUIRED )
TARGET_LINK_LIBRARIES( myProject ${OpenCV_LIBS} )

这篇关于OpenCV2.4.6 + CUDA5.0 + VS2010,在调试模式下,不显示图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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