ProjectedTextures
Prototype software for spacial augmented reality applications.
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros
Public Slots | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
OpenCvCam Class Reference

#include <OpenCvCam.h>

Inheritance diagram for OpenCvCam:
Camera

Public Slots

void setExposure (int exposure)
 
void setGain (int gain)
 
- Public Slots inherited from Camera
void setViewMatrix (QMatrix4x4 viewMat)
 
virtual void setExposure (int exposure)=0
 
virtual void setGain (int gain)=0
 

Public Member Functions

 OpenCvCam (QString name, int deviceId, int frameWidth, int frameHeight, int targetFps, int bufferSize, QString calibrationFile)
 
 ~OpenCvCam (void)
 
- Public Member Functions inherited from Camera
 Camera (QString name, int frameWidth, int frameHeight, int targetFps, int bufferSize, QString calibrationFile)
 
virtual ~Camera (void)
 
void stop ()
 
void stopAndDelete ()
 
QString getName ()
 
Mat getFrameMat (bool grayscale=false)
 
QImage getFrameQImage (bool grayscale=false)
 
bool isConnected ()
 
int getFrameWidth ()
 
int getFrameHeight ()
 
int getFPS ()
 
int getTargetFPS ()
 
QString getCalibrationFile ()
 
QMatrix4x4 getProjMat ()
 
QMatrix4x4 getViewMat ()
 

Protected Member Functions

void grabFrame ()
 
- Protected Member Functions inherited from Camera
void run ()
 
void submitFrame (Mat m, bool mono)
 
void updateFPS (int timeElapsed)
 
QImage matToQImage (const Mat &mat)
 

Protected Attributes

VideoCapture cap
 
- Protected Attributes inherited from Camera
QString name
 
QList< FrameframeBuffer
 
int bufferSize
 
int maxConcurrentReads
 
int frameWidth
 
int frameHeight
 
int targetFps
 
int curFrameIdx
 
QMutex curFrameMutex
 
QMutex stopMutex
 
volatile bool doStop
 
bool connected
 
QString calibrationFile
 
QMatrix4x4 projMat
 
QMatrix4x4 viewMat
 
QTime t
 
int captureTime
 
QQueue< int > fpsQueue
 
int avgFPS
 

Additional Inherited Members

- Signals inherited from Camera
void newFrame ()
 
void newFps (int fps)
 
- Static Protected Attributes inherited from Camera
static const int fpsQueueLength = 32
 

Detailed Description

a camera class using OpenCVs camera capture functionality

Constructor & Destructor Documentation

OpenCvCam::OpenCvCam ( QString  name,
int  deviceId,
int  frameWidth,
int  frameHeight,
int  targetFps,
int  bufferSize,
QString  calibrationFile 
)

for the rest of the parameters, see Camera

Parameters
deviceIdthe id assigned to a connected USB camera by OpenCV, starts from 0, doesn't follow any rules
OpenCvCam::~OpenCvCam ( void  )

Member Function Documentation

void OpenCvCam::grabFrame ( )
protectedvirtual

actually capture the frame

Implements Camera.

void OpenCvCam::setExposure ( int  exposure)
inlineslot
void OpenCvCam::setGain ( int  gain)
inlineslot

Member Data Documentation

VideoCapture OpenCvCam::cap
protected

OpenCV-class that can capture camera frames


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