9 #include <opencv2/core/core.hpp>
10 #include <opencv2/highgui/highgui.hpp>
11 #include <opencv2/imgproc/imgproc.hpp>
12 #include <opencv2/video/video.hpp>
13 #include <opencv2/video/background_segm.hpp>
14 #include "VolumeData.h"
42 virtual void process(cv:: Mat &input, cv:: Mat &output)= 0;
76 cv::VideoCapture capture;
77 bool toggleSaliencyDetect;
80 void (*process)(cv::Mat&, cv::Mat&);
88 std::string windowNameInput;
90 std::string windowNameOutput;
101 std::vector<std::string> images;
103 std::vector<std::string>::const_iterator itImg;
106 cv::VideoWriter writer;
108 std::string outputFile;
115 std::string extension;
117 bool readNextFrame(cv::Mat& frame);
118 void writeNextFrame(cv::Mat& frame);
133 fnumber(0), stop(false), digits(0), frameToStop(-1),
134 process(0), frameProcessor(0) {}
146 bool setInput(std::string filename,
bool performSaliencyDetect,
int skippedFrames,
int startFr,
int maxFr);
157 bool setInput(
int id,
bool performSaliencyDetect,
int skippedFrames,
int startFr,
int maxFr);
167 bool setInput(
const std::vector<std::string>& imgs,
bool performSaliencyDetect,
int skippedFrames,
int startFr,
int maxFr);
168 bool setOutput(
const std::string &filename,
int codec=0,
double framerate=0.0,
bool isColor=
true);
169 bool setOutput(
const std::string &filename,
const std::string &ext,
int numberOfDigits=3,
int startIndex=0);
170 void setFrameProcessor(
void (*frameProcessingCallback)(cv::Mat&, cv::Mat&));
172 void stopAtFrameNo(
long frame);
174 void dontCallProcess();
175 void displayInput(std::string wn);
176 void displayOutput(std::string wn);
178 void setDelay(
int d);
179 long getNumberOfProcessedFrames();
180 cv::Size getFrameSize();
181 long getFrameNumber();
182 double getPositionMS();
183 double getFrameRate();
184 long getTotalFrameCount();
185 int getCodec(
char codec[4]);
186 bool setFrameNumber(
long pos);
187 bool setPositionMS(
double pos);
188 bool setRelativePosition(
double pos);