Commit 404d66d4 authored by Alexey Spizhevoy's avatar Alexey Spizhevoy

Added missed file

parent f6e2ad61
#include "precomp.hpp"
#include "opencv2/videostab/frame_source.hpp"
using namespace std;
namespace cv
{
namespace videostab
{
VideoFileSource::VideoFileSource(const string &path, bool volatileFrame)
: path_(path), volatileFrame_(volatileFrame) { reset(); }
void VideoFileSource::reset()
{
reader_.release();
reader_.open(path_);
if (!reader_.isOpened())
throw runtime_error("can't open file: " + path_);
}
Mat VideoFileSource::nextFrame()
{
Mat frame;
reader_ >> frame;
return volatileFrame_ ? frame : frame.clone();
}
} // namespace videostab
} // namespace cv
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment