mimas::image_dc1394input< T > Class Template Reference
[Image Input]

Image input from firewire digital camera (video1394). More...

#include <image_dc1394input.h>

Inheritance diagram for mimas::image_dc1394input< T >:

Inheritance graph
[legend]
Collaboration diagram for mimas::image_dc1394input< T >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 image_dc1394input (int _mode, int _framerate=FRAMERATE_15, int _node=0, const char *_device=NULL, int _channel=0, int _speed=SPEED_400) throw (mimasexception)
 Constructor.
virtual ~image_dc1394input (void)
virtual void read (image< T > &img) throw (mimasexception)
 Read image from arbitrary source.
dc1394_feature_info get_feature (int _id) throw (mimasexception)
void set_feature_value (int _id, unsigned int _value) throw (mimasexception)
unsigned int get_feature_value (int _id) throw (mimasexception)

Protected Attributes

raw1394handle_t handle
dc1394_cameracapture camera
int mode
int node

Detailed Description

template<typename T>
class mimas::image_dc1394input< T >

Image input from firewire digital camera (video1394).

At the moment only grabbing of grayscale and YUV422-encoded images is supported. Grabbing has been tested with the following device:

See Ryutaroh Matsumoto's page for more information.

Here is an example on how to use this class:

#include <fstream>
#include <GL/glut.h>
#include "image_dc1394input.h"
#include "image_mesaoutput.h"

using namespace std;
using namespace mimas;

// Minimal program for displaying multiple images from a single file.
int main( int argc, char *argv[] )
{
  int retVal = 0;

  try {

    // Initialise GLUT.
    glutInit( &argc, argv );
    
    // Open X11 display.
    x11_display disp;

    // Load file.
    image_dc1394input< rgba< unsigned char > >
      input( MODE_640x480_YUV422, FRAMERATE_15 );
    
    // Open window.
    image_mesaoutput< rgba< unsigned char > > win( &disp );

    // Allocate image.
    image< rgba< unsigned char > > img;

    while( input ) {
      
      // Read image.
      input >> img;

      // Display image.
      win << img;

    };

  } catch ( exception &e ) {

    // Print error message.
    cerr << e.what() << endl;
    retVal = 1;

  };
  
  return retVal;
}

Author:
Jan Wedekind (jan at wedesoft.de)
Date:
Wed Aug 4 13:53:59 GMT 2005

Definition at line 32 of file image_dc1394input.h.


Constructor & Destructor Documentation

template<typename T>
mimas::image_dc1394input< T >::image_dc1394input ( int  _mode,
int  _framerate = FRAMERATE_15,
int  _node = 0,
const char *  _device = NULL,
int  _channel = 0,
int  _speed = SPEED_400 
) throw (mimasexception)

Constructor.

At the moment, there is no support to get a list of available modes or automatically select the best mode. You need to use f.e. the software `coriander', if you want to know the capabilities of the camera.

template<typename T>
virtual mimas::image_dc1394input< T >::~image_dc1394input ( void   )  [virtual]


Member Function Documentation

template<typename T>
virtual void mimas::image_dc1394input< T >::read ( image< T > &  img  )  throw (mimasexception) [virtual]

Read image from arbitrary source.

This function is virtual and has to be implemented by the inheriting class.

Parameters:
img Object to store image in.

Implements mimas::image_input< T >.

template<typename T>
dc1394_feature_info mimas::image_dc1394input< T >::get_feature ( int  _id  )  throw (mimasexception)

template<typename T>
void mimas::image_dc1394input< T >::set_feature_value ( int  _id,
unsigned int  _value 
) throw (mimasexception)

template<typename T>
unsigned int mimas::image_dc1394input< T >::get_feature_value ( int  _id  )  throw (mimasexception)


Member Data Documentation

template<typename T>
raw1394handle_t mimas::image_dc1394input< T >::handle [protected]

Definition at line 58 of file image_dc1394input.h.

template<typename T>
dc1394_cameracapture mimas::image_dc1394input< T >::camera [protected]

Definition at line 60 of file image_dc1394input.h.

template<typename T>
int mimas::image_dc1394input< T >::mode [protected]

Definition at line 62 of file image_dc1394input.h.

template<typename T>
int mimas::image_dc1394input< T >::node [protected]

Definition at line 64 of file image_dc1394input.h.


The documentation for this class was generated from the following file:
[GNU/Linux] [Qt] [Mesa] [STL] [Lapack] [Boost] [Magick++] [Xalan-C and Xerces-C] [doxygen] [graphviz] [FFTW] [popt] [xine] [Gnuplot] [gnu-arch] [gcc] [gstreamer] [autoconf/automake/make] [freshmeat.net] [opensource.org] [sourceforge.net] [MMVL]
mimas 2.1 - Copyright Mon Oct 30 11:31:31 2006, Bala Amavasai, Stuart Meikle, Arul Selvan, Fabio Caparrelli, Jan Wedekind, Manuel Boissenin, ...