latest version v1.9 - last update 10 Apr 2010 |
Philips USB ToUCam "frame grabber". More...
#include <ltiToUCam.h>
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 parameters & | getParameters () const |
virtual bool | setParameters (const functor::parameters &theParam) |
virtual const char * | getTypeName () const |
bool | apply (image &theImage) |
bool | apply (channel8 &theChannel) |
toUCam & | copy (const toUCam &other) |
functor * | clone () 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 ubyte * | lutSaturation |
static const int * | lutUg |
static const int * | lutUb |
static const int * | lutVg |
static const int * | lutVr |
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.
You can also check the wiki page of the LTI-Lib for more information (http://ltilib.pdoerfler.com/wiki/ToUCam).
enum lti::toUCam::eLastGrabbedType [protected] |
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
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.
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.
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
eLastGrabbedType lti::toUCam::lastGrabbed [protected] |
last grabbed type
parameters lti::toUCam::lastUsedParams [protected] |
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
point lti::toUCam::maxSize [protected] |
point lti::toUCam::minSize [protected] |
point lti::toUCam::size [protected] |
the actual capture size for the images