opentl::output::VideoWriter::VideoWriter | ( | ) |
opentl::output::VideoWriter::~VideoWriter | ( | void | ) | [inline] |
static const char* opentl::output::VideoWriter::codecFileExtension | ( | int | codecID | ) | [inline, static] |
static const char* opentl::output::VideoWriter::codecName | ( | int | codecID | ) | [inline, static] |
bool opentl::output::VideoWriter::init | ( | const std::string & | filename, | |
int | width, | |||
int | height, | |||
double | fps, | |||
Codec | codec, | |||
ColorMode | colorMode = VideoWriter::COLOR | |||
) |
Initializes the video writer. Calling second time closes the existing video file and starts writing to another file
filename | Name of the file in which to write video | |
width | Width in pixels of the output video | |
height | Height in pixels of the output video | |
fps | Framerate (frames per second) in the output video | |
codec | Which codec to use. See opentl::output::Videowriter::Codec for supported codecs | |
colorMode | Which color mode to use. See opentl::output::VideoWriter::ColorMode for available color modes |
void opentl::output::VideoWriter::release | ( | ) |
Finishes writing to video file and cleans up. This method is called when a VideoWriter object is deleted.
void opentl::output::VideoWriter::writeFrame | ( | const opentl::core::cvdata::Image & | img | ) |
Writes an image as the next frame into the video file. init
method must be called before starting writing frames. Image is automatically rescaled and converted to needed pixel format
img | Image to write as frame |