My Project
Public Member Functions | Protected Attributes | List of all members
Capture Class Referenceabstract

Capture interface that plugins must implement. More...

#include <Capture.h>

Inheritance diagram for Capture:
CaptureCmu CaptureDSCapture CaptureFile CaptureHighgui CapturePtgrey

Public Member Functions

 Capture (const CaptureDevice captureDevice)
 Constructor. More...
 
virtual ~Capture ()
 Destructor.
 
CaptureDevice captureDevice ()
 The camera information associated to this capture object.
 
unsigned long xResolution ()
 The resolution along the x axis (horizontal).
 
unsigned long yResolution ()
 The resolution along the y axis (vertical).
 
bool isCapturing ()
 Test if the camera was properly initialized.
 
virtual void setResolution (const unsigned long xResolution, const unsigned long yResolution)
 Set the resolution. More...
 
virtual bool start ()=0
 Starts the camera capture. More...
 
virtual void stop ()=0
 Stops the camera capture.
 
virtual cv::Mat captureImage ()=0
 Capture one image from the camera. More...
 
virtual bool saveSettings (std::string filename)
 Save camera settings to a file. More...
 
virtual bool loadSettings (std::string filename)
 Load camera settings from a file. More...
 
virtual bool showSettingsDialog ()=0
 Show the settings dialog of the camera. More...
 
virtual std::string SerializeId ()=0
 The identification of the class for serialization.
 
virtual bool Serialize (Serialization *serialization)=0
 Performs serialization of the class members and configuration. More...
 

Protected Attributes

CaptureDevice mCaptureDevice
 
unsigned long mXResolution
 
unsigned long mYResolution
 
bool mIsCapturing
 

Detailed Description

Capture interface that plugins must implement.

All plugins must implement the Capture interface. This is the class that implements all of the camera capture funtionality. This class is created by the CapturePlugin implementation.

Definition at line 46 of file Capture.h.

Constructor & Destructor Documentation

◆ Capture()

Capture ( const CaptureDevice  captureDevice)
inline

Constructor.

Parameters
captureDeviceInformation of which camera to create.

Definition at line 54 of file Capture.h.

Member Function Documentation

◆ captureImage()

virtual cv::Mat captureImage ( )
pure virtual

Capture one image from the camera.

Do not modify this image.

Returns
The captured image.

Implemented in CapturePtgrey, CaptureHighgui, CaptureFile, CaptureDSCapture, and CaptureCmu.

◆ loadSettings()

virtual bool loadSettings ( std::string  filename)
inlinevirtual

Load camera settings from a file.

Parameters
filenameThe filename to read from.
Returns
True if the settings were sucessfully loaded, false otherwise.

Definition at line 163 of file Capture.h.

◆ saveSettings()

virtual bool saveSettings ( std::string  filename)
inlinevirtual

Save camera settings to a file.

Parameters
filenameThe filename to write to.
Returns
True if the settings were sucessfully saved, false otherwise.

Definition at line 141 of file Capture.h.

◆ Serialize()

virtual bool Serialize ( Serialization serialization)
pure virtual

Performs serialization of the class members and configuration.

Parameters
serializationThe Serialization object.
Returns
True if the serialization of the class was successful, false otherwise.

Implemented in CapturePtgrey, CaptureHighgui, CaptureFile, CaptureDSCapture, and CaptureCmu.

◆ setResolution()

virtual void setResolution ( const unsigned long  xResolution,
const unsigned long  yResolution 
)
inlinevirtual

Set the resolution.

Parameters
xResolutionThe resolution along the x axis (horizontal).
yResolutionThe resolution along the y axis (vertical).

Reimplemented in CaptureHighgui.

Definition at line 109 of file Capture.h.

◆ showSettingsDialog()

virtual bool showSettingsDialog ( )
pure virtual

Show the settings dialog of the camera.

Returns
True if the settings dialog was shown, false otherwise.

Implemented in CapturePtgrey, CaptureHighgui, CaptureFile, CaptureDSCapture, and CaptureCmu.

◆ start()

virtual bool start ( )
pure virtual

Starts the camera capture.

Returns
True if the camera was properly initialized, false otherwise.

Implemented in CapturePtgrey, CaptureHighgui, CaptureFile, CaptureDSCapture, and CaptureCmu.


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