VC++中视频采集系统(摄像头的制作,串口通信的应用)
2013-11-26 09:50
471 查看
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")
[cpp] view
plaincopy
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
#if !defined(AFX_STDAFX_H__1357FC0D_0191_4DD3_8CB5_4A15DA0B970C__INCLUDED_)
#define AFX_STDAFX_H__1357FC0D_0191_4DD3_8CB5_4A15DA0B970C__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MFC extensions
#include <afxdisp.h> // MFC Automation classes
#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h> // MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT
//注册动态链接库
#pragma comment(lib,"devwdm.lib")
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_STDAFX_H__1357FC0D_0191_4DD3_8CB5_4A15DA0B970C__INCLUDED_)
6、添加头文件到响应的cpp应用文件中,进行测试
[cpp] view
plaincopy
#include "devwdm.h"
[cpp] view
plaincopy
void CVideoDemoDlg::OnOK()
{
// TODO: Add extra validation here
devwdm_InitCard(0,m_static.m_hWnd,300,400);//
注意:驱动有一下几种,如果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")
[cpp] view
plaincopy
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
#if !defined(AFX_STDAFX_H__1357FC0D_0191_4DD3_8CB5_4A15DA0B970C__INCLUDED_)
#define AFX_STDAFX_H__1357FC0D_0191_4DD3_8CB5_4A15DA0B970C__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MFC extensions
#include <afxdisp.h> // MFC Automation classes
#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h> // MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT
//注册动态链接库
#pragma comment(lib,"devwdm.lib")
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_STDAFX_H__1357FC0D_0191_4DD3_8CB5_4A15DA0B970C__INCLUDED_)
6、添加头文件到响应的cpp应用文件中,进行测试
[cpp] view
plaincopy
#include "devwdm.h"
[cpp] view
plaincopy
void CVideoDemoDlg::OnOK()
{
// TODO: Add extra validation here
devwdm_InitCard(0,m_static.m_hWnd,300,400);//
相关文章推荐
- VC++中视频采集系统(摄像头的制作,串口通信的应用)
- C语言实例编程:回溯法计算总费用最小费用
- 回溯算法----C语言 迷宫问题
- 回溯算法解迷宫问题(C语言)
- "delete this" in C++
- 八皇后问题 回溯法 C++ 含迭代器
- auto_ptr详解
- 回溯算法C++代码-----用递归函数设计八皇后问题的
- Type of 'this' pointer in C++
- [转]C C++ TDD单元测试非常好的书
- 迷宫求解(C语言回溯法)
- 'this' pointer in C++
- C++实现回溯
- C++标准库中的数学函数
- 编程这件小事儿之C语言篇:C语言自学必备
- Static data members in C++
- 计算表达式
- Some interesting facts about static member functions in C++
- C++ 虚函数表解析
- 简单计算器