OSVR-Core
Public Member Functions | List of all members
osvr::vbtracker::ImageSource Class Referenceabstract

Uniform interface for the various normal to strange image sources for the tracking algorithm. More...

#include <ImageSource.h>

Inheritance diagram for osvr::vbtracker::ImageSource:
osvr::vbtracker::DirectShowImageSource osvr::vbtracker::DirectShowImageSource osvr::vbtracker::DK2WrappedImageSource osvr::vbtracker::DK2WrappedImageSource osvr::vbtracker::FakeImageSource osvr::vbtracker::FakeImageSource osvr::vbtracker::OpenCVImageSource osvr::vbtracker::OpenCVImageSource osvr::vbtracker::UVCImageSource

Public Member Functions

virtual ~ImageSource ()
 Destructor.
 
virtual bool ok () const =0
 
virtual bool grab ()=0
 Trigger camera capture. More...
 
virtual void retrieve (cv::Mat &color, cv::Mat &gray, osvr::util::time::TimeValue &timestamp)
 Call after grab() to get the actual image data.
 
void retrieve (cv::Mat &color, cv::Mat &gray)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. discards timestamp. More...
 
virtual cv::Size resolution () const =0
 Get resolution of the images from this source.
 
virtual void retrieveColor (cv::Mat &color, osvr::util::time::TimeValue &timestamp)=0
 For those devices that naturally read a non-corrupt color image, overriding just this method will let the default implementation of retrieve() do the RGB to Gray for you. More...
 
void retrieveColor (cv::Mat &color)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. discards timestamp. More...
 
virtual ~ImageSource ()
 Destructor.
 
virtual bool ok () const =0
 
virtual bool grab ()=0
 Trigger camera capture. More...
 
virtual void retrieve (cv::Mat &color, cv::Mat &gray)
 Call after grab() to get the actual image data.
 
virtual cv::Size resolution () const =0
 Get resolution of the images from this source.
 
virtual void retrieveColor (cv::Mat &color)=0
 For those devices that naturally read a non-corrupt color image, overriding just this method will let the default implementation of retrieve() do the RGB to Gray for you. More...
 

Detailed Description

Uniform interface for the various normal to strange image sources for the tracking algorithm.

Member Function Documentation

§ grab() [1/2]

virtual bool osvr::vbtracker::ImageSource::grab ( )
pure virtual

Trigger camera capture.

May not necessarily include retrieval. Blocks until an image is available. or failure occurs.

Timestamp after this call returns.

Returns
false if the camera failed.

Implemented in osvr::vbtracker::UVCImageSource, osvr::vbtracker::DirectShowImageSource, osvr::vbtracker::DirectShowImageSource, osvr::vbtracker::OpenCVImageSource, osvr::vbtracker::DK2WrappedImageSource, osvr::vbtracker::FakeImageSource, osvr::vbtracker::OpenCVImageSource, osvr::vbtracker::DK2WrappedImageSource, and osvr::vbtracker::FakeImageSource.

§ grab() [2/2]

virtual bool osvr::vbtracker::ImageSource::grab ( )
pure virtual

Trigger camera capture.

May not necessarily include retrieval. Blocks until an image is available. or failure occurs.

Timestamp after this call returns.

Returns
false if the camera failed.

Implemented in osvr::vbtracker::UVCImageSource, osvr::vbtracker::DirectShowImageSource, osvr::vbtracker::DirectShowImageSource, osvr::vbtracker::OpenCVImageSource, osvr::vbtracker::DK2WrappedImageSource, osvr::vbtracker::FakeImageSource, osvr::vbtracker::OpenCVImageSource, osvr::vbtracker::DK2WrappedImageSource, and osvr::vbtracker::FakeImageSource.

§ ok() [1/2]

virtual bool osvr::vbtracker::ImageSource::ok ( ) const
pure virtual

§ ok() [2/2]

virtual bool osvr::vbtracker::ImageSource::ok ( ) const
pure virtual

§ retrieve()

void osvr::vbtracker::ImageSource::retrieve ( cv::Mat &  color,
cv::Mat &  gray 
)
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. discards timestamp.

§ retrieveColor() [1/3]

virtual void osvr::vbtracker::ImageSource::retrieveColor ( cv::Mat &  color)
pure virtual

For those devices that naturally read a non-corrupt color image, overriding just this method will let the default implementation of retrieve() do the RGB to Gray for you.

Implemented in osvr::vbtracker::UVCImageSource, osvr::vbtracker::DirectShowImageSource, osvr::vbtracker::DK2WrappedImageSource, osvr::vbtracker::OpenCVImageSource, and osvr::vbtracker::FakeImageSource.

§ retrieveColor() [2/3]

virtual void osvr::vbtracker::ImageSource::retrieveColor ( cv::Mat &  color,
osvr::util::time::TimeValue timestamp 
)
pure virtual

For those devices that naturally read a non-corrupt color image, overriding just this method will let the default implementation of retrieve() do the RGB to Gray for you.

Implemented in osvr::vbtracker::DirectShowImageSource, osvr::vbtracker::DK2WrappedImageSource, osvr::vbtracker::OpenCVImageSource, and osvr::vbtracker::FakeImageSource.

§ retrieveColor() [3/3]

void osvr::vbtracker::ImageSource::retrieveColor ( cv::Mat &  color)
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. discards timestamp.


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