view include/InputFrameListModule.h @ 400:7ef1071e3cc3

clean up of input classes for list of images and video files
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Mon, 29 Jul 2013 18:06:55 -0400
parents c389fae9689a
children b829ebdc18e6
line wrap: on
line source

#ifndef INPUT_FRAME_LIST_MODULE_H
#define INPUT_FRAME_LIST_MODULE_H

#include "InputFrameProviderIface.h"
#include <string>
#include <vector>

class InputFrameListModule : public InputFrameProviderIface
{
 public:
  InputFrameListModule(const std::string& basePath,const std::string& pictureList);
  ~InputFrameListModule();



  bool getNextFrame(cv::Mat&);
  unsigned int getNbFrames();
  bool isOpen() const { return mInit;}
  void setFrameNumber(const int& frameNumber) {} // does nothing for now

  virtual const cv::Size& getSize() const { return mSize;}
 private:
  void loadFileList(const std::string& path);
  std::vector<std::string> mFileList;
  unsigned int mCurrentIdx;
  bool mInit;
  std::string mBasePath;
  cv::Mat mCurrentFrame;
  cv::Size mSize;

};

#endif