Robotics Library  0.7.0
Classes | Public Types | Public Member Functions | Private Attributes | List of all members
rl::hal::Dc1394Camera Class Reference

IEEE 1394 based cameras. More...

#include <Dc1394Camera.h>

Inheritance diagram for rl::hal::Dc1394Camera:
Inheritance graph
[legend]

Classes

class  Exception
 

Public Types

enum  ColorCoding {
  COLOR_CODING_MONO8 = ::COLOR_FORMAT7_MONO8, COLOR_CODING_YUV411, COLOR_CODING_YUV422, COLOR_CODING_YUV444,
  COLOR_CODING_RGB8, COLOR_CODING_MONO16, COLOR_CODING_RGB16, COLOR_CODING_MONO16S,
  COLOR_CODING_RGB16S, COLOR_CODING_RAW8, COLOR_CODING_RAW16
}
 
enum  Feature {
  FEATURE_BRIGHTNESS = ::FEATURE_BRIGHTNESS, FEATURE_EXPOSURE, FEATURE_SHARPNESS, FEATURE_WHITE_BALANCE,
  FEATURE_HUE, FEATURE_SATURATION, FEATURE_GAMMA, FEATURE_SHUTTER,
  FEATURE_GAIN, FEATURE_IRIS, FEATURE_FOCUS, FEATURE_TEMPERATURE,
  FEATURE_TRIGGER, FEATURE_TRIGGER_DELAY, FEATURE_WHITE_SHADING, FEATURE_FRAME_RATE,
  FEATURE_ZOOM, FEATURE_PAN, FEATURE_TILT, FEATURE_OPTICAL_FILTER,
  FEATURE_CAPTURE_SIZE, FEATURE_CAPTURE_QUALITY
}
 
enum  FeatureMode { FEATURE_MODE_MANUAL, FEATURE_MODE_AUTO, FEATURE_MODE_ONE_PUSH_AUTO }
 
enum  Framerate {
  FRAMERATE_1_875 = ::FRAMERATE_1_875, FRAMERATE_3_75, FRAMERATE_7_5, FRAMERATE_15,
  FRAMERATE_30, FRAMERATE_60, FRAMERATE_120, FRAMERATE_240
}
 
enum  IsoSpeed {
  ISO_SPEED_100 = ::SPEED_100, ISO_SPEED_200, ISO_SPEED_400, ISO_SPEED_800,
  ISO_SPEED_1600, ISO_SPEED_3200
}
 
enum  OperationMode { OPERATION_MODE_LEGACY = ::OPERATION_MODE_LEGACY, OPERATION_MODE_1394B }
 
enum  VideoMode {
  VIDEO_MODE_160x120_YUV444 = ::MODE_160x120_YUV444, VIDEO_MODE_320x240_YUV422, VIDEO_MODE_640x480_YUV411, VIDEO_MODE_640x480_YUV422,
  VIDEO_MODE_640x480_RGB8, VIDEO_MODE_640x480_MONO8, VIDEO_MODE_640x480_MONO16, VIDEO_MODE_800x600_YUV422 = ::MODE_800x600_YUV422,
  VIDEO_MODE_800x600_RGB8, VIDEO_MODE_800x600_MONO8, VIDEO_MODE_1024x768_YUV422, VIDEO_MODE_1024x768_RGB8,
  VIDEO_MODE_1024x768_MONO8, VIDEO_MODE_800x600_MONO16, VIDEO_MODE_1024x768_MONO16, VIDEO_MODE_1280x960_YUV422 = ::MODE_1280x960_YUV422,
  VIDEO_MODE_1280x960_RGB8, VIDEO_MODE_1280x960_MONO8, VIDEO_MODE_1600x1200_YUV422, VIDEO_MODE_1600x1200_RGB8,
  VIDEO_MODE_1600x1200_MONO8, VIDEO_MODE_1280x960_MONO16, VIDEO_MODE_1600x1200_MONO16, VIDEO_MODE_EXIF = ::MODE_EXIF,
  VIDEO_MODE_FORMAT7_0 = ::MODE_FORMAT7_0, VIDEO_MODE_FORMAT7_1, VIDEO_MODE_FORMAT7_2, VIDEO_MODE_FORMAT7_3,
  VIDEO_MODE_FORMAT7_4, VIDEO_MODE_FORMAT7_5, VIDEO_MODE_FORMAT7_6, VIDEO_MODE_FORMAT7_7
}
 

Public Member Functions

 Dc1394Camera (const ::std::string &filename="", const unsigned int &node=0)
 
virtual ~Dc1394Camera ()
 
void close ()
 
unsigned int getBitsPerPixel () const
 
unsigned int getColorCodingDepth () const
 
unsigned int getHeight () const
 
bool getFeatureAbsoluteControl (const Feature &feature) const
 
void getFeatureBoundaries (const Feature &feature, unsigned int &min, unsigned int &max) const
 
void getFeatureBoundariesAbsolute (const Feature &feature, float &min, float &max) const
 
FeatureMode getFeatureMode (const Feature &feature) const
 
void getFeatureModes (const Feature &feature, bool &hasManual, bool &hasAuto, bool &hasOnePushAuto) const
 
unsigned int getFeatureValue (const Feature &feature) const
 
float getFeatureValueAbsolute (const Feature &feature) const
 
::std::string getFilename () const
 
void getFormat7 (VideoMode &videoMode, ColorCoding &colorCoding, unsigned int &left, unsigned int &top, unsigned int &width, unsigned int &height) const
 
void getFormat7MaximumImageSize (const unsigned int &mode, unsigned int &width, unsigned &height) const
 
Framerate getFramerate () const
 
unsigned int getNode () const
 
int getNumCameras () const
 
OperationMode getOperationMode () const
 
unsigned int getPort () const
 
unsigned int getSize () const
 
IsoSpeed getSpeed () const
 
::std::chrono::nanoseconds getUpdateRate () const
 
VideoMode getVideoMode () const
 
unsigned int getWidth () const
 
void grab (unsigned char *image)
 
bool hasFeatureAbsoluteControl (const Feature &feature) const
 
bool isFeatureEnabled (const Feature &feature) const
 
bool isFeaturePresent (const Feature &feature) const
 
bool isFeatureReadable (const Feature &feature) const
 
bool isFeatureSwitchable (const Feature &feature) const
 
void open ()
 
void reset ()
 
void setFeatureAbsoluteControl (const Feature &feature, const bool &doOn)
 
void setFeatureEnabled (const Feature &feature, const bool &doOn)
 
void setFeatureMode (const Feature &feature, const FeatureMode &mode)
 
void setFeatureValue (const Feature &feature, const unsigned int &value)
 
void setFeatureValueAbsolute (const Feature &feature, const float &value)
 
void setFilename (const ::std::string &filename)
 
void setFormat7 (const VideoMode &videoMode, const ColorCoding &colorCoding, const unsigned int &left, const unsigned int &top, const unsigned int &width, const unsigned int &height)
 
void setFramerate (const Framerate &framerate)
 
void setNode (const unsigned int &node)
 
void setOperationMode (const OperationMode &mode)
 
void setPort (const unsigned int &port)
 
void setSpeed (const IsoSpeed &speed)
 
void setVideoMode (const VideoMode &mode)
 
void start ()
 
void step ()
 
void stop ()
 
- Public Member Functions inherited from rl::hal::Camera
 Camera ()
 
virtual ~Camera ()
 
- Public Member Functions inherited from rl::hal::Device
 Device ()
 
virtual ~Device ()
 
bool isConnected () const
 
bool isRunning () const
 
- Public Member Functions inherited from rl::hal::CyclicDevice
 CyclicDevice (const ::std::chrono::nanoseconds &updateRate)
 
virtual ~CyclicDevice ()
 
virtual ::std::chrono::nanoseconds getUpdateRate () const
 

Private Attributes

unsigned int buffer
 
::dc1394_cameracapture camera
 
int cameras
 
unsigned int channel
 
ColorCoding colorCoding
 
unsigned int drop
 
::std::string filename
 
Framerate framerate
 
::raw1394handle_t handle
 
unsigned int height
 
::dc1394_camerainfo info
 
unsigned int left
 
unsigned int node
 
nodeid_t * nodes
 
unsigned int port
 
unsigned int speed
 
unsigned int top
 
VideoMode videoMode
 
unsigned int width
 

Additional Inherited Members

- Protected Member Functions inherited from rl::hal::Device
void setConnected (const bool &connected)
 
void setRunning (const bool &running)
 

Detailed Description

IEEE 1394 based cameras.

Member Enumeration Documentation

◆ ColorCoding

Enumerator
COLOR_CODING_MONO8 
COLOR_CODING_YUV411 
COLOR_CODING_YUV422 
COLOR_CODING_YUV444 
COLOR_CODING_RGB8 
COLOR_CODING_MONO16 
COLOR_CODING_RGB16 
COLOR_CODING_MONO16S 
COLOR_CODING_RGB16S 
COLOR_CODING_RAW8 
COLOR_CODING_RAW16 

◆ Feature

Enumerator
FEATURE_BRIGHTNESS 
FEATURE_EXPOSURE 
FEATURE_SHARPNESS 
FEATURE_WHITE_BALANCE 
FEATURE_HUE 
FEATURE_SATURATION 
FEATURE_GAMMA 
FEATURE_SHUTTER 
FEATURE_GAIN 
FEATURE_IRIS 
FEATURE_FOCUS 
FEATURE_TEMPERATURE 
FEATURE_TRIGGER 
FEATURE_TRIGGER_DELAY 
FEATURE_WHITE_SHADING 
FEATURE_FRAME_RATE 
FEATURE_ZOOM 
FEATURE_PAN 
FEATURE_TILT 
FEATURE_OPTICAL_FILTER 
FEATURE_CAPTURE_SIZE 
FEATURE_CAPTURE_QUALITY 

◆ FeatureMode

Enumerator
FEATURE_MODE_MANUAL 
FEATURE_MODE_AUTO 
FEATURE_MODE_ONE_PUSH_AUTO 

◆ Framerate

Enumerator
FRAMERATE_1_875 
FRAMERATE_3_75 
FRAMERATE_7_5 
FRAMERATE_15 
FRAMERATE_30 
FRAMERATE_60 
FRAMERATE_120 
FRAMERATE_240 

◆ IsoSpeed

Enumerator
ISO_SPEED_100 
ISO_SPEED_200 
ISO_SPEED_400 
ISO_SPEED_800 
ISO_SPEED_1600 
ISO_SPEED_3200 

◆ OperationMode

Enumerator
OPERATION_MODE_LEGACY 
OPERATION_MODE_1394B 

◆ VideoMode

Enumerator
VIDEO_MODE_160x120_YUV444 
VIDEO_MODE_320x240_YUV422 
VIDEO_MODE_640x480_YUV411 
VIDEO_MODE_640x480_YUV422 
VIDEO_MODE_640x480_RGB8 
VIDEO_MODE_640x480_MONO8 
VIDEO_MODE_640x480_MONO16 
VIDEO_MODE_800x600_YUV422 
VIDEO_MODE_800x600_RGB8 
VIDEO_MODE_800x600_MONO8 
VIDEO_MODE_1024x768_YUV422 
VIDEO_MODE_1024x768_RGB8 
VIDEO_MODE_1024x768_MONO8 
VIDEO_MODE_800x600_MONO16 
VIDEO_MODE_1024x768_MONO16 
VIDEO_MODE_1280x960_YUV422 
VIDEO_MODE_1280x960_RGB8 
VIDEO_MODE_1280x960_MONO8 
VIDEO_MODE_1600x1200_YUV422 
VIDEO_MODE_1600x1200_RGB8 
VIDEO_MODE_1600x1200_MONO8 
VIDEO_MODE_1280x960_MONO16 
VIDEO_MODE_1600x1200_MONO16 
VIDEO_MODE_EXIF 
VIDEO_MODE_FORMAT7_0 
VIDEO_MODE_FORMAT7_1 
VIDEO_MODE_FORMAT7_2 
VIDEO_MODE_FORMAT7_3 
VIDEO_MODE_FORMAT7_4 
VIDEO_MODE_FORMAT7_5 
VIDEO_MODE_FORMAT7_6 
VIDEO_MODE_FORMAT7_7 

Constructor & Destructor Documentation

◆ Dc1394Camera()

rl::hal::Dc1394Camera::Dc1394Camera ( const ::std::string &  filename = "",
const unsigned int &  node = 0 
)

◆ ~Dc1394Camera()

rl::hal::Dc1394Camera::~Dc1394Camera ( )
virtual

Member Function Documentation

◆ close()

void rl::hal::Dc1394Camera::close ( )
virtual
Precondition
stop()

Implements rl::hal::Device.

◆ getBitsPerPixel()

unsigned int rl::hal::Dc1394Camera::getBitsPerPixel ( ) const

◆ getColorCodingDepth()

unsigned int rl::hal::Dc1394Camera::getColorCodingDepth ( ) const

◆ getFeatureAbsoluteControl()

bool rl::hal::Dc1394Camera::getFeatureAbsoluteControl ( const Feature feature) const

◆ getFeatureBoundaries()

void rl::hal::Dc1394Camera::getFeatureBoundaries ( const Feature feature,
unsigned int &  min,
unsigned int &  max 
) const

◆ getFeatureBoundariesAbsolute()

void rl::hal::Dc1394Camera::getFeatureBoundariesAbsolute ( const Feature feature,
float &  min,
float &  max 
) const

◆ getFeatureMode()

Dc1394Camera::FeatureMode rl::hal::Dc1394Camera::getFeatureMode ( const Feature feature) const

◆ getFeatureModes()

void rl::hal::Dc1394Camera::getFeatureModes ( const Feature feature,
bool &  hasManual,
bool &  hasAuto,
bool &  hasOnePushAuto 
) const

◆ getFeatureValue()

unsigned int rl::hal::Dc1394Camera::getFeatureValue ( const Feature feature) const

◆ getFeatureValueAbsolute()

float rl::hal::Dc1394Camera::getFeatureValueAbsolute ( const Feature feature) const

◆ getFilename()

std::string rl::hal::Dc1394Camera::getFilename ( ) const

◆ getFormat7()

void rl::hal::Dc1394Camera::getFormat7 ( VideoMode videoMode,
ColorCoding colorCoding,
unsigned int &  left,
unsigned int &  top,
unsigned int &  width,
unsigned int &  height 
) const

◆ getFormat7MaximumImageSize()

void rl::hal::Dc1394Camera::getFormat7MaximumImageSize ( const unsigned int &  mode,
unsigned int &  width,
unsigned &  height 
) const

◆ getFramerate()

Dc1394Camera::Framerate rl::hal::Dc1394Camera::getFramerate ( ) const

◆ getHeight()

unsigned int rl::hal::Dc1394Camera::getHeight ( ) const
virtual

Implements rl::hal::Camera.

◆ getNode()

unsigned int rl::hal::Dc1394Camera::getNode ( ) const

◆ getNumCameras()

int rl::hal::Dc1394Camera::getNumCameras ( ) const

◆ getOperationMode()

Dc1394Camera::OperationMode rl::hal::Dc1394Camera::getOperationMode ( ) const

◆ getPort()

unsigned int rl::hal::Dc1394Camera::getPort ( ) const

◆ getSize()

unsigned int rl::hal::Dc1394Camera::getSize ( ) const
virtual

Implements rl::hal::Camera.

◆ getSpeed()

Dc1394Camera::IsoSpeed rl::hal::Dc1394Camera::getSpeed ( ) const

◆ getUpdateRate()

std::chrono::nanoseconds rl::hal::Dc1394Camera::getUpdateRate ( ) const

◆ getVideoMode()

Dc1394Camera::VideoMode rl::hal::Dc1394Camera::getVideoMode ( ) const

◆ getWidth()

unsigned int rl::hal::Dc1394Camera::getWidth ( ) const
virtual

Implements rl::hal::Camera.

◆ grab()

void rl::hal::Dc1394Camera::grab ( unsigned char *  image)
virtual

Implements rl::hal::Camera.

◆ hasFeatureAbsoluteControl()

bool rl::hal::Dc1394Camera::hasFeatureAbsoluteControl ( const Feature feature) const

◆ isFeatureEnabled()

bool rl::hal::Dc1394Camera::isFeatureEnabled ( const Feature feature) const

◆ isFeaturePresent()

bool rl::hal::Dc1394Camera::isFeaturePresent ( const Feature feature) const

◆ isFeatureReadable()

bool rl::hal::Dc1394Camera::isFeatureReadable ( const Feature feature) const

◆ isFeatureSwitchable()

bool rl::hal::Dc1394Camera::isFeatureSwitchable ( const Feature feature) const

◆ open()

void rl::hal::Dc1394Camera::open ( )
virtual

Implements rl::hal::Device.

◆ reset()

void rl::hal::Dc1394Camera::reset ( )

◆ setFeatureAbsoluteControl()

void rl::hal::Dc1394Camera::setFeatureAbsoluteControl ( const Feature feature,
const bool &  doOn 
)

◆ setFeatureEnabled()

void rl::hal::Dc1394Camera::setFeatureEnabled ( const Feature feature,
const bool &  doOn 
)

◆ setFeatureMode()

void rl::hal::Dc1394Camera::setFeatureMode ( const Feature feature,
const FeatureMode mode 
)

◆ setFeatureValue()

void rl::hal::Dc1394Camera::setFeatureValue ( const Feature feature,
const unsigned int &  value 
)

◆ setFeatureValueAbsolute()

void rl::hal::Dc1394Camera::setFeatureValueAbsolute ( const Feature feature,
const float &  value 
)

◆ setFilename()

void rl::hal::Dc1394Camera::setFilename ( const ::std::string &  filename)

◆ setFormat7()

void rl::hal::Dc1394Camera::setFormat7 ( const VideoMode videoMode,
const ColorCoding colorCoding,
const unsigned int &  left,
const unsigned int &  top,
const unsigned int &  width,
const unsigned int &  height 
)

◆ setFramerate()

void rl::hal::Dc1394Camera::setFramerate ( const Framerate framerate)

◆ setNode()

void rl::hal::Dc1394Camera::setNode ( const unsigned int &  node)

◆ setOperationMode()

void rl::hal::Dc1394Camera::setOperationMode ( const OperationMode mode)

◆ setPort()

void rl::hal::Dc1394Camera::setPort ( const unsigned int &  port)

◆ setSpeed()

void rl::hal::Dc1394Camera::setSpeed ( const IsoSpeed speed)

◆ setVideoMode()

void rl::hal::Dc1394Camera::setVideoMode ( const VideoMode mode)

◆ start()

void rl::hal::Dc1394Camera::start ( )
virtual
Precondition
open()

Implements rl::hal::Device.

◆ step()

void rl::hal::Dc1394Camera::step ( )
virtual
Precondition
start()

Implements rl::hal::CyclicDevice.

◆ stop()

void rl::hal::Dc1394Camera::stop ( )
virtual
Precondition
open()

Implements rl::hal::Device.

Member Data Documentation

◆ buffer

unsigned int rl::hal::Dc1394Camera::buffer
private

◆ camera

::dc1394_cameracapture rl::hal::Dc1394Camera::camera
private

◆ cameras

int rl::hal::Dc1394Camera::cameras
private

◆ channel

unsigned int rl::hal::Dc1394Camera::channel
private

◆ colorCoding

ColorCoding rl::hal::Dc1394Camera::colorCoding
private

◆ drop

unsigned int rl::hal::Dc1394Camera::drop
private

◆ filename

::std::string rl::hal::Dc1394Camera::filename
private

◆ framerate

Framerate rl::hal::Dc1394Camera::framerate
private

◆ handle

::raw1394handle_t rl::hal::Dc1394Camera::handle
private

◆ height

unsigned int rl::hal::Dc1394Camera::height
private

◆ info

::dc1394_camerainfo rl::hal::Dc1394Camera::info
private

◆ left

unsigned int rl::hal::Dc1394Camera::left
private

◆ node

unsigned int rl::hal::Dc1394Camera::node
private

◆ nodes

nodeid_t* rl::hal::Dc1394Camera::nodes
private

◆ port

unsigned int rl::hal::Dc1394Camera::port
private

◆ speed

unsigned int rl::hal::Dc1394Camera::speed
private

◆ top

unsigned int rl::hal::Dc1394Camera::top
private

◆ videoMode

VideoMode rl::hal::Dc1394Camera::videoMode
private

◆ width

unsigned int rl::hal::Dc1394Camera::width
private

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