view include/InputVideoFileModule.h @ 401:b829ebdc18e6

simplified input of directories of video frames (simply use the video filename parameter to point at the directory)
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Mon, 29 Jul 2013 18:58:05 -0400
parents 7ef1071e3cc3
children 3c271a46b4d4
line wrap: on
line source

#ifndef INPUT_VIDEO_FILE_MODULE_H
#define INPUT_VIDEO_FILE_MODULE_H

#include "InputFrameProviderIface.h"
#include <string>
#include "opencv2/core/core.hpp"
#include "opencv2/highgui/highgui.hpp"

class InputVideoFileModule : public InputFrameProviderIface
{
public:
  InputVideoFileModule(const std::string& videoPath);
  ~InputVideoFileModule();

  bool getNextFrame(cv::Mat&);

  unsigned int getNbFrames(){		return mNumberOfFrame;}

  bool isOpen() const { return mInit;}

  void setFrameNumber(const unsigned int& frameNumber);

  const cv::Size& getSize() const { return mSize;}
	
private:
  cv::Size mSize;
  cv::VideoCapture mVideoCapture;
  bool mInit;
  int mNumberOfFrame;
};

#endif