随笔 - 67  文章 - 171  trackbacks - 0
<2016年4月>
272829303112
3456789
10111213141516
17181920212223
24252627282930
1234567

常用链接

留言簿(10)

随笔分类

随笔档案

连接资料

最新随笔

搜索

  •  

最新随笔

最新评论

VC6.0视频采集的步骤:
1、插入摄像头,安装驱动  VCap2800  USB2.0 DRV(windows 7)或者Vcap2820 sdk,两者依次尝试

 

注意:驱动有一下几种,如果USB2.0 DRVB不成功!!可以换驱动VCap2820 sdk进行尝试!!!

 

 

2、G:\VC++视频采集资料\USB2800\Vcap2820 sdk\Vcap2820 sdk目录下的    devwdm.ax   放到c:\windows\system32\目录下


3、打开 “运行”,输入   Regsvr32  c:\windows\system32\devwdm.ax   进行注册驱动 


4、创建VC工程,基于对话框


5、添加devwdm.dll  devwdm.h  devwdm.lib到项目中,这些是摄像头的相关API


5、在StdAfx.h文件中加载动态链接库
      #pragma comment(lib,"devwdm.lib")

  1. // stdafx.h : include file for standard system include files,  
  2. //  or project specific include files that are used frequently, but  
  3. //      are changed infrequently  
  4. //  
  5.   
  6. #if !defined(AFX_STDAFX_H__1357FC0D_0191_4DD3_8CB5_4A15DA0B970C__INCLUDED_)  
  7. #define AFX_STDAFX_H__1357FC0D_0191_4DD3_8CB5_4A15DA0B970C__INCLUDED_  
  8.   
  9. #if _MSC_VER > 1000  
  10. #pragma once  
  11. #endif // _MSC_VER > 1000  
  12.   
  13. #define VC_EXTRALEAN        // Exclude rarely-used stuff from Windows headers  
  14.   
  15. #include <afxwin.h>         // MFC core and standard components  
  16. #include <afxext.h>         // MFC extensions  
  17. #include <afxdisp.h>        // MFC Automation classes  
  18. #include <afxdtctl.h>     // MFC support for Internet Explorer 4 Common Controls  
  19. #ifndef _AFX_NO_AFXCMN_SUPPORT  
  20. #include <afxcmn.h>           // MFC support for Windows Common Controls  
  21. #endif // _AFX_NO_AFXCMN_SUPPORT  
  22.   
  23. //注册动态链接库  
  24. #pragma comment(lib,"devwdm.lib")  
  25.   
  26. //{{AFX_INSERT_LOCATION}}  
  27. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.  
  28.   
  29. #endif // !defined(AFX_STDAFX_H__1357FC0D_0191_4DD3_8CB5_4A15DA0B970C__INCLUDED_)  


6、添加头文件到响应的cpp应用文件中,进行测试

  1. #include "devwdm.h"  


 

  1. void CVideoDemoDlg::OnOK()   
  2. {  
  3.     // TODO: Add extra validation here  
  4.   
  5.     devwdm_InitCard(0,m_static.m_hWnd,300,400);//初始化  
  6.   
  7.     devwdm_StartVideoPreview(0);//启动  
  8.       
  9. //  CDialog::OnOK();  
  10. }  


 备注:相关资料下载http://download.csdn.net/detail/ma451152002/6334637

转载
自: http://blog.csdn.net/ma451152002/article/details/12138343

posted on 2016-04-24 22:57 cpsprogramer 阅读(1802) 评论(1)  编辑 收藏 引用 所属分类: VC++

FeedBack:
# re: VC++视频采集的步骤 2016-04-25 11:30 linda
视频采集难度很高啊  回复  更多评论
  

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理