Public Member Functions | Protected Attributes | List of all members
alvar::Capture Class Referenceabstract

Capture interface that plugins must implement. More...

#include <Capture.h>

Inheritance diagram for alvar::Capture:
Inheritance graph
[legend]

Public Member Functions

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

Protected Attributes

CaptureDevice mCaptureDevice
 
bool mIsCapturing
 
unsigned long mXResolution
 
unsigned long mYResolution
 

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.

Examples:
SampleCamCalib.cpp, SampleCvTestbed.cpp, SampleIntegralImage.cpp, SampleLabeling.cpp, SampleMarkerDetector.cpp, SampleMarkerHide.cpp, SampleMarkerlessDetector.cpp, SampleMultiMarker.cpp, SampleMultiMarkerBundle.cpp, SamplePointcloud.cpp, and SampleTrack.cpp.

Definition at line 46 of file Capture.h.

Constructor & Destructor Documentation

alvar::Capture::Capture ( const CaptureDevice  captureDevice)
inline

Constructor.

Parameters
captureDeviceInformation of which camera to create.

Definition at line 54 of file Capture.h.

virtual alvar::Capture::~Capture ( )
inlinevirtual

Destructor.

Definition at line 65 of file Capture.h.

Member Function Documentation

CaptureDevice alvar::Capture::captureDevice ( )
inline
virtual IplImage* alvar::Capture::captureImage ( )
pure virtual

Capture one image from the camera.

Do not modify this image.

Returns
The captured image.

Implemented in alvar::plugins::CaptureDSCapture, alvar::plugins::CapturePtgrey, alvar::plugins::CaptureHighgui, alvar::plugins::CaptureCmu, and alvar::plugins::CaptureFile.

bool alvar::Capture::isCapturing ( )
inline

Test if the camera was properly initialized.

Definition at line 85 of file Capture.h.

virtual bool alvar::Capture::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.
Examples:
SampleCamCalib.cpp, SampleCvTestbed.cpp, SampleIntegralImage.cpp, SampleLabeling.cpp, SampleMarkerDetector.cpp, SampleMarkerHide.cpp, SampleMarkerlessDetector.cpp, SampleMultiMarker.cpp, SampleMultiMarkerBundle.cpp, SamplePointcloud.cpp, and SampleTrack.cpp.

Definition at line 145 of file Capture.h.

virtual bool alvar::Capture::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.
Examples:
SampleCamCalib.cpp, SampleCvTestbed.cpp, SampleIntegralImage.cpp, SampleLabeling.cpp, SampleMarkerDetector.cpp, SampleMarkerHide.cpp, SampleMarkerlessDetector.cpp, SampleMultiMarker.cpp, SampleMultiMarkerBundle.cpp, SamplePointcloud.cpp, and SampleTrack.cpp.

Definition at line 124 of file Capture.h.

virtual bool alvar::Capture::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 alvar::plugins::CaptureDSCapture, alvar::plugins::CapturePtgrey, alvar::plugins::CaptureHighgui, alvar::plugins::CaptureCmu, and alvar::plugins::CaptureFile.

virtual std::string alvar::Capture::SerializeId ( )
pure virtual
virtual void alvar::Capture::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 alvar::plugins::CaptureHighgui.

Examples:
SampleCamCalib.cpp, SampleCvTestbed.cpp, SampleIntegralImage.cpp, SampleLabeling.cpp, SampleMarkerDetector.cpp, SampleMarkerHide.cpp, SampleMarkerlessDetector.cpp, SampleMultiMarker.cpp, SampleMultiMarkerBundle.cpp, SamplePointcloud.cpp, and SampleTrack.cpp.

Definition at line 93 of file Capture.h.

virtual bool alvar::Capture::showSettingsDialog ( )
pure virtual

Show the settings dialog of the camera.

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

Implemented in alvar::plugins::CaptureDSCapture, alvar::plugins::CapturePtgrey, alvar::plugins::CaptureHighgui, alvar::plugins::CaptureCmu, and alvar::plugins::CaptureFile.

virtual bool alvar::Capture::start ( )
pure virtual
virtual void alvar::Capture::stop ( )
pure virtual
unsigned long alvar::Capture::xResolution ( )
inline

The resolution along the x axis (horizontal).

Definition at line 75 of file Capture.h.

unsigned long alvar::Capture::yResolution ( )
inline

The resolution along the y axis (vertical).

Definition at line 80 of file Capture.h.

Member Data Documentation

CaptureDevice alvar::Capture::mCaptureDevice
protected

Definition at line 180 of file Capture.h.

bool alvar::Capture::mIsCapturing
protected

Definition at line 183 of file Capture.h.

unsigned long alvar::Capture::mXResolution
protected

Definition at line 181 of file Capture.h.

unsigned long alvar::Capture::mYResolution
protected

Definition at line 182 of file Capture.h.


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


ar_track_alvar
Author(s): Scott Niekum
autogenerated on Mon Jun 10 2019 12:47:04