Example.cpp File Reference
Detailed Description
Test and sample program for CodeVis VidCapture.
This program is a feature test of the CVVidCapture code. It shows how to perform simple image capture tasks for WebCams with the DirectShow interface from Microsoft.
You'll need the DirectX SDK installed and a WebCamera. I'm using DirectX 9.0, but it should work on some previous versions.
Compiled and tested with Visual C++ 6.0 and a Creative Labs WebCam.
- RCSfile
- Example.cpp,v
- Date
- 2004/02/18 09:40:39
- Revision
- 1.2
- Author
- mikeellison
Definition in file Example.cpp.
#include <stdio.h>
#include "VidCapture.h"
#include "CVUtil.h"
Go to the source code of this file. Defines
Functions
Variables
Define Documentation
Function Documentation
| bool capCallback |
( |
CVRES |
status, |
|
|
CVImage * |
image, |
|
|
void * |
userParam |
|
) |
|
|
| bool enumCallback |
( |
const char * |
devname, |
|
|
void * |
userParam |
|
) |
|
|
|
|
Callback for enumeration of capture devices.
We're just saving the first one that comes by into gDeviceName[] and using it.
- See also:
- CVVidCapture::CVVIDCAP_ENUMCB
Definition at line 424 of file Example.cpp.
References gDeviceName, and gDevNum. |
| void SlowNegateImage |
( |
CVImage * |
image |
) |
|
|
|
|
Primary test function. - Returns:
- bool - true on successful run. may return false for a variety of reasons - check prints and traces for errors.
Definition at line 177 of file Example.cpp.
References CVPlatform::AcquireVideoCapture(), CVVidCapture::CAMERAPROP_BRIGHT, CVVidCapture::CAMERAPROP_CONTRAST, capCallback(), CVVidCapture::Connect(), CVFAILED, CVImage::CVIMAGE_GREY, CVImage::CVIMAGE_RGB24, CVSUCCESS, CVVidCapture::VIDCAP_DEVICE::DeviceString, CVVidCapture::Disconnect(), CVVidCapture::VIDCAP_MODE::EstFrameRate, gDeviceName, CVVidCapture::GetCurrentMode(), CVVidCapture::GetDeviceInfo(), CVVidCapture::GetDeviceName(), CVVidCapture::GetFormatModeName(), CVVidCapture::GetModeInfo(), CVVidCapture::GetNumDevices(), CVVidCapture::GetNumSupportedModes(), CVPlatform::GetPlatform(), CVVidCapture::GetPropertyInfo(), CVVidCapture::Grab(), CVVidCapture::Init(), CVVidCapture::VIDCAP_MODE::InputFormat, CVPlatform::Release(), CVImage::ReleaseImage(), CVImage::Save(), CVVidCapture::SetMode(), CVVidCapture::SetProperty(), CVVidCapture::StartImageCap(), CVVidCapture::Stop(), CVVidCapture::Uninit(), CVVidCapture::VIDCAP_MODE::XRes, and CVVidCapture::VIDCAP_MODE::YRes.
Referenced by main(). |
Variable Documentation
|