KWebCam grabs frames from a webcam. ( 320x240x16bpp )

Not available on mac OS X yet.


Note that it is not possible to change the size of the grabbing in the current version.

includes :

#include "KWebCam.h"


Library :
KWebCam.lib

Microsoft Windows:
vfw32.lib

Mac OS X:
n/a
Quick Reference

getCameraInfo
getPixels
setCamera
startCapture
stopCapture

char* getCameraInfo( long index ) ;
Returns the name of a camera ( range 0 to 9 ).
Returns NULL if no camera is available.

Example :
KWebCam *webCam ;
webCam = new KWebCam ;
char *cameraName = webCam->getCameraInfo( 0 ) ; //retrieves the name of the first camera

bool setCamera( HWND parentWindow , long index ) ;
Selects the camera for future grabbing.

Example :
webCam->setCamera( KWindow::getWindowHandle() , 0 ) ;

unsigned short *getPixels( void ) ;

Returns the adress of the pixel buffer.
The pixel buffer is a 320x240x16bpp buffer.

Example :
unsigned short *pixelBuffer ;
pixelBuffer = webCam->
getPixels( ) ;
if ( pixelBuffer == NULL ) { NoWebCamError() ; }

bool startCapture( long FrameEveryMicroseconds ) ;
Starts grabbing, the parameter represents the delay in microseconds between each frame.

Example :
webCam->startCapture( 1000000 ) ; //grab a frames every second.

void stopCapture( void )
stops the current capture session.

Example :
webCam->stopCapture() ;



© 2003, Phelios, inc. - All rights reserved.
Metrowerks, the Metrowerks logo, and CodeWarrior are trademarks or registered trademarks of Metrowerks Corp. in the US and/orother countries.
Mac and Macintosh are trademarks of Apple, Inc.
Windows and Windows NT are registered trademarks of MicrosoftCorp.
Trademarks mentioned are the property of their respective owners.