Vista     Main Page   Class List   Function List   File List   Examples  


CMpeg2Reader Class Reference

The CMpeg2Reader class implements an Mpeg2 video stream reader. More...

Inheritance diagram for CMpeg2Reader:

CReader List of all members.

Public Methods

 CMpeg2Reader ()
 ~CMpeg2Reader ()
string getFileName ()
bool getFrame (CMotion2DImage< unsigned char > &I, unsigned nbsubsample, unsigned nrows=0, unsigned ncols=0)
bool getFrame (CMotion2DImage< short > &I, unsigned nbsubsample, unsigned nrows=0, unsigned ncols=0)
bool getFrame (unsigned char **rgbpixel, unsigned &nrows, unsigned &ncols)
bool closeStream ()
bool openStream ()
void getType ()
EReaderFormat getFormat ()
unsigned getNbSubsample ()

Detailed Description

The CMpeg2Reader class implements an Mpeg2 video stream reader.
Examples:

Motion2D.cpp, and Warping.cpp.


Constructor & Destructor Documentation

CMpeg2Reader::CMpeg2Reader  
 

Mpeg2 video stream reader constructor.

CMpeg2Reader::~CMpeg2Reader  
 

Mpeg2 video stream reader destructor.


Member Function Documentation

bool CMpeg2Reader::closeStream   [virtual]
 

Close an Mpeg2 stream.

Reimplemented from CReader.

string CMpeg2Reader::getFileName   [virtual]
 

Return the video stream filename.

See also:
setFileName(), setFrameNumber()

Reimplemented from CReader.

CReader::EReaderFormat CMpeg2Reader::getFormat   [virtual]
 

Return the images format.

Reimplemented from CReader.

bool CMpeg2Reader::getFrame unsigned char **    rgbpixel,
unsigned &    nrows,
unsigned &    ncols
 

Extract a color frame from a Mpeg2 video stream.

Parameters:
rgbpixel  The color image.
nrows  Image rows number.
ncols  Image columns number.
Returns:
true if the frame was extracted, false otherwise.

bool CMpeg2Reader::getFrame CMotion2DImage< short > &    I,
unsigned    nbsubsample,
unsigned    nrows = 0,
unsigned    ncols = 0
[virtual]
 

Extract a frame from a Mpeg2 video stream. If the video stream is concerned with color images, these are converted to grey level using the formula:

Depending on the nbsubsample parameter, the extracted frame can be subsampled.

Parameters:
I  The grey level image eventually subsampled.
nbsubsample  The number of subsampling to apply to the image. No subsampling is performed if this parameter is equal to zero.
nrows  Image rows number.
ncols  Image columns number.
Returns:
true if the frame was extracted, false otherwise.

Reimplemented from CReader.

bool CMpeg2Reader::getFrame CMotion2DImage< unsigned char > &    I,
unsigned    nbsubsample,
unsigned    nrows = 0,
unsigned    ncols = 0
[virtual]
 

Extract a frame from a Mpeg2 video stream. If the video stream is concerned with color images, these are converted to grey level using the formula:

Depending on the nbsubsample parameter, the extracted frame can be subsampled.

Parameters:
I  The grey level image eventually subsampled.
nbsubsample  The number of subsampling to apply to the image. No subsampling is performed if this parameter is equal to zero.
nrows  Image rows number.
ncols  Image columns number.
Returns:
true if the frame was extracted, false otherwise.

Reimplemented from CReader.

unsigned CMpeg2Reader::getNbSubsample   [virtual]
 

Returns:
The number of subsampling applied to the image. If no subsampling is performed, this parameter is equal to zero.

Reimplemented from CReader.

void CMpeg2Reader::getType   [inline, virtual]
 

Print the type of the reader.

Reimplemented from CReader.

bool CMpeg2Reader::openStream   [virtual]
 

Open an Mpeg2 stream.

Returns:
true if the MPEG2 stream was openned, false otherwise.

Reimplemented from CReader.


The documentation for this class was generated from the following files:
Motion2D is Copyright © 1995-2005 by Inria
This documentation was generated on 31 Jan 2005 by Fabien Spindler for Motion2D 1.3.11 using doxygen1.2.18 written by Dimitri van Heesch, © 1997-2005