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

This class extends VideoSource for the use of DirectShow devices you need Microsoft Windows SDK version 6.1 and Microsoft DirectX 9 SDK (November 2008) More...

#include <VideoSource/VideoSource_DSHOW.hh>

+ Inheritance diagram for BIAS::VideoSource_DSHOW:
+ Collaboration diagram for BIAS::VideoSource_DSHOW:

Classes

struct  CameraControl
 

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...
 
int CloseDevice ()
 
bool DebugLevelIsSet (const long int lv) const
 
bool DebugLevelIsSet (const std::string &name) const
 
bool DisplayCameraProperties ()
 
bool DisplayFilterProperties (CComPtr< IBaseFilter > pFilter)
 
void DisplaySourcePinProperties ()
 
virtual void EnsureLatestFrame (const bool b)
 
int GetAllDevices (std::vector< std::string > &devices)
 
bool GetAutoBrightness ()
 
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
 
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...
 
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< float > &image)
 
int GrabSingle (BIAS::Camera< unsigned char > &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 ()
 
virtual bool HasControlWhiteBalance ()
 
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 (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...
 
int OpenDevice (unsigned int width, unsigned int height, unsigned int channels, const char *device, BIAS::ImageBase::EColorModel model=BIAS::ImageBase::CM_RGB)
 
int OpenDevice (const char *device)
 a device name like "/dev/video1" can be specified here More...
 
virtual int OpenDevice (const std::vector< std::string > &FileNames)
 used by derived class VideoSource_Disk More...
 
int OpenDevice ()
 selects the first available device to open (e.g. 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 (void)
 Reset digital zoom, pan, and tilt to defaults to ensure compliance with calibration. More...
 
void SetAutoBrightness (bool b)
 
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)
 
void SetCaptureDeviceName (std::string sName)
 
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 to g with g[dB]. More...
 
int SetShutter (float exptime)
 Set shutter (exposure time) to exptime 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...
 
void SetSizeAndColorModel (int width, int height, int bytesperpixel=1, BIAS::ImageBase::EColorModel model=BIAS::ImageBase::CM_invalid)
 
void SetWaitForNew (bool waitForNew)
 overwrites Base class function 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_DSHOW (bool bShowDialogs=false)
 
 VideoSource_DSHOW (int width, int height, int depth, bool bShowDialogs=false)
 
 ~VideoSource_DSHOW ()
 

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 DeleteMediaType_ (AM_MEDIA_TYPE *pmt)
 
void DetermineBIASColorModel_ ()
 
void DetermineColorModel_ ()
 
bool DisplayPinProperties_ (CComPtr< IPin > pSrcPin)
 
HRESULT EnumFilters_ (IFilterGraph *pGraph)
 
HRESULT FindCaptureDevice_ (IBaseFilter **ppSrcFilter)
 
HRESULT GetInterfaces_ (void)
 
void InitCamControls_ ()
 
HRESULT InitVideoCapture_ ()
 
HRESULT SaveGraphFile_ (IGraphBuilder *pGraph, WCHAR *wszPath)
 
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 bCheckNewImage_
 
bool bExternalTrigger_
 External trigger flag. More...
 
BIAS::ImageBase::EColorModel BIASColorModel_
 
bool bShowDialogs_
 
float BytesPerPixel_
 BytesPerPixel cannot be int (e.g. it is 1.5 for YUV420p) More...
 
BIAS::Camera< unsigned char > camera_
 
VideoSourceCapabilities Capabilities_
 
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...
 
CameraControl ControlBrightness_
 
CameraControl ControlContrast_
 
CameraControl ControlExposure_
 
CameraControl ControlPan_
 
CameraControl ControlTilt_
 
CameraControl ControlZoom_
 
int dDepth_
 
long dDsBufferSize_
 
const char * DefaultDevice_
 Device name. More...
 
int DeviceChannel_
 Device channel. More...
 
int dHeight_
 
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 dWidth_
 
MySampleGrabberCBFGCB
 
float FramesPerSecond_
 Capturing framerate. More...
 
bool GetCapabilitiesOnly_
 
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...
 
int ImageHeightSign_
 
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_
 
GUID MediaSubTypeColorModel_
 
double minBrightness_
 
double minContrast_
 Feature ranges. More...
 
double minGain_
 
double minShutter_
 
bool OverrideColorMode_
 
CComPtr< IAMCameraControl > pCameraControl_
 
CComPtr< ICaptureGraphBuilder2 > pCaptureGraphBuilder2_
 
long * pDsBuffer_
 
CComPtr< ISampleGrabber > pGrabber_
 
CComPtr< IGraphBuilder > pGraphBuilder_
 
unsigned char * pImageBuffer_
 
IPin * pInPin_
 
CComPtr< IMediaControl > pMediaControl_
 
CComPtr< IMediaEventEx > pMediaEvent_
 
CComPtr< IBaseFilter > pNullRenderer_
 
CComPtr< IPin > pOutPin_
 
CComPtr< IPin > pSampleOutPin_
 
CComPtr< IBaseFilter > pSrcFilter_
 
CComPtr< IAMVideoProcAmp > pVideoProcControl_
 
std::string sCaptureDeviceName_
 
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 DirectShow devices you need Microsoft Windows SDK version 6.1 and Microsoft DirectX 9 SDK (November 2008)

Author
ischiller
Examples:
ExampleVideoSource_DShow.cpp.

Definition at line 101 of file VideoSource_DSHOW.hh.

Constructor & Destructor Documentation

VideoSource_DSHOW::VideoSource_DSHOW ( bool  bShowDialogs = false)
VideoSource_DSHOW::VideoSource_DSHOW ( int  width,
int  height,
int  depth,
bool  bShowDialogs = false 
)
VideoSource_DSHOW::~VideoSource_DSHOW ( )

Definition at line 96 of file VideoSource_DSHOW.cpp.

References FGCB, pDsBuffer_, and pImageBuffer_.

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_DSHOW::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.

void VideoSource_DSHOW::DeleteMediaType_ ( AM_MEDIA_TYPE *  pmt)
protected

Definition at line 217 of file VideoSource_DSHOW.cpp.

Referenced by InitVideoCapture_().

void VideoSource_DSHOW::DetermineBIASColorModel_ ( )
protected
void VideoSource_DSHOW::DetermineColorModel_ ( )
protected
bool VideoSource_DSHOW::DisplayCameraProperties ( )

Definition at line 329 of file VideoSource_DSHOW.cpp.

References pSrcFilter_.

bool VideoSource_DSHOW::DisplayFilterProperties ( CComPtr< IBaseFilter >  pFilter)

Definition at line 286 of file VideoSource_DSHOW.cpp.

Referenced by EnumFilters_().

bool VideoSource_DSHOW::DisplayPinProperties_ ( CComPtr< IPin >  pSrcPin)
protected

Definition at line 254 of file VideoSource_DSHOW.cpp.

Referenced by DisplaySourcePinProperties(), and InitVideoCapture_().

void VideoSource_DSHOW::DisplaySourcePinProperties ( )

Definition at line 320 of file VideoSource_DSHOW.cpp.

References DisplayPinProperties_(), and pOutPin_.

virtual void BIAS::VideoSource::EnsureLatestFrame ( const bool  b)
inlinevirtualinherited
HRESULT VideoSource_DSHOW::EnumFilters_ ( IFilterGraph *  pGraph)
protected

Definition at line 972 of file VideoSource_DSHOW.cpp.

References bShowDialogs_, and DisplayFilterProperties().

Referenced by InitVideoCapture_().

HRESULT VideoSource_DSHOW::FindCaptureDevice_ ( IBaseFilter **  ppSrcFilter)
protected

Definition at line 899 of file VideoSource_DSHOW.cpp.

References BIAS::VideoSource::Identifier_, and sCaptureDeviceName_.

Referenced by InitVideoCapture_().

int VideoSource_DSHOW::GetAllDevices ( std::vector< std::string > &  devices)
virtual

Reimplemented from BIAS::VideoSource.

Examples:
ExampleVideoSource_DShow.cpp.

Definition at line 799 of file VideoSource_DSHOW.cpp.

bool VideoSource_DSHOW::GetAutoBrightness ( )
virtual
bool VideoSource_DSHOW::GetAutoContrast ( )
virtual
bool BIAS::VideoSource_DSHOW::GetAutoGain ( )
inlinevirtual

Reimplemented from BIAS::VideoSource.

Definition at line 165 of file VideoSource_DSHOW.hh.

bool VideoSource_DSHOW::GetAutoShutter ( )
virtual

Reimplemented from BIAS::VideoSource.

Definition at line 1197 of file VideoSource_DSHOW.cpp.

References pCameraControl_.

float VideoSource_DSHOW::GetBrightness ( )
virtual

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

Reimplemented from BIAS::VideoSource.

Definition at line 1225 of file VideoSource_DSHOW.cpp.

References ControlBrightness_, BIAS::VideoSource_DSHOW::CameraControl::id, and pVideoProcControl_.

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_DSHOW::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 737 of file VideoSource_DSHOW.cpp.

int VideoSource_DSHOW::GetCapabilities ( const char *  device,
VideoSourceCapabilities caps 
)
virtual
int BIAS::VideoSource::GetColorChannels ( ) const
inlineinherited

Definition at line 189 of file VideoSource_Base.hh.

Referenced by InitImage(), and InitVideoCapture_().

BIAS::ImageBase::EColorModel BIAS::VideoSource::GetColorModel ( ) const
inlineinherited
float VideoSource_DSHOW::GetContrast ( )
virtual
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.

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

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

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

Definition at line 290 of file VideoSource_Base.cpp.

float BIAS::VideoSource_DSHOW::GetGain ( )
inlinevirtual

Get gain in dB.

Reimplemented from BIAS::VideoSource.

Definition at line 166 of file VideoSource_DSHOW.hh.

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.

HRESULT VideoSource_DSHOW::GetInterfaces_ ( void  )
protected
float VideoSource_DSHOW::GetShutter ( )
virtual

Get shutter (exposure time) in seconds.

Reimplemented from BIAS::VideoSource.

Definition at line 1146 of file VideoSource_DSHOW.cpp.

References pCameraControl_.

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
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_DSHOW::GrabSingle ( BIAS::Camera< unsigned char > &  image)
virtual
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_DSHOW::HasControlBrightness ( )
virtual
bool VideoSource_DSHOW::HasControlContrast ( )
virtual
bool BIAS::VideoSource_DSHOW::HasControlGain ( )
inlinevirtual

Reimplemented from BIAS::VideoSource.

Definition at line 163 of file VideoSource_DSHOW.hh.

bool VideoSource_DSHOW::HasControlShutter ( )
virtual

Reimplemented from BIAS::VideoSource.

Definition at line 1211 of file VideoSource_DSHOW.cpp.

References pCameraControl_.

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

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

Definition at line 262 of file VideoSource_Base.hh.

void VideoSource_DSHOW::InitCamControls_ ( )
protected
int VideoSource_DSHOW::InitImage ( BIAS::ImageBase Image)
virtual
HRESULT VideoSource_DSHOW::InitVideoCapture_ ( )
protected
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::OpenDevice ( int  device)
virtualinherited
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_DSHOW::OpenDevice ( unsigned int  width,
unsigned int  height,
unsigned int  channels,
const char *  device,
BIAS::ImageBase::EColorModel  model = BIAS::ImageBase::CM_RGB 
)
int VideoSource_DSHOW::OpenDevice ( const char *  device)
virtual

a device name like "/dev/video1" can be specified here

Reimplemented from BIAS::VideoSource.

Definition at line 122 of file VideoSource_DSHOW.cpp.

References InitVideoCapture_(), sCaptureDeviceName_, and BIAS::BaseException::what().

int VideoSource_DSHOW::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 117 of file VideoSource_DSHOW.cpp.

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

Stop anything started in PreGrab()

Reimplemented from BIAS::VideoSource.

Definition at line 246 of file VideoSource_DSHOW.cpp.

int VideoSource_DSHOW::PreGrab ( )
virtual

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

Reimplemented from BIAS::VideoSource.

Definition at line 241 of file VideoSource_DSHOW.cpp.

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_DSHOW::ResetPanTiltZoom ( void  )
virtual

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

Reimplemented from BIAS::VideoSource.

Definition at line 1323 of file VideoSource_DSHOW.cpp.

HRESULT VideoSource_DSHOW::SaveGraphFile_ ( IGraphBuilder *  pGraph,
WCHAR *  wszPath 
)
protected

Definition at line 1100 of file VideoSource_DSHOW.cpp.

Referenced by InitVideoCapture_().

void VideoSource_DSHOW::SetAutoBrightness ( bool  b)
virtual
void VideoSource_DSHOW::SetAutoContrast ( bool  b)
virtual
void BIAS::VideoSource_DSHOW::SetAutoGain ( bool  b)
inlinevirtual

Reimplemented from BIAS::VideoSource.

Definition at line 164 of file VideoSource_DSHOW.hh.

void VideoSource_DSHOW::SetAutoShutter ( bool  b)
virtual

Reimplemented from BIAS::VideoSource.

Definition at line 1186 of file VideoSource_DSHOW.cpp.

References pCameraControl_.

int VideoSource_DSHOW::SetBrightness ( float  g)
virtual

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

Reimplemented from BIAS::VideoSource.

Definition at line 1238 of file VideoSource_DSHOW.cpp.

References ControlBrightness_, BIAS::VideoSource_DSHOW::CameraControl::flags, BIAS::VideoSource_DSHOW::CameraControl::id, and pVideoProcControl_.

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

Definition at line 183 of file VideoSource_Base.hh.

void BIAS::VideoSource_DSHOW::SetCaptureDeviceName ( std::string  sName)
inline

Definition at line 133 of file VideoSource_DSHOW.hh.

int VideoSource::SetColorModel ( BIAS::ImageBase::EColorModel  mode)
virtualinherited
int VideoSource_DSHOW::SetContrast ( float  g)
virtual
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 BIAS::VideoSource_DSHOW::SetGain ( float  g)
inlinevirtual

Set gain to g with g[dB].

Reimplemented from BIAS::VideoSource.

Definition at line 168 of file VideoSource_DSHOW.hh.

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

Definition at line 424 of file Debug.hh.

int VideoSource_DSHOW::SetShutter ( float  exptime)
virtual

Set shutter (exposure time) to exptime in seconds.

Reimplemented from BIAS::VideoSource.

Definition at line 1162 of file VideoSource_DSHOW.cpp.

References pCameraControl_.

void VideoSource::SetSize ( int  w,
int  h,
int  bytesperpixel = 1 
)
virtualinherited
void BIAS::VideoSource_DSHOW::SetSizeAndColorModel ( int  width,
int  height,
int  bytesperpixel = 1,
BIAS::ImageBase::EColorModel  model = BIAS::ImageBase::CM_invalid 
)
inline

Definition at line 136 of file VideoSource_DSHOW.hh.

Referenced by InitVideoCapture_(), and VideoSource_DSHOW().

void BIAS::VideoSource_DSHOW::SetWaitForNew ( bool  waitForNew)
inlinevirtual

overwrites Base class function

Reimplemented from BIAS::VideoSource.

Definition at line 120 of file VideoSource_DSHOW.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
bool BIAS::VideoSource_DSHOW::bCheckNewImage_
protected

Definition at line 196 of file VideoSource_DSHOW.hh.

bool BIAS::VideoSource::bExternalTrigger_
protectedinherited
BIAS::ImageBase::EColorModel BIAS::VideoSource_DSHOW::BIASColorModel_
protected
bool BIAS::VideoSource_DSHOW::bShowDialogs_
protected

Definition at line 203 of file VideoSource_DSHOW.hh.

Referenced by EnumFilters_(), InitVideoCapture_(), and VideoSource_DSHOW().

float BIAS::VideoSource::BytesPerPixel_
protectedinherited
BIAS::Camera<unsigned char> BIAS::VideoSource_DSHOW::camera_
protected

Definition at line 205 of file VideoSource_DSHOW.hh.

VideoSourceCapabilities BIAS::VideoSource_DSHOW::Capabilities_
protected

Definition at line 255 of file VideoSource_DSHOW.hh.

Referenced by GetCapabilities(), and InitVideoCapture_().

int BIAS::VideoSource::ColorChannels_
protectedinherited
BIAS::ImageBase::EColorModel BIAS::VideoSource::ColorMode_
protectedinherited
bool BIAS::VideoSource::CompleteInitialized_
protectedinherited
CameraControl BIAS::VideoSource_DSHOW::ControlBrightness_
protected
CameraControl BIAS::VideoSource_DSHOW::ControlContrast_
protected
CameraControl BIAS::VideoSource_DSHOW::ControlExposure_
protected

Definition at line 246 of file VideoSource_DSHOW.hh.

Referenced by InitCamControls_().

CameraControl BIAS::VideoSource_DSHOW::ControlPan_
protected

Definition at line 243 of file VideoSource_DSHOW.hh.

Referenced by InitCamControls_().

CameraControl BIAS::VideoSource_DSHOW::ControlTilt_
protected

Definition at line 244 of file VideoSource_DSHOW.hh.

Referenced by InitCamControls_().

CameraControl BIAS::VideoSource_DSHOW::ControlZoom_
protected

Definition at line 245 of file VideoSource_DSHOW.hh.

Referenced by InitCamControls_().

int BIAS::VideoSource_DSHOW::dDepth_
protected

Definition at line 202 of file VideoSource_DSHOW.hh.

Referenced by VideoSource_DSHOW().

long BIAS::VideoSource_DSHOW::dDsBufferSize_
protected

Definition at line 197 of file VideoSource_DSHOW.hh.

Referenced by VideoSource_DSHOW().

const char* BIAS::VideoSource::DefaultDevice_
protectedinherited
int BIAS::VideoSource::DeviceChannel_
protectedinherited
int BIAS::VideoSource_DSHOW::dHeight_
protected

Definition at line 201 of file VideoSource_DSHOW.hh.

Referenced by VideoSource_DSHOW().

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_DSHOW::dWidth_
protected

Definition at line 200 of file VideoSource_DSHOW.hh.

Referenced by VideoSource_DSHOW().

MySampleGrabberCB* BIAS::VideoSource_DSHOW::FGCB
protected
float BIAS::VideoSource::FramesPerSecond_
protectedinherited
bool BIAS::VideoSource_DSHOW::GetCapabilitiesOnly_
protected

Definition at line 256 of file VideoSource_DSHOW.hh.

Referenced by GetCapabilities(), InitVideoCapture_(), and VideoSource_DSHOW().

long int BIAS::Debug::GlobalDebugLevel = 0
staticprotectedinherited

Definition at line 513 of file Debug.hh.

bool BIAS::VideoSource::Grabbing_
protectedinherited
int BIAS::VideoSource::Height_
protectedinherited
int BIAS::VideoSource::ID_
protectedinherited
std::string BIAS::VideoSource::Identifier_
protectedinherited
int BIAS::VideoSource_DSHOW::ImageHeightSign_
protected

Definition at line 252 of file VideoSource_DSHOW.hh.

Referenced by InitVideoCapture_().

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_().

bool BIAS::VideoSource::IsControllable_
protectedinherited
double BIAS::VideoSource::maxBrightness_
protectedinherited
double BIAS::VideoSource::maxContrast_
protectedinherited
double BIAS::VideoSource::maxGain_
protectedinherited
double BIAS::VideoSource::maxShutter_
protectedinherited
GUID BIAS::VideoSource_DSHOW::MediaSubTypeColorModel_
protected
double BIAS::VideoSource::minBrightness_
protectedinherited
double BIAS::VideoSource::minContrast_
protectedinherited
double BIAS::VideoSource::minGain_
protectedinherited
double BIAS::VideoSource::minShutter_
protectedinherited
bool BIAS::VideoSource_DSHOW::OverrideColorMode_
protected

Definition at line 253 of file VideoSource_DSHOW.hh.

Referenced by InitVideoCapture_(), and VideoSource_DSHOW().

CComPtr< IAMCameraControl > BIAS::VideoSource_DSHOW::pCameraControl_
protected
CComPtr< ICaptureGraphBuilder2 > BIAS::VideoSource_DSHOW::pCaptureGraphBuilder2_
protected
long* BIAS::VideoSource_DSHOW::pDsBuffer_
protected

Definition at line 198 of file VideoSource_DSHOW.hh.

Referenced by VideoSource_DSHOW(), and ~VideoSource_DSHOW().

CComPtr< ISampleGrabber > BIAS::VideoSource_DSHOW::pGrabber_
protected
CComPtr< IGraphBuilder > BIAS::VideoSource_DSHOW::pGraphBuilder_
protected
unsigned char* BIAS::VideoSource_DSHOW::pImageBuffer_
protected

Definition at line 199 of file VideoSource_DSHOW.hh.

Referenced by VideoSource_DSHOW(), and ~VideoSource_DSHOW().

IPin* BIAS::VideoSource_DSHOW::pInPin_
protected

Definition at line 236 of file VideoSource_DSHOW.hh.

Referenced by InitVideoCapture_().

CComPtr< IMediaControl > BIAS::VideoSource_DSHOW::pMediaControl_
protected
CComPtr< IMediaEventEx > BIAS::VideoSource_DSHOW::pMediaEvent_
protected

Definition at line 229 of file VideoSource_DSHOW.hh.

Referenced by CloseDevice(), GetInterfaces_(), GrabSingle(), and VideoSource_DSHOW().

CComPtr< IBaseFilter > BIAS::VideoSource_DSHOW::pNullRenderer_
protected
CComPtr< IPin > BIAS::VideoSource_DSHOW::pOutPin_
protected
CComPtr< IPin > BIAS::VideoSource_DSHOW::pSampleOutPin_
protected

Definition at line 235 of file VideoSource_DSHOW.hh.

Referenced by CloseDevice(), and InitVideoCapture_().

CComPtr< IBaseFilter > BIAS::VideoSource_DSHOW::pSrcFilter_
protected
CComPtr< IAMVideoProcAmp > BIAS::VideoSource_DSHOW::pVideoProcControl_
protected
std::string BIAS::VideoSource_DSHOW::sCaptureDeviceName_
protected
bool BIAS::VideoSource::WaitForNew_
protectedinherited
int BIAS::VideoSource::Width_
protectedinherited

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