OSVR-Core
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
base_camera_server Class Referenceabstract
Inheritance diagram for base_camera_server:
image_wrapper

Public Member Functions

bool working (void) const
 Is the camera working properly?
 
unsigned get_num_rows (void) const
 
unsigned get_num_columns (void) const
 
virtual bool read_image_to_memory (unsigned minX=255, unsigned maxX=0, unsigned minY=255, unsigned maxY=0, double exposure_time=250.0)=0
 Read an image to a memory buffer. More...
 
virtual bool get_pixel_from_memory (unsigned X, unsigned Y, vrpn_uint8 &val, int RGB=0) const =0
 Get pixels out of the memory buffer, RGB indexes the colors.
 
virtual bool get_pixel_from_memory (unsigned X, unsigned Y, vrpn_uint16 &val, int RGB=0) const =0
 
virtual bool read_pixel (int x, int y, vrpn_uint8 &result, unsigned rgb=0) const
 
virtual bool read_pixel (int x, int y, vrpn_uint16 &result, unsigned rgb=0) const
 
virtual bool read_pixel (int x, int y, double &result, unsigned rgb=0) const
 Read a pixel from the image into a double; return true if the pixel.
 
virtual double read_pixel_nocheck (int x, int y, unsigned rgb=0) const
 Read a pixel from the image into a double; Don't check boundaries.
 
virtual void read_range (int &minx, int &maxx, int &miny, int &maxy) const
 Instantiation needed for image_wrapper.
 
- Public Member Functions inherited from image_wrapper
virtual unsigned get_num_colors () const =0
 Return the number of colors that the image has.
 
bool read_pixel_bilerp (double x, double y, double &result, unsigned rgb=0) const
 
double read_pixel_bilerp_nocheck (double x, double y, unsigned rgb=0) const
 

Protected Member Functions

virtual bool open_and_find_parameters (void)
 
 base_camera_server (unsigned binning=1)
 

Protected Attributes

bool _status
 
unsigned _num_rows
 
unsigned _num_columns
 
unsigned _minX = 0
 
unsigned _minY = 0
 
unsigned _maxX = 0
 
unsigned _maxY = 0
 
unsigned _binning
 

Member Function Documentation

§ read_image_to_memory()

virtual bool base_camera_server::read_image_to_memory ( unsigned  minX = 255,
unsigned  maxX = 0,
unsigned  minY = 255,
unsigned  maxY = 0,
double  exposure_time = 250.0 
)
pure virtual

Read an image to a memory buffer.

Max < min means "whole range". Setting binning > 1 packs more camera pixels into each image pixel, so the maximum number of pixels has to be divided by the binning constant (the effective number of pixels is lower and pixel coordinates are set in this reduced-count pixel space). This routine returns false if a new image could not be read (for example, because of a timeout on the reading because we're at the end of a video stream).


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