Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members

mvl2_video_reader Class Reference

#include <mvl2_video_reader.h>

Inheritance diagram for mvl2_video_reader:

Inheritance graph
[legend]
List of all members.

Detailed Description

A base class for cameras/virtual cameras.

Definition at line 20 of file mvl2_video_reader.h.

Public Member Functions

 mvl2_video_reader ()
 Dflt ctor.
virtual ~mvl2_video_reader ()
 Destructor.
vcl_vector< vcl_string > load_configs (vcl_string filename)
 Load configurations from a file, returns a configuration's name vector.
bool use_config (vcl_string configname)
 Use the configuration given by the configuration's name.
void display_configs ()
 Display the configurations on the standard output.
virtual bool initialize (int width, int height, vcl_string format, vcl_string file_name)=0
 Initialize the camera (format can be Grey, RGB, or more complex).
virtual void uninitialize ()
 Tidy up.
virtual bool is_initialized ()
 Check whether camera is initialised.
virtual void set_capture_size (int width, int height)=0
 Set the size of image captured.
virtual int get_width ()
 Return width of image (in pixels).
virtual int get_height ()
 Return height of image (in pixels).
virtual int get_frame_number ()
 Return the current frame number.
virtual double get_frame_rate ()=0
 Return the frame rate in frames per second.
virtual void set_frame_rate (double frame_rate)=0
 Set the frame rate in frames per second.
virtual int seek (int)
 Move frame counter on to given frame if relevant.
virtual int next_frame ()=0
 Move frame counter on to next frame.
virtual void reset_frame ()=0
 Reset frame counter to zero.
virtual bool get_frame (vil_image_view< vxl_byte > &image)=0
 Put frame data into the given image.
virtual void set_brightness (int)
 Set the brightness of the picture.
virtual void set_hue (int)
 Set the hue of the picture.
virtual void set_colour (int)
 Set the colour of the picture.
virtual void set_contrast (int)
 Set the contrast of the picture.
virtual void set_whiteness (int)
 Set the whiteness of the picture.
virtual vcl_string is_a () const
 Name of the class.
virtual int length ()
 Returns the number of frames available from the beginning of the stream or -1 if unknown.
virtual mvl2_video_readerclone () const =0
 Create a copy on the heap and return base class pointer.

Protected Attributes

bool use_colour_
bool is_initialized_
unsigned int current_frame_
double frame_rate_
int width_
int height_
bool firstcall_
vcl_vector< vcl_string > config_names_
vcl_vector< vcl_pair< int,
int > > 
config_sizes_
vcl_vector< vcl_string > config_strings_
vcl_vector< vcl_string > config_filenames_


Constructor & Destructor Documentation

mvl2_video_reader::mvl2_video_reader  ) 
 

Dflt ctor.

Definition at line 14 of file mvl2_video_reader.cxx.

mvl2_video_reader::~mvl2_video_reader  )  [virtual]
 

Destructor.

Definition at line 18 of file mvl2_video_reader.cxx.


Member Function Documentation

virtual mvl2_video_reader* mvl2_video_reader::clone  )  const [pure virtual]
 

Create a copy on the heap and return base class pointer.

Implemented in mvl2_video_from_avi, mvl2_video_from_avi, and mvl2_video_from_sequence.

void mvl2_video_reader::display_configs  ) 
 

Display the configurations on the standard output.

Definition at line 82 of file mvl2_video_reader.cxx.

virtual bool mvl2_video_reader::get_frame vil_image_view< vxl_byte > &  image  )  [pure virtual]
 

Put frame data into the given image.

Warning: the image is only valid until the next call to get_frame, initialize or uninitialize. return false if error.

Implemented in mvl2_video_from_avi, mvl2_video_from_avi, and mvl2_video_from_sequence.

virtual int mvl2_video_reader::get_frame_number  )  [inline, virtual]
 

Return the current frame number.

Definition at line 59 of file mvl2_video_reader.h.

virtual double mvl2_video_reader::get_frame_rate  )  [pure virtual]
 

Return the frame rate in frames per second.

Implemented in mvl2_video_from_avi, mvl2_video_from_avi, and mvl2_video_from_sequence.

virtual int mvl2_video_reader::get_height  )  [inline, virtual]
 

Return height of image (in pixels).

Reimplemented in mvl2_video_from_avi, mvl2_video_from_avi, and mvl2_video_from_sequence.

Definition at line 56 of file mvl2_video_reader.h.

virtual int mvl2_video_reader::get_width  )  [inline, virtual]
 

Return width of image (in pixels).

Reimplemented in mvl2_video_from_avi, mvl2_video_from_avi, and mvl2_video_from_sequence.

Definition at line 53 of file mvl2_video_reader.h.

virtual bool mvl2_video_reader::initialize int  width,
int  height,
vcl_string  format,
vcl_string  file_name
[pure virtual]
 

Initialize the camera (format can be Grey, RGB, or more complex).

Implemented in mvl2_video_from_avi, mvl2_video_from_avi, and mvl2_video_from_sequence.

vcl_string mvl2_video_reader::is_a  )  const [virtual]
 

Name of the class.

Reimplemented in mvl2_video_from_avi, mvl2_video_from_avi, and mvl2_video_from_sequence.

Definition at line 23 of file mvl2_video_reader.cxx.

virtual bool mvl2_video_reader::is_initialized  )  [inline, virtual]
 

Check whether camera is initialised.

Definition at line 47 of file mvl2_video_reader.h.

int mvl2_video_reader::length  )  [virtual]
 

Returns the number of frames available from the beginning of the stream or -1 if unknown.

Reimplemented in mvl2_video_from_avi, and mvl2_video_from_sequence.

Definition at line 113 of file mvl2_video_reader.cxx.

vcl_vector< vcl_string > mvl2_video_reader::load_configs vcl_string  filename  ) 
 

Load configurations from a file, returns a configuration's name vector.

Definition at line 28 of file mvl2_video_reader.cxx.

virtual int mvl2_video_reader::next_frame  )  [pure virtual]
 

Move frame counter on to next frame.

Implemented in mvl2_video_from_avi, mvl2_video_from_avi, and mvl2_video_from_sequence.

virtual void mvl2_video_reader::reset_frame  )  [pure virtual]
 

Reset frame counter to zero.

Implemented in mvl2_video_from_avi, mvl2_video_from_avi, and mvl2_video_from_sequence.

virtual int mvl2_video_reader::seek int   )  [inline, virtual]
 

Move frame counter on to given frame if relevant.

Reimplemented in mvl2_video_from_avi, and mvl2_video_from_sequence.

Definition at line 68 of file mvl2_video_reader.h.

virtual void mvl2_video_reader::set_brightness int   )  [inline, virtual]
 

Set the brightness of the picture.

Definition at line 83 of file mvl2_video_reader.h.

virtual void mvl2_video_reader::set_capture_size int  width,
int  height
[pure virtual]
 

Set the size of image captured.

Implemented in mvl2_video_from_avi, mvl2_video_from_avi, and mvl2_video_from_sequence.

virtual void mvl2_video_reader::set_colour int   )  [inline, virtual]
 

Set the colour of the picture.

Definition at line 89 of file mvl2_video_reader.h.

virtual void mvl2_video_reader::set_contrast int   )  [inline, virtual]
 

Set the contrast of the picture.

Definition at line 92 of file mvl2_video_reader.h.

virtual void mvl2_video_reader::set_frame_rate double  frame_rate  )  [pure virtual]
 

Set the frame rate in frames per second.

Implemented in mvl2_video_from_avi, mvl2_video_from_avi, and mvl2_video_from_sequence.

virtual void mvl2_video_reader::set_hue int   )  [inline, virtual]
 

Set the hue of the picture.

Definition at line 86 of file mvl2_video_reader.h.

virtual void mvl2_video_reader::set_whiteness int   )  [inline, virtual]
 

Set the whiteness of the picture.

Definition at line 95 of file mvl2_video_reader.h.

virtual void mvl2_video_reader::uninitialize  )  [inline, virtual]
 

Tidy up.

Reimplemented in mvl2_video_from_avi, mvl2_video_from_avi, and mvl2_video_from_sequence.

Definition at line 44 of file mvl2_video_reader.h.

bool mvl2_video_reader::use_config vcl_string  configname  ) 
 

Use the configuration given by the configuration's name.

Definition at line 100 of file mvl2_video_reader.cxx.


Member Data Documentation

vcl_vector<vcl_string> mvl2_video_reader::config_filenames_ [protected]
 

Definition at line 118 of file mvl2_video_reader.h.

vcl_vector<vcl_string> mvl2_video_reader::config_names_ [protected]
 

Definition at line 115 of file mvl2_video_reader.h.

vcl_vector<vcl_pair<int,int > > mvl2_video_reader::config_sizes_ [protected]
 

Definition at line 116 of file mvl2_video_reader.h.

vcl_vector<vcl_string> mvl2_video_reader::config_strings_ [protected]
 

Definition at line 117 of file mvl2_video_reader.h.

unsigned int mvl2_video_reader::current_frame_ [protected]
 

Definition at line 110 of file mvl2_video_reader.h.

bool mvl2_video_reader::firstcall_ [protected]
 

Definition at line 114 of file mvl2_video_reader.h.

double mvl2_video_reader::frame_rate_ [protected]
 

Definition at line 111 of file mvl2_video_reader.h.

int mvl2_video_reader::height_ [protected]
 

Definition at line 113 of file mvl2_video_reader.h.

bool mvl2_video_reader::is_initialized_ [protected]
 

Definition at line 109 of file mvl2_video_reader.h.

bool mvl2_video_reader::use_colour_ [protected]
 

Definition at line 108 of file mvl2_video_reader.h.

int mvl2_video_reader::width_ [protected]
 

Definition at line 112 of file mvl2_video_reader.h.


The documentation for this class was generated from the following files:
Generated on Thu Jan 10 14:44:31 2008 for contrib/mul/mvl2 by  doxygen 1.4.4