Public Member Functions | Protected Attributes
alvar::Capture Class Reference

Capture interface that plugins must implement. More...

#include <Capture.h>

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

List of all members.

Public Member Functions

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

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 ( ) [inline, virtual]

Destructor.

Definition at line 65 of file Capture.h.


Member Function Documentation

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) [inline, virtual]

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) [inline, virtual]

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 
) [inline, virtual]

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

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 Sat Dec 28 2013 16:46:16