Image Utilities (IU)
 All Data Structures Namespaces Functions Variables Typedefs Enumerations Friends Groups Pages
Public Member Functions
iu::OpenCVSource Class Reference

The OpenCVSource class uses OpenCV to read images from cameras or files. More...

#include <opencvsource.h>

Inheritance diagram for iu::OpenCVSource:
iu::VideoSource

Public Member Functions

 OpenCVSource (unsigned int camId=0, bool gray=true)
 OpenCVSource constructor. Initialize the camera camId. More...
 
 OpenCVSource (const std::string &filename, bool gray=true)
 OpenCVSource constructor to read from a video file. More...
 
cv::Mat getImage ()
 get new image More...
 
unsigned int getWidth ()
 get image width More...
 
unsigned int getHeight ()
 get image height More...
 
unsigned int getCurrentFrameNr ()
 get frame index. Upon camera initilaization, the counter is set to 0 More...
 

Additional Inherited Members

- Protected Attributes inherited from iu::VideoSource
unsigned int width_
 
unsigned int height_
 
unsigned int frameNr_
 

Detailed Description

The OpenCVSource class uses OpenCV to read images from cameras or files.

Constructor & Destructor Documentation

iu::OpenCVSource::OpenCVSource ( unsigned int  camId = 0,
bool  gray = true 
)

OpenCVSource constructor. Initialize the camera camId.

Parameters
camIdid of camera to initialize
grayif true, capture 8-bit grayscale, otherwise 24-bit RGB
iu::OpenCVSource::OpenCVSource ( const std::string &  filename,
bool  gray = true 
)

OpenCVSource constructor to read from a video file.

Parameters
filenamevideo file name
grayif true, capture 8-bit grayscale, otherwise 24-bit RGB

Member Function Documentation

unsigned int iu::OpenCVSource::getCurrentFrameNr ( )
inlinevirtual

get frame index. Upon camera initilaization, the counter is set to 0

Returns

Implements iu::VideoSource.

unsigned int iu::OpenCVSource::getHeight ( )
inlinevirtual

get image height

Returns
height

Implements iu::VideoSource.

cv::Mat iu::OpenCVSource::getImage ( )
virtual

get new image

Returns
cv::Mat

Implements iu::VideoSource.

unsigned int iu::OpenCVSource::getWidth ( )
inlinevirtual

get image width

Returns
width

Implements iu::VideoSource.


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