OSVR-Core
Classes | Public Member Functions | List of all members
osvr::vbtracker::UVCImageSource Class Reference
Inheritance diagram for osvr::vbtracker::UVCImageSource:
osvr::vbtracker::ImageSource

Public Member Functions

 UVCImageSource (int vendor_id=0, int product_id=0, const char *serial_number=nullptr)
 Constructor.
 
virtual ~UVCImageSource ()
 Destructor.
 
virtual bool ok () const override
 
virtual bool grab () override
 Trigger camera capture. More...
 
virtual cv::Size resolution () const override
 Get resolution of the images from this source.
 
virtual void retrieveColor (cv::Mat &color) override
 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...
 
float getDeviceVersion () const
 
- Public Member Functions inherited from osvr::vbtracker::ImageSource
virtual ~ImageSource ()
 Destructor.
 
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 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 void retrieve (cv::Mat &color, cv::Mat &gray)
 Call after grab() to get the actual image data.
 
static void callback (uvc_frame_t *frame, void *ptr)
 This callback function is called each time a new frame is received from the video stream. More...
 
void callback (uvc_frame_t *frame)
 

Member Function Documentation

§ callback()

void osvr::vbtracker::UVCImageSource::callback ( uvc_frame_t *  frame,
void *  ptr 
)
staticprotected

This callback function is called each time a new frame is received from the video stream.

§ grab()

bool osvr::vbtracker::UVCImageSource::grab ( )
overridevirtual

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.

Implements osvr::vbtracker::ImageSource.

§ ok()

bool osvr::vbtracker::UVCImageSource::ok ( ) const
overridevirtual
Returns
true if the camera/image source is OK

Implements osvr::vbtracker::ImageSource.

§ retrieveColor()

void osvr::vbtracker::UVCImageSource::retrieveColor ( cv::Mat &  color)
overridevirtual

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.

Implements osvr::vbtracker::ImageSource.


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