- 1、本文档共30页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
学习资料vc 捕捉摄像头视频!(Learning materials vc capture video camera!).doc
学习资料vc++ 捕捉摄像头视频!(Learning materials vc++ capture video camera!)
Abstract: This paper mainly talks about the programming idea of video capture (capturing static image) with Directshow, and provides a video capture class CcaptureVideo and an example for camera programming.
Preface
DirectShow is a package developed by Microsoft Corp for streaming media processing on Windows platform, which is released with DirectX development kit. DirectShow provides strong support for capture and playback of multimedia streams. Using DirectShow to develop applications, we can easily capture data from the acquisition card supporting the WDM driver model, and then the corresponding post-processing, and even stored in the file.
DirectShow is based on COM, in order to write DirectShow applications, you need to understand the basic knowledge of COM client programming. DirectShow provides a large number of interfaces, but it is not convenient to find it in programming. If you can build a video capture class to encapsulate some of the commonly used actions, then it will be more convenient.
Programming ideas
In order to establish video capture application, DirectShow provides a Graph called Capture Builder Capture Graph Builder, IcaptureGraphBuilder2 interface, the interface can establish and control Capture Graph.
To build a video capture program, you must first obtain and initialize the IcaptureGraphBuilder2 interface, and then select an appropriate video capture device. After selecting a good device, create Capture filter for the device, and then call AddFilter to add Capture filter to Filter Graph.
If you just want to use the camera for real-time monitoring, you only need to call ICaptureGraphBuilder2:: RenderStream on the basis of the above:
ICaptureGraphBuilder2 *pBuild; / / Capture Graph Builder
The initialization code / ellipsis
IBaseFilter *pCap; / / Video capture filter.
Omit the initialization and added to the Filter / Graph part of the code
PBuild-RenderStream (PIN_CATEGORY_PREVI
您可能关注的文档
- 局域网访问需要密码的解决问题)(LAN access requires password resolution).doc
- 版:(江苏)unit the world of colours and light.docx
- 中如何插入超链接.doc
- New Studies on Buddhism via Lessons on Pali - ….doc
- 离心喷雾干燥机说明书.doc
- 毕业设计(论文)-D型活塞压缩机关键零部件的有限元分析.doc
- 2016年江苏成考高起专层次省控线下征求平行志愿投档线[权威资料].doc
- 对复叠式热泵热水系统准稳态分析的性能研究.doc
- 大蒜播种机中振动筛和排种器的整合设计.doc
- 届浙江省温州市十校联合体高三上学期期中联考政治试题及答案.doc
文档评论(0)