Class PGMVideo loads and saves video files in the format consisting of a PGM header following by headerless images.
More...
#include <pgmvideo.h>
Public Member Functions |
| | PGMVideo (int width=0, int height=0, int frames=0) |
| | Creates an empty video.
|
| | ~PGMVideo () |
| | Cleans up the data.
|
| bool | load (const std::string &file_name) |
| | Loads a video file by discarding the current data.
|
| bool | save (const std::string &file_name) const |
| | Saves the current video to a file.
|
| bool | get_image (RawImage &image, int frame) |
| | Returns an image.
|
| int | get_frame_number () const |
| | Returns the number of frames.
|
Detailed Description
Class PGMVideo loads and saves video files in the format consisting of a PGM header following by headerless images.
Constructor & Destructor Documentation
| crp::PGMVideo::PGMVideo |
( |
int |
width = 0, |
|
|
int |
height = 0, |
|
|
int |
frames = 0 |
|
) |
| |
Creates an empty video.
- Parameters:
-
| width | Width of each image |
| height | Height of each image |
| frames | Number of images |
| crp::PGMVideo::~PGMVideo |
( |
| ) |
|
Member Function Documentation
| int crp::PGMVideo::get_frame_number |
( |
| ) |
const [inline] |
Returns the number of frames.
- Returns:
- Number of frames
| bool crp::PGMVideo::get_image |
( |
RawImage & |
image, |
|
|
int |
frame |
|
) |
| |
Returns an image.
- Parameters:
-
| image | Image to fill the data |
| frame | Frame number |
- Returns:
- True if operation was successful
| bool crp::PGMVideo::load |
( |
const std::string & |
file_name | ) |
|
Loads a video file by discarding the current data.
- Parameters:
-
| file_name | Name of the file to load |
- Returns:
- True if the operation was successful
| bool crp::PGMVideo::save |
( |
const std::string & |
file_name | ) |
const |
Saves the current video to a file.
- Parameters:
-
| file_name | Name of the file to save |
- Returns:
- True if the operation was successful
The documentation for this class was generated from the following file: