Guidance:
This article, in conjunction with examples, describes some experience in video capture programming using vedio for Windows, hoping to help you.
1. Introduction to vedio for Windows
Vedio for Windows is a video development tool for multimedia programming SDK in Win32 SDK. In Microsoft's Visual C ++, The vedio for Windows header file VFW. h and library file vfw32.lib are provided. Table 1 lists some VFW functions and macros commonly used in video capture programming in VFW.
Ii. programming example of video capturing using VC ++ 6.0
Recently, I used VC ++ 6.0 to develop an optical automatic target reporting system. The front-end of the system uses video capture. The following examples describe how to implement video capture programming.
1. Use Visual C ++'s Appwizard to generate a dialog box-based application and add the following content to srdafx. h:
# Include
# Pragma comment (Lib, "vfw32.lib ")
2. Modify the dialog box resource, add static control idc_video and buttons "capture", "stop", "set format", "set image source", "set compression", "single frame capture", and "Fixed Frame" and "exit ".
3. Add the following description to the header file of the dialog box.
Hwnd m_hcapwnd; // indicates the window
Bool m_binit; // capture device Initialization
Capdrivercaps m_capdrvcap; // cap