无法在Visual C ++ 2008中调试OpenCV项目 [英] Can't debug an OpenCV project in Visual C++ 2008

查看:59
本文介绍了无法在Visual C ++ 2008中调试OpenCV项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我已经下载了一个OpenCV项目,该项目可以从网络摄像机捕获视频.它调用OpenCV函数cvCaptureFromCAM(CV_CAP_ANY)从凸轮捕获视频.

我在64位Windows 7计算机上使用调试win32配置进行编译.当我从调试"菜单中选择无需调试就开始"时,程序将运行并显示捕获源"对话框,以允许我选择网络摄像头,然后按需要显示捕获的视频.

但是,当我选择开始调试"时,cvCaptureFromCAM返回null而不允许我选择设备.

我不确定进入代码需要做些什么.我什至不确定这是OpenCv问题还是Visual C ++问题.

我希望有人可以对此问题有所了解???

非常感谢...

Hi
I''ve downloaded an OpenCV project that captures video from a web camera. It calls the OpenCV function cvCaptureFromCAM( CV_CAP_ANY ) to capture the video from the cam.

I compile with a debug win32 configuration on a 64bit windows 7 computer. When I choose ''start without debugging'' from the Debug menu, the program works and and displays the ''capture source'' diaglog to allow me to select a web cam and then displays the capture video as it should.

However, when I choose ''Start Debuggin'', cvCaptureFromCAM returns null without allowing me to select the device.

I''m not sure what I need to do to get to step into the code. I''m not even sure if this is an OpenCv issue or a Visual C++ problem.

I was hoping someone could throw a little light on this issue????

Many thanks...

推荐答案

这肯定是一个OpenCV问题,因为对cvCaptureFromCAM(0的调用返回了NULL.但是,很可能是您在代码的早期或设置中所做的某些事情是根本原因.尝试完全重建Debug项目,并检查Debug和Release版本的设置是否相同.
It would be certainly seem to be an OpenCV issue, since the call to cvCaptureFromCAM(0 is returning a NULL. However, it may well be that something you have done either earlier in your code, or in your setup is the root cause. Try a complete rebuild of your Debug project and also check that your setup is identical for the Debug and Release versions.


这篇关于无法在Visual C ++ 2008中调试OpenCV项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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