LTI-Lib latest version v1.9 - last update 10 Apr 2010

lti::toUCam Class Reference

Philips USB ToUCam "frame grabber". More...

#include <ltiToUCam.h>

Inheritance diagram for lti::toUCam:
Inheritance graph
[legend]
Collaboration diagram for lti::toUCam:
Collaboration graph
[legend]

List of all members.

Classes

class  parameters
 frameGrabber parameters class More...

Public Member Functions

 toUCam (const bool initialize=true)
 toUCam (const std::string &device, const bool initialize=true)
 toUCam (const toUCam &other)
 toUCam (const parameters &theParam)
virtual ~toUCam (void)
const parametersgetParameters () const
virtual bool setParameters (const functor::parameters &theParam)
virtual const char * getTypeName () const
bool apply (image &theImage)
bool apply (channel8 &theChannel)
toUCamcopy (const toUCam &other)
functorclone () const
bool isInitialized () const
bool init ()

Protected Types

enum  eLastGrabbedType { NotUsedYet, Gray, Color }

Protected Member Functions

bool setCameraParameters ()
void initializeLUTs ()

Protected Attributes

point size
point minSize
point maxSize
bool initialized
std::string camName
int cameraHndl
eLastGrabbedType lastGrabbed
parameters lastUsedParams

Static Protected Attributes

static const ubytelutSaturation



static const int * lutUg
static const int * lutUb
static const int * lutVg
static const int * lutVr

Detailed Description

Philips USB ToUCam "frame grabber".

This class allows capturing images from the USB camera ToUCam and other compatible web-cams (see here). Even if there is no physical frame-grabber, this class provides the standard frameGrabber interface to simplify its use.

At this time, only an implementation for Linux is provided.

Don't forget to uncomment the line "#define _USE_PHILIPS_TOUCAM" in the file ltiHardwareConfig.h before compiling, or at least ensure that this symbol is defined. If you are using the LTI-Lib Makefiles, you can also define that symbol in the ltilib/linux/extrapaths.mk file.

Please ensure that the file pwc-ioctl.h is in the standard include path. This file is usually included in your Linux kernel sources (/usr/src/linux/drivers/usb).

This functor has been adapted to be used with the newest kernel modules provided at http://www.saillard.org/linux/pwc/. Follow the instructions there to install it.

Warning:
When you install the module using module-assistant in any Debian-based Linux, ensure that only the newest pwc.ko modules survives. Otherwise you may get weird error messages due to the use of an obsolete module in the standard kernel.

You can also check the wiki page of the LTI-Lib for more information (http://ltilib.pdoerfler.com/wiki/ToUCam).


Member Enumeration Documentation

type to specify which kind of images (gray or color) was grabbed the last time

Enumerator:
NotUsedYet 

no grabbing yet

Gray 

gray channel grabbed

Color 

color channel grabbed


Constructor & Destructor Documentation

lti::toUCam::toUCam ( const bool  initialize = true  ) 

default constructor

lti::toUCam::toUCam ( const std::string &  device,
const bool  initialize = true 
)

Constructor with initialization for the given device.

lti::toUCam::toUCam ( const toUCam other  ) 

copy constructor

lti::toUCam::toUCam ( const parameters theParam  ) 

constructor, sets the parameters

virtual lti::toUCam::~toUCam ( void   )  [virtual]

destructor


Member Function Documentation

bool lti::toUCam::apply ( channel8 theChannel  )  [virtual]

load a grey value channel from the camera

Implements lti::frameGrabber.

bool lti::toUCam::apply ( image theImage  )  [virtual]

load an (color) image from the camera

Implements lti::frameGrabber.

functor* lti::toUCam::clone (  )  const [virtual]

clone member

Implements lti::functor.

toUCam& lti::toUCam::copy ( const toUCam other  ) 

copy member

Reimplemented from lti::frameGrabber.

const parameters& lti::toUCam::getParameters (  )  const

returns current parameters.

Reimplemented from lti::frameGrabber.

virtual const char* lti::toUCam::getTypeName (  )  const [virtual]

returns the name of this type

Reimplemented from lti::frameGrabber.

bool lti::toUCam::init (  )  [virtual]

initialize frame grabber

Implements lti::frameGrabber.

void lti::toUCam::initializeLUTs (  )  [protected]

initialize the Look-Up-Tables

bool lti::toUCam::isInitialized (  )  const

check if the frame grabber has been initialized

bool lti::toUCam::setCameraParameters (  )  [protected]

set the camera parameters

virtual bool lti::toUCam::setParameters ( const functor::parameters theParam  )  [virtual]

setParameters overload to allow changing the camera attributes

Reimplemented from lti::functor.


Member Data Documentation

int lti::toUCam::cameraHndl [protected]

the camera file handle.

this is valid only if initialized is true

std::string lti::toUCam::camName [protected]

name of the camera being used

bool lti::toUCam::initialized [protected]

flag indicates if the camera interface has been initialized

last grabbed type

last used parameter values (used to check if a value needs to be changed).

These are needed to spare some time sending the new parameters to the camera

const ubyte* lti::toUCam::lutSaturation [static, protected]

look up table to accelerate computation of saturation

const int* lti::toUCam::lutUb [static, protected]

look up tables to accelerate conversion Luv -> RGB

const int* lti::toUCam::lutUg [static, protected]

look up tables to accelerate conversion Luv -> RGB

const int* lti::toUCam::lutVg [static, protected]

look up tables to accelerate conversion Luv -> RGB

const int* lti::toUCam::lutVr [static, protected]

look up tables to accelerate conversion Luv -> RGB

When the camera is initialized, this value is set to the maximum available image size.

When the camera is initialized, this value is set to the minimum available image size.

point lti::toUCam::size [protected]

the actual capture size for the images


The documentation for this class was generated from the following file:

Generated on Sat Apr 10 15:28:07 2010 for LTI-Lib by Doxygen 1.6.1