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_SwissRanger Class Reference

Support for SwissRanger usb cam. More...

#include <VideoSource/VideoSource_SwissRanger.hh>

+ Inheritance diagram for BIAS::VideoSource_SwissRanger:
+ Collaboration diagram for BIAS::VideoSource_SwissRanger:

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 ()
 close an active camera More...
 
bool DebugLevelIsSet (const long int lv) const
 
bool DebugLevelIsSet (const std::string &name) const
 
void EnsureLatestFrame (const bool ensure)
 Sets the scattering filter. More...
 
virtual int GetAllDevices (std::vector< std::string > &devices)
 
int GetAmplitudeThreshold (unsigned short &val)
 Get Amplitude Threshold. More...
 
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)
 Dummy function, does not do anything. More...
 
virtual int GetCapabilities (const char *device, VideoSourceCapabilities &caps)
 Dummy function, does not do anything. More...
 
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...
 
int GetDeviceString (std::string &device)
 returns the device string of the camera More...
 
int GetDistanceOffset (unsigned short &val)
 Get Distance Offset. More...
 
virtual unsigned int GetFeature (int feature)
 This function is used to query features like shutter, zoom, etc. More...
 
double GetFPS ()
 Returns current framerate. 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 int GetIntegrationTime (unsigned char &val)
 Get IntegrationTime (as uchar 0-255) More...
 
virtual int GetIntegrationTimeMS (float &inttime)
 Get IntegrationTime in ms. More...
 
int GetModulationFrequency (unsigned int &val)
 Get the Modulation frequency. More...
 
int GetSaturationThreshold (unsigned short &val)
 Get Saturation Threshold. More...
 
virtual float GetShutter ()
 Get shutter (exposure time) in seconds. More...
 
virtual void GetShutterRange (double &min, double &max)
 
int GetSoftwareVersion (std::string &version)
 returns the version of the used software More...
 
virtual int GetWhiteBalance (float &rvalue, float &bvalue)
 Get white balance as values in interval [0, 100]. */. More...
 
int GetWidth () const
 
void GrabImageReturnsDepth (bool on)
 Sets whether a call to GrabSingle should return the depth image. More...
 
virtual int GrabSingle (Camera< unsigned char > &image)
 Returns the 2D image, and reads depth and modulation coefficients. 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)
 
int GrabSingleDepth (Camera< float > &image)
 Returns the depth image. More...
 
int GrabSingleModCoeff (Camera< float > &image)
 Returns the amplitude image. More...
 
virtual bool HasControlBrightness ()
 
virtual bool HasControlContrast ()
 
virtual bool HasControlGain ()
 
virtual bool HasControlShutter ()
 
virtual bool HasControlWhiteBalance ()
 
virtual int InitDepthImage (ImageBase &img)
 Init the depth image to grab to. More...
 
virtual int InitImage (ImageBase &img)
 Init the grey image to grab to. More...
 
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 ()
 try to open first unused PMD-camera More...
 
virtual int OpenDevice (int camNr)
 try to open a specific camera-device More...
 
virtual int OpenDevice (const char *device)
 a device name like "/dev/video1" can be specified here 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 ()
 no needed for PostGrab now, does not do anything More...
 
virtual int PreGrab ()
 no needed for PreGrab now, does not do anything 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...
 
int SetAmplitudeThreshold (const unsigned short val)
 Set Amplitude Threshold. More...
 
virtual void SetAutoBrightness (bool b)
 
virtual void SetAutoContrast (bool b)
 
virtual void SetAutoGain (bool b)
 
int SetAutoIllumination (const bool on)
 Sets the autoillumination default settings on or off. More...
 
int SetAutoIllumination (const unsigned char minIntTime, const unsigned char maxIntTime, const unsigned char percentOverPos, const unsigned char desiredPos)
 Sets the autoillumination settings. More...
 
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...
 
int SetDistanceOffset (const unsigned short val)
 Distance Offset 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...
 
void SetGenerateNewUIDs (bool s)
 Sets whether to generate new UIDS for each image. More...
 
virtual int SetIntegrationTime (const unsigned char inttime)
 Set IntegrationTime (as uchar 0-255) More...
 
virtual int SetIntegrationTimeMS (float inttime)
 Set IntegrationTime in ms (gets clipped to min/max for camera) More...
 
int SetModulationFrequency (ModulationFrq dModulationFrequency)
 Set the Modulation frequency (from defines.h) MF_40MHz=0, //!<SR3k: maximal range 3.75m MF_30MHz=1, //!<SR3k, SR4k: maximal range 5m MF_21MHz=2, //!<SR3k: maximal range 7.14m MF_20MHz=3, //!<SR3k: maximal range 7.5m MF_19MHz=4, //!<SR3k: maximal range 7.89m MF_60MHz=5, //!<SR4k: maximal range 2.5m {frequency} MF_15MHz=6, //!<SR4k: maximal range 10m {frequency} MF_10MHz=7, //!<SR4k: maximal range 15m {frequency} MF_29MHz=8, //!<SR4k: maximal range 5.17m MF_31MHz=9, //!<SR4k: maximal range 4.84m MF_LAST=10};. More...
 
int SetSaturationThreshold (const unsigned short val)
 Set Saturation Threshold. 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_SwissRanger ()
 
 ~VideoSource_SwissRanger ()
 

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 ConvertImageFloatToCharNormalized_ (const Image< float > src, Image< unsigned char > &dst, bool useMaxDist=false)
 
void ConvertRawImage_ (const unsigned short *data, Image< float > &dst)
 
void ConvertRawImageToFloat_ (const unsigned short *data, Image< float > &dst)
 
void ResetUsbDeviceConnection_ ()
 uses libusb directly to reset the device in case of failure on open More...
 
void SetMaxDist_ ()
 
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...
 
unsigned short amplitudeThreshold_
 
bool bEnsureLatestFrame_
 
bool bExternalTrigger_
 External trigger flag. More...
 
bool bGrabImageReturnsDepth_
 
bool bIsOpen_
 
bool bRetryOpen_
 
float BytesPerPixel_
 BytesPerPixel cannot be int (e.g. it is 1.5 for YUV420p) More...
 
CamType camType_
 
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 unsigned short * dataAmp_
 
const unsigned short * dataDepth_
 
const char * DefaultDevice_
 Device name. More...
 
BIAS::Camera< unsigned char > DepthImg_
 
BIAS::Camera< float > DepthImgF_
 
int DeviceChannel_
 Device channel. More...
 
bool DirectToDisk_
 Write directly to disk. More...
 
unsigned short distanceOffset_
 
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...
 
ImgEntry * imgEntryArray
 
unsigned char integrationTime_
 
bool IsControllable_
 Must be initialized be the derived classes. More...
 
float max_dist_
 
double maxBrightness_
 
double maxContrast_
 
double maxGain_
 
double maxShutter_
 
double minBrightness_
 
double minContrast_
 Feature ranges. More...
 
double minGain_
 
double minShutter_
 
float * modcoeff_
 
BIAS::Camera< float > ModCoeffImg_
 
ModulationFrq modulationFrequency_
 
unsigned short saturationThreshold_
 
unsigned int serialNumber_
 
CMesaDevice * srCam_
 
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

Support for SwissRanger usb cam.

Author
fkellner 10/2007

Definition at line 45 of file VideoSource_SwissRanger.hh.

Constructor & Destructor Documentation

BIAS::VideoSource_SwissRanger::VideoSource_SwissRanger ( )
BIAS::VideoSource_SwissRanger::~VideoSource_SwissRanger ( )

Definition at line 80 of file VideoSource_SwissRanger.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 
)
virtualinherited

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

Definition at line 283 of file VideoSource_Base.cpp.

int BIAS::VideoSource_SwissRanger::CloseDevice ( )
virtual

close an active camera

Reimplemented from BIAS::VideoSource.

Definition at line 220 of file VideoSource_SwissRanger.cpp.

long BIAS::Debug::ConsumeNextFreeDebuglevel_ ( )
inlineprotectedinherited

returns the next available debuglevel

Author
woelk 09/2006

Definition at line 521 of file Debug.hh.

void BIAS::VideoSource_SwissRanger::ConvertImageFloatToCharNormalized_ ( const Image< float >  src,
Image< unsigned char > &  dst,
bool  useMaxDist = false 
)
protected
void BIAS::VideoSource_SwissRanger::ConvertRawImage_ ( const unsigned short *  data,
Image< float > &  dst 
)
protected
void BIAS::VideoSource_SwissRanger::ConvertRawImageToFloat_ ( const unsigned short *  data,
Image< float > &  dst 
)
protected
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 BIAS::VideoSource_SwissRanger::EnsureLatestFrame ( const bool  ensure)
inlinevirtual

Sets the scattering filter.

Ensure latest frame calls grab twice to really get current image instead of buffered image.

Reimplemented from BIAS::VideoSource.

Definition at line 204 of file VideoSource_SwissRanger.hh.

int VideoSource::GetAllDevices ( std::vector< std::string > &  devices)
virtualinherited

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

Definition at line 197 of file VideoSource_Base.cpp.

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

int BIAS::VideoSource_SwissRanger::GetAmplitudeThreshold ( unsigned short &  val)
inline

Get Amplitude Threshold.

Definition at line 126 of file VideoSource_SwissRanger.hh.

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

Reimplemented in BIAS::VideoSource_DSHOW.

Definition at line 257 of file VideoSource_Base.hh.

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

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 
)
inlinevirtualinherited
float BIAS::VideoSource::GetBytesPerPixel ( ) const
inlineinherited

Definition at line 193 of file VideoSource_Base.hh.

int VideoSource_SwissRanger::GetCapabilities ( VideoSourceCapabilities caps)
virtual

Dummy function, does not do anything.

Reimplemented from BIAS::VideoSource.

Definition at line 499 of file VideoSource_SwissRanger.cpp.

int VideoSource_SwissRanger::GetCapabilities ( const char *  device,
VideoSourceCapabilities caps 
)
virtual

Dummy function, does not do anything.

Reimplemented from BIAS::VideoSource.

Definition at line 504 of file VideoSource_SwissRanger.cpp.

int BIAS::VideoSource::GetColorChannels ( ) const
inlineinherited
BIAS::ImageBase::EColorModel BIAS::VideoSource::GetColorModel ( ) const
inlineinherited
virtual float BIAS::VideoSource::GetContrast ( )
inlinevirtualinherited

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

int VideoSource_SwissRanger::GetDeviceString ( std::string &  device)

returns the device string of the camera

Definition at line 96 of file VideoSource_SwissRanger.cpp.

References srCam_.

int BIAS::VideoSource_SwissRanger::GetDistanceOffset ( unsigned short &  val)
inline

Get Distance Offset.

Definition at line 150 of file VideoSource_SwissRanger.hh.

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.

double BIAS::VideoSource_SwissRanger::GetFPS ( )

Returns current framerate.

float VideoSource::GetGain ( )
virtualinherited
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.

virtual int BIAS::VideoSource_SwissRanger::GetIntegrationTime ( unsigned char &  val)
inlinevirtual

Get IntegrationTime (as uchar 0-255)

Definition at line 87 of file VideoSource_SwissRanger.hh.

int BIAS::VideoSource_SwissRanger::GetIntegrationTimeMS ( float &  inttime)
virtual

Get IntegrationTime in ms.

Definition at line 255 of file VideoSource_SwissRanger.cpp.

int BIAS::VideoSource_SwissRanger::GetModulationFrequency ( unsigned int &  val)
inline

Get the Modulation frequency.

Definition at line 114 of file VideoSource_SwissRanger.hh.

int BIAS::VideoSource_SwissRanger::GetSaturationThreshold ( unsigned short &  val)
inline

Get Saturation Threshold.

Definition at line 138 of file VideoSource_SwissRanger.hh.

float VideoSource::GetShutter ( )
virtualinherited

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

Definition at line 228 of file VideoSource_Base.hh.

int VideoSource_SwissRanger::GetSoftwareVersion ( std::string &  version)

returns the version of the used software

Definition at line 86 of file VideoSource_SwissRanger.cpp.

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 BIAS::VideoSource_SwissRanger::GrabImageReturnsDepth ( bool  on)
inline

Sets whether a call to GrabSingle should return the depth image.

Definition at line 208 of file VideoSource_SwissRanger.hh.

int BIAS::VideoSource_SwissRanger::GrabSingle ( Camera< unsigned char > &  image)
virtual

Returns the 2D image, and reads depth and modulation coefficients.

Reimplemented from BIAS::VideoSource.

Definition at line 310 of file VideoSource_SwissRanger.cpp.

Referenced by BIAS::GrabSingleThread::Entry(), and BIAS::ShowCamWxFrame::GrabSingleImageUnthreadedFromCamera_().

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.

int BIAS::VideoSource_SwissRanger::GrabSingleDepth ( Camera< float > &  image)
inline

Returns the depth image.

Must be called after GrabSingle()

Definition at line 156 of file VideoSource_SwissRanger.hh.

Referenced by BIAS::GrabSingleThread::Entry().

int BIAS::VideoSource_SwissRanger::GrabSingleModCoeff ( Camera< float > &  image)
inline

Returns the amplitude image.

Must be called after GrabSingle()

Definition at line 166 of file VideoSource_SwissRanger.hh.

Referenced by BIAS::GrabSingleThread::Entry().

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

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

Definition at line 251 of file VideoSource_Base.hh.

virtual bool BIAS::VideoSource::HasControlGain ( )
inlinevirtualinherited
virtual bool BIAS::VideoSource::HasControlShutter ( )
inlinevirtualinherited
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.

int BIAS::VideoSource_SwissRanger::InitDepthImage ( ImageBase img)
virtual
int BIAS::VideoSource_SwissRanger::InitImage ( ImageBase img)
virtual
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 BIAS::VideoSource_SwissRanger::OpenDevice ( )
virtual

try to open first unused PMD-camera

Returns
0 on success, -1 of opening failed, -2 if opening failed because of wrong image width

Reimplemented from BIAS::VideoSource.

Definition at line 105 of file VideoSource_SwissRanger.cpp.

References BIAS::ImageBase::CM_Grey, BIAS::ImageBase::ST_float, and BIAS::ImageBase::ST_unsignedchar.

int BIAS::VideoSource_SwissRanger::OpenDevice ( int  camNr)
virtual

try to open a specific camera-device

Returns
0 on success, -1 of opening failed, -2 if opening failed because of wrong image width

Reimplemented from BIAS::VideoSource.

Definition at line 213 of file VideoSource_SwissRanger.cpp.

int VideoSource::OpenDevice ( const char *  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::OpenDevice ( const std::vector< std::string > &  FileNames)
virtualinherited
int BIAS::VideoSource_SwissRanger::PostGrab ( )
virtual

no needed for PostGrab now, does not do anything

Reimplemented from BIAS::VideoSource.

Definition at line 281 of file VideoSource_SwissRanger.cpp.

int BIAS::VideoSource_SwissRanger::PreGrab ( )
virtual

no needed for PreGrab now, does not do anything

Reimplemented from BIAS::VideoSource.

Definition at line 274 of file VideoSource_SwissRanger.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.

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

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.

void BIAS::VideoSource_SwissRanger::ResetUsbDeviceConnection_ ( )
protected

uses libusb directly to reset the device in case of failure on open

Definition at line 467 of file VideoSource_SwissRanger.cpp.

int BIAS::VideoSource_SwissRanger::SetAmplitudeThreshold ( const unsigned short  val)
inline

Set Amplitude Threshold.

Definition at line 120 of file VideoSource_SwissRanger.hh.

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

Reimplemented in BIAS::VideoSource_DSHOW.

Definition at line 256 of file VideoSource_Base.hh.

virtual void BIAS::VideoSource::SetAutoGain ( bool  b)
inlinevirtualinherited
int BIAS::VideoSource_SwissRanger::SetAutoIllumination ( const bool  on)
inline

Sets the autoillumination default settings on or off.

Definition at line 180 of file VideoSource_SwissRanger.hh.

int BIAS::VideoSource_SwissRanger::SetAutoIllumination ( const unsigned char  minIntTime,
const unsigned char  maxIntTime,
const unsigned char  percentOverPos,
const unsigned char  desiredPos 
)
inline

Sets the autoillumination settings.

Definition at line 188 of file VideoSource_SwissRanger.hh.

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

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)
inlineinherited
Attention
Must be used before OpenDevice()!

Definition at line 183 of file VideoSource_Base.hh.

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

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)
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
int BIAS::VideoSource_SwissRanger::SetDistanceOffset ( const unsigned short  val)
inline

Distance Offset

Definition at line 144 of file VideoSource_SwissRanger.hh.

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::SetGain ( float  g)
virtualinherited
void BIAS::VideoSource_SwissRanger::SetGenerateNewUIDs ( bool  s)
inline

Sets whether to generate new UIDS for each image.

Definition at line 175 of file VideoSource_SwissRanger.hh.

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

Definition at line 424 of file Debug.hh.

int BIAS::VideoSource_SwissRanger::SetIntegrationTime ( const unsigned char  inttime)
virtual

Set IntegrationTime (as uchar 0-255)

Definition at line 411 of file VideoSource_SwissRanger.cpp.

int BIAS::VideoSource_SwissRanger::SetIntegrationTimeMS ( float  inttime)
virtual

Set IntegrationTime in ms (gets clipped to min/max for camera)

Definition at line 233 of file VideoSource_SwissRanger.cpp.

void BIAS::VideoSource_SwissRanger::SetMaxDist_ ( )
protected

<SR4k: maximal range 2.5m {frequency}

<SR3k: maximal range 3.75m

Definition at line 422 of file VideoSource_SwissRanger.cpp.

int BIAS::VideoSource_SwissRanger::SetModulationFrequency ( ModulationFrq  dModulationFrequency)

Set the Modulation frequency (from defines.h) MF_40MHz=0, //!<SR3k: maximal range 3.75m MF_30MHz=1, //!<SR3k, SR4k: maximal range 5m MF_21MHz=2, //!<SR3k: maximal range 7.14m MF_20MHz=3, //!<SR3k: maximal range 7.5m MF_19MHz=4, //!<SR3k: maximal range 7.89m MF_60MHz=5, //!<SR4k: maximal range 2.5m {frequency} MF_15MHz=6, //!<SR4k: maximal range 10m {frequency} MF_10MHz=7, //!<SR4k: maximal range 15m {frequency} MF_29MHz=8, //!<SR4k: maximal range 5.17m MF_31MHz=9, //!<SR4k: maximal range 4.84m MF_LAST=10};.

Definition at line 416 of file VideoSource_SwissRanger.cpp.

int BIAS::VideoSource_SwissRanger::SetSaturationThreshold ( const unsigned short  val)
inline

Set Saturation Threshold.

Definition at line 132 of file VideoSource_SwissRanger.hh.

int VideoSource::SetShutter ( float  exptime)
virtualinherited

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 
)
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 short BIAS::VideoSource_SwissRanger::amplitudeThreshold_
protected

Definition at line 230 of file VideoSource_SwissRanger.hh.

Referenced by VideoSource_SwissRanger().

bool BIAS::VideoSource_SwissRanger::bEnsureLatestFrame_
protected

Definition at line 229 of file VideoSource_SwissRanger.hh.

Referenced by VideoSource_SwissRanger().

bool BIAS::VideoSource::bExternalTrigger_
protectedinherited
bool BIAS::VideoSource_SwissRanger::bGrabImageReturnsDepth_
protected

Definition at line 254 of file VideoSource_SwissRanger.hh.

Referenced by VideoSource_SwissRanger().

bool BIAS::VideoSource_SwissRanger::bIsOpen_
protected

Definition at line 238 of file VideoSource_SwissRanger.hh.

Referenced by VideoSource_SwissRanger().

bool BIAS::VideoSource_SwissRanger::bRetryOpen_
protected

Definition at line 238 of file VideoSource_SwissRanger.hh.

Referenced by VideoSource_SwissRanger().

float BIAS::VideoSource::BytesPerPixel_
protectedinherited
CamType BIAS::VideoSource_SwissRanger::camType_
protected

Definition at line 256 of file VideoSource_SwissRanger.hh.

Referenced by VideoSource_SwissRanger().

int BIAS::VideoSource::ColorChannels_
protectedinherited
BIAS::ImageBase::EColorModel BIAS::VideoSource::ColorMode_
protectedinherited
bool BIAS::VideoSource::CompleteInitialized_
protectedinherited
const unsigned short* BIAS::VideoSource_SwissRanger::dataAmp_
protected

Definition at line 250 of file VideoSource_SwissRanger.hh.

Referenced by VideoSource_SwissRanger().

const unsigned short* BIAS::VideoSource_SwissRanger::dataDepth_
protected

Definition at line 249 of file VideoSource_SwissRanger.hh.

Referenced by VideoSource_SwissRanger().

const char* BIAS::VideoSource::DefaultDevice_
protectedinherited
BIAS::Camera<unsigned char> BIAS::VideoSource_SwissRanger::DepthImg_
protected

Definition at line 241 of file VideoSource_SwissRanger.hh.

BIAS::Camera<float> BIAS::VideoSource_SwissRanger::DepthImgF_
protected

Definition at line 242 of file VideoSource_SwissRanger.hh.

int BIAS::VideoSource::DeviceChannel_
protectedinherited
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().

unsigned short BIAS::VideoSource_SwissRanger::distanceOffset_
protected

Definition at line 233 of file VideoSource_SwissRanger.hh.

Referenced by VideoSource_SwissRanger().

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

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

ImgEntry* BIAS::VideoSource_SwissRanger::imgEntryArray
protected

Definition at line 247 of file VideoSource_SwissRanger.hh.

unsigned char BIAS::VideoSource_SwissRanger::integrationTime_
protected

Definition at line 232 of file VideoSource_SwissRanger.hh.

Referenced by VideoSource_SwissRanger().

bool BIAS::VideoSource::IsControllable_
protectedinherited
float BIAS::VideoSource_SwissRanger::max_dist_
protected

Definition at line 253 of file VideoSource_SwissRanger.hh.

double BIAS::VideoSource::maxBrightness_
protectedinherited
double BIAS::VideoSource::maxContrast_
protectedinherited
double BIAS::VideoSource::maxGain_
protectedinherited
double BIAS::VideoSource::maxShutter_
protectedinherited
double BIAS::VideoSource::minBrightness_
protectedinherited
double BIAS::VideoSource::minContrast_
protectedinherited
double BIAS::VideoSource::minGain_
protectedinherited
double BIAS::VideoSource::minShutter_
protectedinherited
float* BIAS::VideoSource_SwissRanger::modcoeff_
protected

Definition at line 251 of file VideoSource_SwissRanger.hh.

BIAS::Camera<float> BIAS::VideoSource_SwissRanger::ModCoeffImg_
protected

Definition at line 243 of file VideoSource_SwissRanger.hh.

ModulationFrq BIAS::VideoSource_SwissRanger::modulationFrequency_
protected

Definition at line 234 of file VideoSource_SwissRanger.hh.

Referenced by VideoSource_SwissRanger().

unsigned short BIAS::VideoSource_SwissRanger::saturationThreshold_
protected

Definition at line 231 of file VideoSource_SwissRanger.hh.

Referenced by VideoSource_SwissRanger().

unsigned int BIAS::VideoSource_SwissRanger::serialNumber_
protected

Definition at line 252 of file VideoSource_SwissRanger.hh.

Referenced by VideoSource_SwissRanger().

CMesaDevice* BIAS::VideoSource_SwissRanger::srCam_
protected

Definition at line 245 of file VideoSource_SwissRanger.hh.

Referenced by GetDeviceString(), and VideoSource_SwissRanger().

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

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