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 | Protected Attributes | Static Protected Attributes | List of all members
BIAS::VideoSource Class Reference

Defines a common interface to different devices. More...

#include <VideoSource/VideoSource_Base.hh>

+ Inheritance diagram for BIAS::VideoSource:
+ Collaboration diagram for BIAS::VideoSource:

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)
 
virtual int GetAllDevices (std::vector< std::string > &devices)
 
virtual bool GetAutoBrightness ()
 
virtual bool GetAutoContrast ()
 
virtual bool GetAutoGain ()
 
virtual bool GetAutoShutter ()
 
virtual float GetBrightness ()
 Get brightness as value in interval [0, 100]. */. More...
 
virtual void GetBrightnessRange (double &min, double &max)
 
float GetBytesPerPixel () const
 
virtual int GetCapabilities (VideoSourceCapabilities &caps)
 Use this method to learn something about the capabilities of the source (only useful for V4L sources, e.g. More...
 
virtual int GetCapabilities (const char *device, VideoSourceCapabilities &caps)
 
int GetColorChannels () const
 
BIAS::ImageBase::EColorModel GetColorModel () const
 
virtual 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
 
virtual void GetDeviceChannelNames (std::vector< std::string > &names)
 If more than one channel is present, names can be returned here. More...
 
virtual unsigned int GetFeature (int feature)
 This function is used to query features like shutter, zoom, etc. More...
 
virtual float GetGain ()
 Get gain in dB. More...
 
virtual void GetGainRange (double &min, double &max)
 
int GetHeight () const
 
int GetID () const
 
std::string GetIdentifier () const
 
virtual 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)
 
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)
 
virtual bool HasControlBrightness ()
 
virtual bool HasControlContrast ()
 
virtual bool HasControlGain ()
 
virtual bool HasControlShutter ()
 
virtual 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...
 
virtual int PostGrab ()
 Stop anything started in PreGrab() More...
 
virtual 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)
 
virtual void ResetPanTiltZoom ()
 Reset digital zoom, pan, and tilt to defaults to ensure compliance with calibration. More...
 
virtual void SetAutoBrightness (bool b)
 
virtual void SetAutoContrast (bool b)
 
virtual void SetAutoGain (bool b)
 
virtual void SetAutoShutter (bool b)
 
virtual 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...
 
virtual 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...
 
virtual int SetGain (float g)
 Set gain in dB. More...
 
virtual int SetShutter (float exptime)
 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 ()
 
virtual ~VideoSource ()
 

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...
 
int WriteDirect_ (const unsigned char *data, const BIAS::UUID &uuid, const long int &sec, const long int &usec)
 

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...
 
bool bExternalTrigger_
 External trigger flag. More...
 
float BytesPerPixel_
 BytesPerPixel cannot be int (e.g. it is 1.5 for YUV420p) More...
 
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...
 
const char * DefaultDevice_
 Device name. More...
 
int DeviceChannel_
 Device channel. More...
 
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...
 
float FramesPerSecond_
 Capturing framerate. More...
 
bool Grabbing_
 Grabbing flag is set and unset in GrabSingle() methods. More...
 
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...
 
bool IsControllable_
 Must be initialized be the derived classes. More...
 
double maxBrightness_
 
double maxContrast_
 
double maxGain_
 
double maxShutter_
 
double minBrightness_
 
double minContrast_
 Feature ranges. More...
 
double minGain_
 
double minShutter_
 
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

Defines a common interface to different devices.

  \author evers
  Specialized classes for each deviceclass should be derived and most methods
  have to be reimplemented.

  Usage:

  VideoSource *foo;

  Image<type> bar;

/ assume to have a class for DCAM cams foo = new VideoSource_DCAM;

/ select a colormode with SetColorMode() if required the default colormode depends on the used Camera(kind of VideoSource)

set a image size for grabbing foo->SetSize(width,height) foo->SetSize(768,576);

/ Want to take the second channel (what ever this means) foo->SetChannel(2);

/ take the first appropriate device foo->OpenDevice();

foo->InitImage(bar);

do last preparations foo->PreGrab();

get one frame foo->GrabSingle(bar);

stop enetually running things (isochronous transfers for example) foo->PostGrab();

clean up foo->CloseDevice();

Examples:
ExampleVideofeedShm.cpp, ExampleVideoSource_Net.cpp, and ExampleVideoSource_Shm.cpp.

Definition at line 95 of file VideoSource_Base.hh.

Constructor & Destructor Documentation

VideoSource::VideoSource ( )
VideoSource::~VideoSource ( )
virtual

Definition at line 86 of file VideoSource_Base.cpp.

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 
)
virtual

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

Definition at line 283 of file VideoSource_Base.cpp.

int VideoSource::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)
inlinevirtual
int VideoSource::GetAllDevices ( std::vector< std::string > &  devices)
virtual

Reimplemented in BIAS::VideoSource_DSHOW, and BIAS::VideoSource_V4L.

Definition at line 197 of file VideoSource_Base.cpp.

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

virtual bool BIAS::VideoSource::GetAutoBrightness ( )
inlinevirtual
virtual bool BIAS::VideoSource::GetAutoContrast ( )
inlinevirtual

Reimplemented in BIAS::VideoSource_DSHOW.

Definition at line 257 of file VideoSource_Base.hh.

virtual bool BIAS::VideoSource::GetAutoGain ( )
inlinevirtual
virtual bool BIAS::VideoSource::GetAutoShutter ( )
inlinevirtual
virtual float BIAS::VideoSource::GetBrightness ( )
inlinevirtual

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

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

Definition at line 243 of file VideoSource_Base.hh.

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

Definition at line 193 of file VideoSource_Base.hh.

int VideoSource::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 in BIAS::VideoSource_DSHOW, BIAS::VideoSource_Kinect, BIAS::VideoSource_OpenNI, BIAS::VideoSource_Kinect2, BIAS::VideoSource_Kinect_Base, BIAS::VideoSource_SwissRanger, BIAS::VideoSource_V4L, and BIAS::VideoSource_Kinect2Net.

Definition at line 203 of file VideoSource_Base.cpp.

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

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

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

Reimplemented in BIAS::VideoSource_DSHOW, and BIAS::VideoSource_V4L.

Definition at line 253 of file VideoSource_Base.hh.

virtual void BIAS::VideoSource::GetContrastRange ( double &  min,
double &  max 
)
inlinevirtual
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.

virtual void BIAS::VideoSource::GetDeviceChannelNames ( std::vector< std::string > &  names)
inlinevirtual

If more than one channel is present, names can be returned here.

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

Reimplemented in BIAS::VideoSource_V4L.

Definition at line 170 of file VideoSource_Base.hh.

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

unsigned int VideoSource::GetFeature ( int  feature)
virtual

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

Definition at line 290 of file VideoSource_Base.cpp.

float VideoSource::GetGain ( )
virtual
virtual void BIAS::VideoSource::GetGainRange ( double &  min,
double &  max 
)
inlinevirtual

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
inline
int BIAS::VideoSource::GetID ( ) const
inline
Examples:
ExampleMDCamToShm.cpp.

Definition at line 206 of file VideoSource_Base.hh.

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

Definition at line 285 of file VideoSource_Base.hh.

float VideoSource::GetShutter ( )
virtual

Get shutter (exposure time) in seconds.

Reimplemented in BIAS::VideoSource_DCAM, BIAS::VideoSource_DSHOW, BIAS::VideoSource_V4L, BIAS::VideoSource_DcamPMD, and BIAS::VideoSource_uEye.

Definition at line 321 of file VideoSource_Base.cpp.

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

Definition at line 228 of file VideoSource_Base.hh.

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

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
inline
int VideoSource::GrabSingle ( BIAS::Camera< unsigned char > &  image)
virtual
int VideoSource::GrabSingle ( BIAS::Camera< float > &  image)
virtual

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)
virtual

Definition at line 252 of file VideoSource_Base.cpp.

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

Definition at line 260 of file VideoSource_Base.cpp.

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

Definition at line 268 of file VideoSource_Base.cpp.

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

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)
virtual

Definition at line 244 of file VideoSource_Base.cpp.

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

Definition at line 276 of file VideoSource_Base.cpp.

virtual bool BIAS::VideoSource::HasControlBrightness ( )
inlinevirtual
virtual bool BIAS::VideoSource::HasControlContrast ( )
inlinevirtual

Reimplemented in BIAS::VideoSource_DSHOW, and BIAS::VideoSource_V4L.

Definition at line 251 of file VideoSource_Base.hh.

virtual bool BIAS::VideoSource::HasControlGain ( )
inlinevirtual
virtual bool BIAS::VideoSource::HasControlShutter ( )
inlinevirtual
virtual bool BIAS::VideoSource::HasControlWhiteBalance ( )
inlinevirtual

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

Definition at line 262 of file VideoSource_Base.hh.

int VideoSource::InitImage ( BIAS::ImageBase Image)
virtual
bool BIAS::VideoSource::IsActive ( ) const
inline

Definition at line 208 of file VideoSource_Base.hh.

bool BIAS::VideoSource::IsControllable ( )
inline

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)
virtual

Definition at line 326 of file VideoSource_Base.cpp.

int VideoSource::OpenDevice ( )
virtual
int VideoSource::OpenDevice ( const char *  device)
virtual
int VideoSource::OpenDevice ( int  device)
virtual
int VideoSource::OpenDevice ( std::string  Prefix,
std::string  Postfix,
int  DigitCount,
int  PictureCount,
int  StartCount = 0 
)
virtual

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)
virtual
int VideoSource::PostGrab ( )
virtual
int VideoSource::PreGrab ( )
virtual
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.

virtual void BIAS::VideoSource::ResetPanTiltZoom ( void  )
inlinevirtual

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

Reimplemented in BIAS::VideoSource_DSHOW, and BIAS::VideoSource_V4L.

Definition at line 265 of file VideoSource_Base.hh.

virtual void BIAS::VideoSource::SetAutoBrightness ( bool  b)
inlinevirtual
virtual void BIAS::VideoSource::SetAutoContrast ( bool  b)
inlinevirtual

Reimplemented in BIAS::VideoSource_DSHOW.

Definition at line 256 of file VideoSource_Base.hh.

virtual void BIAS::VideoSource::SetAutoGain ( bool  b)
inlinevirtual
virtual void BIAS::VideoSource::SetAutoShutter ( bool  b)
inlinevirtual
virtual int BIAS::VideoSource::SetBrightness ( float  g)
inlinevirtual

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

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

Definition at line 245 of file VideoSource_Base.hh.

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

Definition at line 183 of file VideoSource_Base.hh.

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

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

Reimplemented in BIAS::VideoSource_DSHOW, and BIAS::VideoSource_V4L.

Definition at line 255 of file VideoSource_Base.hh.

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)
inline

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)

Enables the very fast direct-to-disk mode.

Attention
Use this after OpenDevice() because the image size must be known!
Author
evers
Examples:
ExampleDirectToDisk.cpp.

Definition at line 394 of file VideoSource_Base.cpp.

References BytesPerPixel_, ColorChannels_, ColorMode_, DirectToDisk_, DtDBuffer_, DtDBufferSize_, DtDFd_, DtDImageHeader_, DtDStartOfImage_, Height_, ImageSize_, BIAS::ImageBase::ST_unsignedchar, BIAS::ImageBase::ST_unsignedshortint, and Width_.

virtual void BIAS::VideoSource::SetExternalTrigger ( bool  trigger = true)
inlinevirtual

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 
)
virtual

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)
inline

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::SetGain ( float  g)
virtual
static void BIAS::Debug::SetGlobalDebugLevel ( long int  lev)
inlinestaticinherited

Definition at line 424 of file Debug.hh.

int VideoSource::SetShutter ( float  exptime)
virtual

Set shutter (exposure time) in seconds.

Reimplemented in BIAS::VideoSource_DCAM, BIAS::VideoSource_DSHOW, BIAS::VideoSource_V4L, BIAS::VideoSource_uEye, and BIAS::VideoSource_DcamPMD.

Definition at line 303 of file VideoSource_Base.cpp.

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

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 
)
virtual

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 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 ( )
virtual
int VideoSource::WriteDirect_ ( const unsigned char *  data,
const BIAS::UUID uuid,
const long int &  sec,
const long int &  usec 
)
protected

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_
protected
bool BIAS::VideoSource::bExternalTrigger_
protected

External trigger flag.

Definition at line 330 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::InitCam(), BIAS::VideoSource_DCAM::SetExternalTrigger(), and VideoSource().

float BIAS::VideoSource::BytesPerPixel_
protected
int BIAS::VideoSource::ColorChannels_
protected
BIAS::ImageBase::EColorModel BIAS::VideoSource::ColorMode_
protected
bool BIAS::VideoSource::CompleteInitialized_
protected
const char* BIAS::VideoSource::DefaultDevice_
protected
int BIAS::VideoSource::DeviceChannel_
protected
bool BIAS::VideoSource::DirectToDisk_
protected

Write directly to disk.

Definition at line 339 of file VideoSource_Base.hh.

Referenced by SetDirectToDisk(), and VideoSource().

char* BIAS::VideoSource::DtDBuffer_
protected

512 byte aligned buffer, contains VSImageHeader and image data

Definition at line 345 of file VideoSource_Base.hh.

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

unsigned int BIAS::VideoSource::DtDBufferSize_
protected

Buffer size must be multiple of 512.

Definition at line 348 of file VideoSource_Base.hh.

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

int BIAS::VideoSource::DtDFd_
protected

File descriptor for direct-to-disk mode.

Definition at line 342 of file VideoSource_Base.hh.

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

BIAS::VideoStream::VSImageHeader* BIAS::VideoSource::DtDImageHeader_
protected

Pointer to the beginning of DtDBuffer_.

Definition at line 354 of file VideoSource_Base.hh.

Referenced by SetDirectToDisk(), and WriteDirect_().

char* BIAS::VideoSource::DtDStartOfImage_
protected

Pointer into DtDBuffer after VSImageHeader.

Definition at line 357 of file VideoSource_Base.hh.

Referenced by SetDirectToDisk(), and WriteDirect_().

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

Definition at line 513 of file Debug.hh.

bool BIAS::VideoSource::Grabbing_
protected
int BIAS::VideoSource::Height_
protected
int BIAS::VideoSource::ID_
protected
std::string BIAS::VideoSource::Identifier_
protected
unsigned int BIAS::VideoSource::ImageSize_
protected

Image size, useful for allocating and copying memory.

Definition at line 351 of file VideoSource_Base.hh.

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

bool BIAS::VideoSource::IsControllable_
protected
double BIAS::VideoSource::maxBrightness_
protected

Definition at line 366 of file VideoSource_Base.hh.

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

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

Definition at line 366 of file VideoSource_Base.hh.

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

double BIAS::VideoSource::minContrast_
protected
double BIAS::VideoSource::minGain_
protected
double BIAS::VideoSource::minShutter_
protected
bool BIAS::VideoSource::WaitForNew_
protected
int BIAS::VideoSource::Width_
protected

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