Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
BIAS::VideoSource_V4L Class Reference

This class extends VideoSource for the use of Video4Linux supported devices like framegrabber, USB cameras. More...

#include <VideoSource/VideoSource_V4L.hh>

+ Inheritance diagram for BIAS::VideoSource_V4L:
+ Collaboration diagram for BIAS::VideoSource_V4L:

Public Member Functions

void AddDebugLevel (const long int lv)
 
void AddDebugLevel (const std::string &name)
 
virtual int AutoMode (int a, bool b)
 Use this to enable/disable any automatic modes addressed via enumerations. More...
 
virtual int CloseDevice ()
 
bool DebugLevelIsSet (const long int lv) const
 
bool DebugLevelIsSet (const std::string &name) const
 
virtual void EnsureLatestFrame (const bool b)
 
int GetAllDevices (std::vector< std::string > &devices)
 
bool GetAutoBrightness ()
 
virtual bool GetAutoContrast ()
 
bool GetAutoGain ()
 
bool GetAutoShutter ()
 
float GetBrightness ()
 Get brightness as value in interval [0, 100]. */. More...
 
virtual void GetBrightnessRange (double &min, double &max)
 
float GetBytesPerPixel () const
 
int GetCapabilities (VideoSourceCapabilities &caps)
 Use this method to learn something about the capabilities of the source (only useful for V4L sources, e.g. More...
 
int GetCapabilities (const char *device, VideoSourceCapabilities &caps)
 
int GetColorChannels () const
 
BIAS::ImageBase::EColorModel GetColorModel () const
 
float GetContrast ()
 Get contrast as value in interval [0, 100]. */. More...
 
virtual void GetContrastRange (double &min, double &max)
 
int GetDebugLevel () const
 
std::ostream & GetDebugStream () const
 
void GetDebugStream (std::ostream &os) const
 
void GetDeviceChannelNames (std::vector< std::string > &names)
 if more than one channel is present names can are returned here. More...
 
virtual unsigned int GetFeature (int feature)
 This function is used to query features like shutter, zoom, etc. More...
 
float GetGain ()
 Get gain in dB. More...
 
virtual void GetGainRange (double &min, double &max)
 
int GetHeight () const
 
int GetID () const
 
std::string GetIdentifier () const
 
float GetShutter ()
 Get shutter (exposure time) in seconds. More...
 
virtual void GetShutterRange (double &min, double &max)
 
virtual int GetWhiteBalance (float &rvalue, float &bvalue)
 Get white balance as values in interval [0, 100]. */. More...
 
int GetWidth () const
 
virtual int GrabSingle (BIAS::Camera< unsigned char > &image)
 blocks until a new frame arrives from the cam, if dont want blocking set waitForNew() to false More...
 
virtual int GrabSingle (BIAS::Camera< float > &image)
 
virtual int GrabSingle (BIAS::Camera< char > &image)
 
virtual int GrabSingle (BIAS::Camera< short int > &image)
 
virtual int GrabSingle (BIAS::Camera< int > &image)
 
virtual int GrabSingle (BIAS::Camera< unsigned short int > &image)
 
virtual int GrabSingle (BIAS::Camera< unsigned int > &image)
 
virtual int GrabSingle (BIAS::Camera< double > &image)
 
bool HasControlBrightness ()
 
bool HasControlContrast ()
 
bool HasControlGain ()
 
bool HasControlShutter ()
 
bool HasControlWhiteBalance ()
 
virtual int InitImage (BIAS::ImageBase &Image)
 
bool IsActive () const
 
bool IsControllable ()
 Specify if SetShutter(), SetGain() ... would work for this camera. More...
 
long int Name2DebugLevel (const std::string &name) const
 looks up a debuglevel in the internal map, returns 0 if not found More...
 
long int NewDebugLevel (const std::string &name)
 creates a new debuglevel More...
 
virtual int OnePushAuto (int feature)
 
virtual int OpenDevice ()
 selects the first available device to open (e.g. More...
 
virtual int OpenDevice (const char *device)
 a device name like "/dev/video1" can be specified here More...
 
virtual int OpenDevice (int device)
 a device number can be specified here (DCAM) or port number (Net) More...
 
virtual int OpenDevice (std::string Prefix, std::string Postfix, int DigitCount, int PictureCount, int StartCount=0)
 used by derived class VideoSource_Disk More...
 
virtual int OpenDevice (const std::vector< std::string > &FileNames)
 used by derived class VideoSource_Disk More...
 
int PostGrab ()
 Stop anything started in PreGrab() More...
 
int PreGrab ()
 Do last preparations before grabbing (e.g. start ISO transfer) More...
 
void PrintDebugLevel (std::ostream &os=std::cout) const
 
void RemoveDebugLevel (const long int lv)
 
void RemoveDebugLevel (const std::string &name)
 
void ResetPanTiltZoom ()
 Reset digital zoom, pan and tilt to defaults to ensure compliance with calibration. More...
 
void SetAutoBrightness (bool b)
 
virtual void SetAutoContrast (bool b)
 
void SetAutoGain (bool b)
 
void SetAutoShutter (bool b)
 
int SetBrightness (float g)
 Set brightness as value in interval [0, 100]. */. More...
 
void SetBytesPerPixel (unsigned char bpp)
 
virtual int SetColorModel (BIAS::ImageBase::EColorModel mode)
 Select colormodel to use. More...
 
int SetContrast (float g)
 Set contrast as value in interval [0, 100]. */. More...
 
void SetDebugLevel (const long int lv)
 
void SetDebugLevel (const std::string &name)
 
void SetDebugStream (const std::ostream &os)
 
void SetDeviceChannel (int channel)
 Use channel to select one of many cameras on the same. More...
 
int SetDirectToDisk (const std::string &filename)
 Enables the very fast direct-to-disk mode. More...
 
virtual void SetExternalTrigger (bool trigger=true)
 Specify if there is an external trigger to be used. More...
 
virtual int SetFeature (int feature, unsigned int value)
 This function is used to control features like shutter, zoom, etc. More...
 
void SetFPS (float fps)
 Set frame per second for image capturing. More...
 
int SetGain (float g)
 Set gain in dB. More...
 
int SetShutter (float g)
 Set shutter (exposure time) in seconds. More...
 
virtual void SetSize (int w, int h, int bytesperpixel=1)
 Set image size and number of bytes per pixel (e.g. More...
 
virtual void SetWaitForNew (bool waitForNew)
 Specify if grab should wait for new frames. More...
 
virtual int SetWhiteBalance (float rvalue, float bvalue)
 Set white balance as values in interval [0, 100]. */. More...
 
void ShowDebugLevel (std::ostream &os=std::cout) const
 prints all internally known debuglevels More...
 
virtual int SoftwareWhiteBalance ()
 Set white balance to optimal value in software. More...
 
 VideoSource_V4L ()
 
virtual ~VideoSource_V4L ()
 

Static Public Member Functions

static long int GetGlobalDebugLevel ()
 
static void SetGlobalDebugLevel (long int lev)
 

Protected Member Functions

long ConsumeNextFreeDebuglevel_ ()
 returns the next available debuglevel More...
 
void FixIdentifierString_ ()
 
int WriteDirect_ (const unsigned char *data, const BIAS::UUID &uuid, const long int &sec, const long int &usec)
 

Static Protected Member Functions

static void * GrabContThread_ (void *arg)
 

Protected Attributes

long int _liDebugLevel
 
long int _liNextDebugLevel
 new concept, debuglevel are managed here in the debug class More...
 
std::map< std::string, long int > _String2Debuglevel
 
bool Active_
 Active flag is set in PreGrab() und unset in PostGrab() More...
 
unsigned ActiveFrame_
 
pthread_mutex_t ActiveFrameMutex_
 
bool bExternalTrigger_
 External trigger flag. More...
 
struct v4l2_buffer buffer_
 
std::vector< struct buffer > Buffers_
 
float BytesPerPixel_
 BytesPerPixel cannot be int (e.g. it is 1.5 for YUV420p) More...
 
struct v4l2_capability capability2
 
int ColorChannels_
 
BIAS::ImageBase::EColorModel ColorMode_
 Color mode used by camera. More...
 
bool CompleteInitialized_
 Complete_initialized_ is set when OpenDevice(), UseChannel() etc. are done. More...
 
pthread_t ContinousThread_
 
struct v4l2_queryctrl ControlAutoGain_
 
struct v4l2_queryctrl ControlBrightness_
 
struct v4l2_queryctrl ControlContrast_
 
struct v4l2_queryctrl ControlGain_
 
struct v4l2_queryctrl ControlPanReset_
 
struct v4l2_queryctrl ControlShutter_
 
struct v4l2_queryctrl ControlTiltReset_
 
struct v4l2_queryctrl ControlZoom_
 
BIAS::JpegHandler Decompressor_
 
const char * DefaultDevice_
 Device name. More...
 
int DeviceChannel_
 Device channel. More...
 
std::vector< std::string > deviceChannelNames_
 
bool DirectToDisk_
 Write directly to disk. More...
 
char * DtDBuffer_
 512 byte aligned buffer, contains VSImageHeader and image data More...
 
unsigned int DtDBufferSize_
 Buffer size must be multiple of 512. More...
 
int DtDFd_
 File descriptor for direct-to-disk mode. More...
 
BIAS::VideoStream::VSImageHeaderDtDImageHeader_
 Pointer to the beginning of DtDBuffer_. More...
 
char * DtDStartOfImage_
 Pointer into DtDBuffer after VSImageHeader. More...
 
int fd
 
struct v4l2_format format2_
 
struct v4l2_format formatRGB_
 
std::vector< BIAS::Camera
< unsigned char > > 
Frame_
 
float FramesPerSecond_
 Capturing framerate. More...
 
bool Grabbing_
 Grabbing flag is set and unset in GrabSingle() methods. More...
 
struct timeval GrabTime_
 
int Height_
 
int ID_
 Camera ID. More...
 
std::string Identifier_
 Verbose camera descriptor. More...
 
unsigned int ImageSize_
 Image size, useful for allocating and copying memory. More...
 
v4l2_field interlaceMode_
 
bool IsControllable_
 Must be initialized be the derived classes. More...
 
bool isJPEG_
 
BIAS::Camera< unsigned char > jpegImg_
 
double maxBrightness_
 
double maxContrast_
 
double maxGain_
 
double maxShutter_
 
double minBrightness_
 
double minContrast_
 Feature ranges. More...
 
double minGain_
 
double minShutter_
 
std::map< std::string,
std::string > 
ModelNameToDevice_
 
bool newFrame_
 
unsigned int numBuffers_
 
bool ReadFirstFrame_
 
struct v4l2_requestbuffers reqBuf
 
bool WaitForNew_
 Wait for new frames in GrabSingle() More...
 
int Width_
 Image format. More...
 

Static Protected Attributes

static std::ostream _zDebugStream
 
static long int GlobalDebugLevel = 0
 

Detailed Description

This class extends VideoSource for the use of Video4Linux supported devices like framegrabber, USB cameras.

Author
evers, v4l2 by grest
See Also
ExampleV4L.cpp
Examples:
ExampleV4L.cpp.

Definition at line 59 of file VideoSource_V4L.hh.

Constructor & Destructor Documentation

VideoSource_V4L::VideoSource_V4L ( )
VideoSource_V4L::~VideoSource_V4L ( )
virtual

Definition at line 88 of file VideoSource_V4L.cpp.

References fd.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( const long int  lv)
inlineinherited
void BIAS::Debug::AddDebugLevel ( const std::string &  name)
inlineinherited

Definition at line 362 of file Debug.hh.

int VideoSource::AutoMode ( int  a,
bool  b 
)
virtualinherited

Use this to enable/disable any automatic modes addressed via enumerations.

Definition at line 283 of file VideoSource_Base.cpp.

int VideoSource_V4L::CloseDevice ( )
virtual
long BIAS::Debug::ConsumeNextFreeDebuglevel_ ( )
inlineprotectedinherited

returns the next available debuglevel

Author
woelk 09/2006

Definition at line 521 of file Debug.hh.

bool BIAS::Debug::DebugLevelIsSet ( const long int  lv) const
inlineinherited
bool BIAS::Debug::DebugLevelIsSet ( const std::string &  name) const
inlineinherited

Definition at line 350 of file Debug.hh.

virtual void BIAS::VideoSource::EnsureLatestFrame ( const bool  b)
inlinevirtualinherited
void VideoSource_V4L::FixIdentifierString_ ( )
protected

try to extract vendor/product string from system's map file mapfile's syntax: vendorID vendor string productID product

to be extended as necessary

ubuntu jaunty

first: find vendor

found vendor, stop

second: find product

reached next vendor, i.e. no product found

found product, stop

Definition at line 615 of file VideoSource_V4L.cpp.

References BIAS::VideoSource::Identifier_.

Referenced by GetAllDevices().

int VideoSource_V4L::GetAllDevices ( std::vector< std::string > &  devices)
virtual
bool BIAS::VideoSource_V4L::GetAutoBrightness ( )
inlinevirtual

Reimplemented from BIAS::VideoSource.

Definition at line 119 of file VideoSource_V4L.hh.

virtual bool BIAS::VideoSource::GetAutoContrast ( )
inlinevirtualinherited

Reimplemented in BIAS::VideoSource_DSHOW.

Definition at line 257 of file VideoSource_Base.hh.

bool VideoSource_V4L::GetAutoGain ( )
virtual

Reimplemented from BIAS::VideoSource.

Definition at line 1270 of file VideoSource_V4L.cpp.

bool VideoSource_V4L::GetAutoShutter ( )
virtual

Reimplemented from BIAS::VideoSource.

Definition at line 1258 of file VideoSource_V4L.cpp.

float VideoSource_V4L::GetBrightness ( )
virtual

Get brightness as value in interval [0, 100]. */.

Reimplemented from BIAS::VideoSource.

Definition at line 1296 of file VideoSource_V4L.cpp.

References BIAS::VideoSource::CompleteInitialized_, and ControlBrightness_.

virtual void BIAS::VideoSource::GetBrightnessRange ( double &  min,
double &  max 
)
inlinevirtualinherited
float BIAS::VideoSource::GetBytesPerPixel ( ) const
inlineinherited

Definition at line 193 of file VideoSource_Base.hh.

int VideoSource_V4L::GetCapabilities ( VideoSourceCapabilities caps)
virtual

Use this method to learn something about the capabilities of the source (only useful for V4L sources, e.g.

/dev/video0). Output is send to stdout.

Reimplemented from BIAS::VideoSource.

Definition at line 130 of file VideoSource_V4L.cpp.

References BIAS::VideoSource::DefaultDevice_.

int VideoSource_V4L::GetCapabilities ( const char *  device,
VideoSourceCapabilities caps 
)
virtual
int BIAS::VideoSource::GetColorChannels ( ) const
inlineinherited
BIAS::ImageBase::EColorModel BIAS::VideoSource::GetColorModel ( ) const
inlineinherited
float VideoSource_V4L::GetContrast ( )
virtual

Get contrast as value in interval [0, 100]. */.

Reimplemented from BIAS::VideoSource.

Definition at line 1336 of file VideoSource_V4L.cpp.

References BIAS::VideoSource::CompleteInitialized_, and ControlContrast_.

virtual void BIAS::VideoSource::GetContrastRange ( double &  min,
double &  max 
)
inlinevirtualinherited
int BIAS::Debug::GetDebugLevel ( ) const
inlineinherited
std::ostream& BIAS::Debug::GetDebugStream ( ) const
inlineinherited

Definition at line 405 of file Debug.hh.

void BIAS::Debug::GetDebugStream ( std::ostream &  os) const
inlineinherited

Definition at line 414 of file Debug.hh.

void VideoSource_V4L::GetDeviceChannelNames ( std::vector< std::string > &  names)
virtual

if more than one channel is present names can are returned here.

the position in the vector corresponds to the channel number in SetChannel()

Attention
GetCapabilities() has to be called before

Reimplemented from BIAS::VideoSource.

Definition at line 343 of file VideoSource_V4L.cpp.

References deviceChannelNames_.

unsigned int VideoSource::GetFeature ( int  feature)
virtualinherited

This function is used to query features like shutter, zoom, etc.

Definition at line 290 of file VideoSource_Base.cpp.

float VideoSource_V4L::GetGain ( )
virtual

Get gain in dB.

Reimplemented from BIAS::VideoSource.

Definition at line 1232 of file VideoSource_V4L.cpp.

References BIAS::VideoSource::CompleteInitialized_, and ControlGain_.

virtual void BIAS::VideoSource::GetGainRange ( double &  min,
double &  max 
)
inlinevirtualinherited

Definition at line 238 of file VideoSource_Base.hh.

static long int BIAS::Debug::GetGlobalDebugLevel ( )
inlinestaticinherited

Definition at line 431 of file Debug.hh.

int BIAS::VideoSource::GetHeight ( ) const
inlineinherited
int BIAS::VideoSource::GetID ( ) const
inlineinherited
Examples:
ExampleMDCamToShm.cpp.

Definition at line 206 of file VideoSource_Base.hh.

std::string BIAS::VideoSource::GetIdentifier ( ) const
inlineinherited

Definition at line 285 of file VideoSource_Base.hh.

float VideoSource_V4L::GetShutter ( )
virtual

Get shutter (exposure time) in seconds.

Reimplemented from BIAS::VideoSource.

Definition at line 1376 of file VideoSource_V4L.cpp.

References BIAS::VideoSource::CompleteInitialized_, and ControlShutter_.

virtual void BIAS::VideoSource::GetShutterRange ( double &  min,
double &  max 
)
inlinevirtualinherited

Definition at line 228 of file VideoSource_Base.hh.

int VideoSource::GetWhiteBalance ( float &  rvalue,
float &  bvalue 
)
virtualinherited

Get white balance as values in interval [0, 100]. */.

Reimplemented in BIAS::VideoSource_uEye.

Definition at line 335 of file VideoSource_Base.cpp.

int BIAS::VideoSource::GetWidth ( ) const
inlineinherited
void * VideoSource_V4L::GrabContThread_ ( void *  arg)
staticprotected

Definition at line 699 of file VideoSource_V4L.cpp.

References BIAS::VideoSource::Active_, and fd.

Referenced by PreGrab().

int VideoSource_V4L::GrabSingle ( BIAS::Camera< unsigned char > &  image)
virtual
int VideoSource::GrabSingle ( BIAS::Camera< float > &  image)
virtualinherited

Reimplemented in BIAS::VideoSource_Disk, and BIAS::VideoSource_Disk_Bayer.

Definition at line 229 of file VideoSource_Base.cpp.

int VideoSource::GrabSingle ( BIAS::Camera< char > &  image)
virtualinherited

Definition at line 252 of file VideoSource_Base.cpp.

int VideoSource::GrabSingle ( BIAS::Camera< short int > &  image)
virtualinherited

Definition at line 260 of file VideoSource_Base.cpp.

int VideoSource::GrabSingle ( BIAS::Camera< int > &  image)
virtualinherited

Definition at line 268 of file VideoSource_Base.cpp.

int VideoSource::GrabSingle ( BIAS::Camera< unsigned short int > &  image)
virtualinherited

Reimplemented in BIAS::VideoSource_Disk, and BIAS::VideoSource_Disk_Bayer.

Definition at line 236 of file VideoSource_Base.cpp.

int VideoSource::GrabSingle ( BIAS::Camera< unsigned int > &  image)
virtualinherited

Definition at line 244 of file VideoSource_Base.cpp.

int VideoSource::GrabSingle ( BIAS::Camera< double > &  image)
virtualinherited

Definition at line 276 of file VideoSource_Base.cpp.

bool VideoSource_V4L::HasControlBrightness ( )
virtual

Reimplemented from BIAS::VideoSource.

Definition at line 1396 of file VideoSource_V4L.cpp.

References ControlBrightness_.

bool VideoSource_V4L::HasControlContrast ( )
virtual

Reimplemented from BIAS::VideoSource.

Definition at line 1402 of file VideoSource_V4L.cpp.

References ControlContrast_.

bool VideoSource_V4L::HasControlGain ( )
virtual

Reimplemented from BIAS::VideoSource.

Definition at line 1414 of file VideoSource_V4L.cpp.

References ControlGain_.

bool VideoSource_V4L::HasControlShutter ( )
virtual

Reimplemented from BIAS::VideoSource.

Definition at line 1408 of file VideoSource_V4L.cpp.

References ControlShutter_.

bool BIAS::VideoSource_V4L::HasControlWhiteBalance ( )
inlinevirtual

Reimplemented from BIAS::VideoSource.

Definition at line 117 of file VideoSource_V4L.hh.

int VideoSource::InitImage ( BIAS::ImageBase Image)
virtualinherited
bool BIAS::VideoSource::IsActive ( ) const
inlineinherited

Definition at line 208 of file VideoSource_Base.hh.

bool BIAS::VideoSource::IsControllable ( )
inlineinherited

Specify if SetShutter(), SetGain() ... would work for this camera.

Definition at line 211 of file VideoSource_Base.hh.

long int BIAS::Debug::Name2DebugLevel ( const std::string &  name) const
inlineinherited

looks up a debuglevel in the internal map, returns 0 if not found

Author
woelk 09/2006

Definition at line 454 of file Debug.hh.

long int BIAS::Debug::NewDebugLevel ( const std::string &  name)
inlineinherited
int VideoSource::OnePushAuto ( int  feature)
virtualinherited

Definition at line 326 of file VideoSource_Base.cpp.

int VideoSource_V4L::OpenDevice ( )
virtual

selects the first available device to open (e.g.

/dev/video0 for V4L, id 0 = first camera for DCAM/DV)

Reimplemented from BIAS::VideoSource.

Definition at line 348 of file VideoSource_V4L.cpp.

References BIAS::VideoSource::DefaultDevice_.

Referenced by OpenDevice().

int VideoSource_V4L::OpenDevice ( const char *  device)
virtual
int VideoSource_V4L::OpenDevice ( int  device)
virtual

a device number can be specified here (DCAM) or port number (Net)

Reimplemented from BIAS::VideoSource.

Definition at line 461 of file VideoSource_V4L.cpp.

References OpenDevice().

int VideoSource::OpenDevice ( std::string  Prefix,
std::string  Postfix,
int  DigitCount,
int  PictureCount,
int  StartCount = 0 
)
virtualinherited

used by derived class VideoSource_Disk

Reimplemented in BIAS::VideoSource_Disk.

Definition at line 185 of file VideoSource_Base.cpp.

int VideoSource::OpenDevice ( const std::vector< std::string > &  FileNames)
virtualinherited
int VideoSource_V4L::PostGrab ( )
virtual

Stop anything started in PreGrab()

Reimplemented from BIAS::VideoSource.

Definition at line 594 of file VideoSource_V4L.cpp.

References BIAS::VideoSource::Active_, ActiveFrameMutex_, and ContinousThread_.

Referenced by CloseDevice().

int VideoSource_V4L::PreGrab ( )
virtual

Do last preparations before grabbing (e.g. start ISO transfer)

Reimplemented from BIAS::VideoSource.

Definition at line 572 of file VideoSource_V4L.cpp.

References BIAS::VideoSource::Active_, ContinousThread_, and GrabContThread_().

void BIAS::Debug::PrintDebugLevel ( std::ostream &  os = std::cout) const
inlineinherited

Definition at line 383 of file Debug.hh.

void BIAS::Debug::RemoveDebugLevel ( const long int  lv)
inlineinherited

Definition at line 369 of file Debug.hh.

void BIAS::Debug::RemoveDebugLevel ( const std::string &  name)
inlineinherited

Definition at line 376 of file Debug.hh.

void VideoSource_V4L::ResetPanTiltZoom ( void  )
virtual

Reset digital zoom, pan and tilt to defaults to ensure compliance with calibration.

Reimplemented from BIAS::VideoSource.

Definition at line 1420 of file VideoSource_V4L.cpp.

void BIAS::VideoSource_V4L::SetAutoBrightness ( bool  b)
inlinevirtual

Reimplemented from BIAS::VideoSource.

Definition at line 118 of file VideoSource_V4L.hh.

virtual void BIAS::VideoSource::SetAutoContrast ( bool  b)
inlinevirtualinherited

Reimplemented in BIAS::VideoSource_DSHOW.

Definition at line 256 of file VideoSource_Base.hh.

void VideoSource_V4L::SetAutoGain ( bool  b)
virtual

Reimplemented from BIAS::VideoSource.

Definition at line 1264 of file VideoSource_V4L.cpp.

void VideoSource_V4L::SetAutoShutter ( bool  b)
virtual

Reimplemented from BIAS::VideoSource.

Definition at line 1253 of file VideoSource_V4L.cpp.

int VideoSource_V4L::SetBrightness ( float  g)
virtual

Set brightness as value in interval [0, 100]. */.

Reimplemented from BIAS::VideoSource.

Definition at line 1276 of file VideoSource_V4L.cpp.

References BIAS::VideoSource::CompleteInitialized_, and ControlBrightness_.

void BIAS::VideoSource::SetBytesPerPixel ( unsigned char  bpp)
inlineinherited
Attention
Must be used before OpenDevice()!

Definition at line 183 of file VideoSource_Base.hh.

int VideoSource::SetColorModel ( BIAS::ImageBase::EColorModel  mode)
virtualinherited
int VideoSource_V4L::SetContrast ( float  g)
virtual

Set contrast as value in interval [0, 100]. */.

Reimplemented from BIAS::VideoSource.

Definition at line 1315 of file VideoSource_V4L.cpp.

References BIAS::VideoSource::CompleteInitialized_, and ControlContrast_.

void BIAS::Debug::SetDebugLevel ( const long int  lv)
inlineinherited
void BIAS::Debug::SetDebugLevel ( const std::string &  name)
inlineinherited

Definition at line 325 of file Debug.hh.

void BIAS::Debug::SetDebugStream ( const std::ostream &  os)
inlineinherited

Definition at line 398 of file Debug.hh.

void BIAS::VideoSource::SetDeviceChannel ( int  channel)
inlineinherited

Use channel to select one of many cameras on the same.

Attention
Must be used before OpenDevice()!

Definition at line 165 of file VideoSource_Base.hh.

Referenced by BIAS::ShowCamWxFrame::OnFindWebcams().

int VideoSource::SetDirectToDisk ( const std::string &  filename)
inherited
virtual void BIAS::VideoSource::SetExternalTrigger ( bool  trigger = true)
inlinevirtualinherited

Specify if there is an external trigger to be used.

Parameters
[in]triggerSpecifies if external trigger should be acticated

Reimplemented in BIAS::VideoSource_DCAM, and BIAS::VideoSource_uEye.

Definition at line 180 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_uEye::SetExternalTrigger(), and BIAS::VideoSource_DCAM::SetExternalTrigger().

int VideoSource::SetFeature ( int  feature,
unsigned int  value 
)
virtualinherited

This function is used to control features like shutter, zoom, etc.

Definition at line 296 of file VideoSource_Base.cpp.

void BIAS::VideoSource::SetFPS ( float  fps)
inlineinherited

Set frame per second for image capturing.

Attention
Must be used before OpenDevice()!
Examples:
ExampleDirectToDisk.cpp.

Definition at line 175 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::SetModeAndFramerate().

int VideoSource_V4L::SetGain ( float  g)
virtual

Set gain in dB.

Reimplemented from BIAS::VideoSource.

Definition at line 1210 of file VideoSource_V4L.cpp.

References BIAS::VideoSource::CompleteInitialized_, and ControlGain_.

static void BIAS::Debug::SetGlobalDebugLevel ( long int  lev)
inlinestaticinherited

Definition at line 424 of file Debug.hh.

int VideoSource_V4L::SetShutter ( float  exptime)
virtual

Set shutter (exposure time) in seconds.

Reimplemented from BIAS::VideoSource.

Definition at line 1355 of file VideoSource_V4L.cpp.

References BIAS::VideoSource::CompleteInitialized_, and ControlShutter_.

void VideoSource::SetSize ( int  w,
int  h,
int  bytesperpixel = 1 
)
virtualinherited
virtual void BIAS::VideoSource::SetWaitForNew ( bool  waitForNew)
inlinevirtualinherited

Specify if grab should wait for new frames.

If you want as many images as possible and don't care about equal ones, call this with waitForNew = false. By default, GrabSingle() blocks until a new frame arrives from the camera. Only used in V4L and DSHOW.

Author
grest

Reimplemented in BIAS::VideoSource_DSHOW.

Definition at line 293 of file VideoSource_Base.hh.

int VideoSource::SetWhiteBalance ( float  rvalue,
float  bvalue 
)
virtualinherited

Set white balance as values in interval [0, 100]. */.

Reimplemented in BIAS::VideoSource_DCAM, and BIAS::VideoSource_uEye.

Definition at line 330 of file VideoSource_Base.cpp.

Referenced by BIAS::VideoSource::SoftwareWhiteBalance().

void BIAS::Debug::ShowDebugLevel ( std::ostream &  os = std::cout) const
inlineinherited

prints all internally known debuglevels

Author
woelk 09/2006

Definition at line 496 of file Debug.hh.

int VideoSource::SoftwareWhiteBalance ( )
virtualinherited
int VideoSource::WriteDirect_ ( const unsigned char *  data,
const BIAS::UUID uuid,
const long int &  sec,
const long int &  usec 
)
protectedinherited

Member Data Documentation

long int BIAS::Debug::_liDebugLevel
protectedinherited

Definition at line 510 of file Debug.hh.

Referenced by BIAS::Debug::operator=(), and BIAS::ImageBase::operator=().

long int BIAS::Debug::_liNextDebugLevel
protectedinherited

new concept, debuglevel are managed here in the debug class

Definition at line 516 of file Debug.hh.

Referenced by BIAS::Debug::operator=().

std::map<std::string, long int> BIAS::Debug::_String2Debuglevel
protectedinherited

Definition at line 517 of file Debug.hh.

Referenced by BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream
staticprotectedinherited

Definition at line 511 of file Debug.hh.

Referenced by BIAS::Debug::operator=().

bool BIAS::VideoSource::Active_
protectedinherited
unsigned BIAS::VideoSource_V4L::ActiveFrame_
protected

Definition at line 160 of file VideoSource_V4L.hh.

Referenced by GrabSingle(), and VideoSource_V4L().

pthread_mutex_t BIAS::VideoSource_V4L::ActiveFrameMutex_
protected

Definition at line 166 of file VideoSource_V4L.hh.

Referenced by GrabSingle(), PostGrab(), and VideoSource_V4L().

bool BIAS::VideoSource::bExternalTrigger_
protectedinherited
struct v4l2_buffer BIAS::VideoSource_V4L::buffer_
protected

Definition at line 139 of file VideoSource_V4L.hh.

Referenced by GrabSingle().

std::vector<struct buffer> BIAS::VideoSource_V4L::Buffers_
protected

Definition at line 159 of file VideoSource_V4L.hh.

Referenced by GrabSingle().

float BIAS::VideoSource::BytesPerPixel_
protectedinherited
struct v4l2_capability BIAS::VideoSource_V4L::capability2
protected

Definition at line 136 of file VideoSource_V4L.hh.

Referenced by GetCapabilities(), and OpenDevice().

int BIAS::VideoSource::ColorChannels_
protectedinherited
BIAS::ImageBase::EColorModel BIAS::VideoSource::ColorMode_
protectedinherited
bool BIAS::VideoSource::CompleteInitialized_
protectedinherited
pthread_t BIAS::VideoSource_V4L::ContinousThread_
protected

Definition at line 165 of file VideoSource_V4L.hh.

Referenced by PostGrab(), and PreGrab().

struct v4l2_queryctrl BIAS::VideoSource_V4L::ControlAutoGain_
protected

Definition at line 146 of file VideoSource_V4L.hh.

Referenced by VideoSource_V4L().

struct v4l2_queryctrl BIAS::VideoSource_V4L::ControlBrightness_
protected
struct v4l2_queryctrl BIAS::VideoSource_V4L::ControlContrast_
protected

Definition at line 143 of file VideoSource_V4L.hh.

Referenced by GetContrast(), HasControlContrast(), SetContrast(), and VideoSource_V4L().

struct v4l2_queryctrl BIAS::VideoSource_V4L::ControlGain_
protected

Definition at line 144 of file VideoSource_V4L.hh.

Referenced by GetGain(), HasControlGain(), SetGain(), and VideoSource_V4L().

struct v4l2_queryctrl BIAS::VideoSource_V4L::ControlPanReset_
protected

Definition at line 148 of file VideoSource_V4L.hh.

struct v4l2_queryctrl BIAS::VideoSource_V4L::ControlShutter_
protected

Definition at line 145 of file VideoSource_V4L.hh.

Referenced by GetShutter(), HasControlShutter(), SetShutter(), and VideoSource_V4L().

struct v4l2_queryctrl BIAS::VideoSource_V4L::ControlTiltReset_
protected

Definition at line 149 of file VideoSource_V4L.hh.

struct v4l2_queryctrl BIAS::VideoSource_V4L::ControlZoom_
protected

Definition at line 147 of file VideoSource_V4L.hh.

BIAS::JpegHandler BIAS::VideoSource_V4L::Decompressor_
protected

Definition at line 129 of file VideoSource_V4L.hh.

Referenced by OpenDevice().

const char* BIAS::VideoSource::DefaultDevice_
protectedinherited
int BIAS::VideoSource::DeviceChannel_
protectedinherited
std::vector<std::string> BIAS::VideoSource_V4L::deviceChannelNames_
protected

Definition at line 173 of file VideoSource_V4L.hh.

Referenced by GetCapabilities(), and GetDeviceChannelNames().

bool BIAS::VideoSource::DirectToDisk_
protectedinherited

Write directly to disk.

Definition at line 339 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk(), and BIAS::VideoSource::VideoSource().

char* BIAS::VideoSource::DtDBuffer_
protectedinherited

512 byte aligned buffer, contains VSImageHeader and image data

Definition at line 345 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource::VideoSource(), and BIAS::VideoSource::WriteDirect_().

unsigned int BIAS::VideoSource::DtDBufferSize_
protectedinherited

Buffer size must be multiple of 512.

Definition at line 348 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource::VideoSource(), and BIAS::VideoSource::WriteDirect_().

int BIAS::VideoSource::DtDFd_
protectedinherited

File descriptor for direct-to-disk mode.

Definition at line 342 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource::VideoSource(), and BIAS::VideoSource::WriteDirect_().

BIAS::VideoStream::VSImageHeader* BIAS::VideoSource::DtDImageHeader_
protectedinherited

Pointer to the beginning of DtDBuffer_.

Definition at line 354 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk(), and BIAS::VideoSource::WriteDirect_().

char* BIAS::VideoSource::DtDStartOfImage_
protectedinherited

Pointer into DtDBuffer after VSImageHeader.

Definition at line 357 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk(), and BIAS::VideoSource::WriteDirect_().

int BIAS::VideoSource_V4L::fd
protected
struct v4l2_format BIAS::VideoSource_V4L::format2_
protected

Definition at line 137 of file VideoSource_V4L.hh.

struct v4l2_format BIAS::VideoSource_V4L::formatRGB_
protected

Definition at line 138 of file VideoSource_V4L.hh.

std::vector<BIAS::Camera<unsigned char> > BIAS::VideoSource_V4L::Frame_
protected

Definition at line 162 of file VideoSource_V4L.hh.

Referenced by GrabSingle(), OpenDevice(), and VideoSource_V4L().

float BIAS::VideoSource::FramesPerSecond_
protectedinherited
long int BIAS::Debug::GlobalDebugLevel = 0
staticprotectedinherited

Definition at line 513 of file Debug.hh.

bool BIAS::VideoSource::Grabbing_
protectedinherited
struct timeval BIAS::VideoSource_V4L::GrabTime_
protected

Definition at line 168 of file VideoSource_V4L.hh.

Referenced by GrabSingle().

int BIAS::VideoSource::Height_
protectedinherited
int BIAS::VideoSource::ID_
protectedinherited
std::string BIAS::VideoSource::Identifier_
protectedinherited
unsigned int BIAS::VideoSource::ImageSize_
protectedinherited

Image size, useful for allocating and copying memory.

Definition at line 351 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_FFmpeg::OpenDevice(), BIAS::VideoSource::SetDirectToDisk(), and BIAS::VideoSource::WriteDirect_().

v4l2_field BIAS::VideoSource_V4L::interlaceMode_
protected

Definition at line 175 of file VideoSource_V4L.hh.

Referenced by GetCapabilities().

bool BIAS::VideoSource::IsControllable_
protectedinherited
bool BIAS::VideoSource_V4L::isJPEG_
protected

Definition at line 152 of file VideoSource_V4L.hh.

Referenced by OpenDevice(), and VideoSource_V4L().

BIAS::Camera<unsigned char> BIAS::VideoSource_V4L::jpegImg_
protected

Definition at line 130 of file VideoSource_V4L.hh.

double BIAS::VideoSource::maxBrightness_
protectedinherited

Definition at line 366 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::VideoSource(), and VideoSource_V4L().

double BIAS::VideoSource::maxContrast_
protectedinherited
double BIAS::VideoSource::maxGain_
protectedinherited
double BIAS::VideoSource::maxShutter_
protectedinherited
double BIAS::VideoSource::minBrightness_
protectedinherited

Definition at line 366 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::VideoSource(), and VideoSource_V4L().

double BIAS::VideoSource::minContrast_
protectedinherited
double BIAS::VideoSource::minGain_
protectedinherited
double BIAS::VideoSource::minShutter_
protectedinherited
std::map<std::string , std::string> BIAS::VideoSource_V4L::ModelNameToDevice_
protected

Definition at line 174 of file VideoSource_V4L.hh.

Referenced by GetAllDevices(), GetCapabilities(), and OpenDevice().

bool BIAS::VideoSource_V4L::newFrame_
protected

Definition at line 151 of file VideoSource_V4L.hh.

Referenced by GrabSingle(), and VideoSource_V4L().

unsigned int BIAS::VideoSource_V4L::numBuffers_
protected

Definition at line 140 of file VideoSource_V4L.hh.

bool BIAS::VideoSource_V4L::ReadFirstFrame_
protected

Definition at line 161 of file VideoSource_V4L.hh.

Referenced by GrabSingle(), and VideoSource_V4L().

struct v4l2_requestbuffers BIAS::VideoSource_V4L::reqBuf
protected

Definition at line 135 of file VideoSource_V4L.hh.

bool BIAS::VideoSource::WaitForNew_
protectedinherited
int BIAS::VideoSource::Width_
protectedinherited

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