24 #include <opencv2/core/core.hpp> 25 #include <opencv2/imgproc/imgproc.hpp> 26 #include <opencv2/highgui/highgui.hpp> 46 bool setInput(
const std::string &fileName);
49 bool setOutput(
const std::string &filename,
int codec = 0,
double framerate = 0.0,
bool isColor =
true);
80 void setMask(
float x1,
float y1,
float x2,
float y2,
bool masked);
86 cv::VideoWriter writer;
87 cv::VideoWriter tempWriter;
102 void writeNextFrame(cv::Mat& frame);
106 bool createTemp(
double framerate = 0.0,
bool isColor =
true);
108 std::string tempFile;
109 std::vector<std::string> tempFileList;
110 std::string outputFile;
111 std::string extension;
115 bool buildGaussianPyramid(
const cv::Mat &img,
const int levels, std::vector<cv::Mat> &pyramid);
116 bool buildLaplacianPyramid(
const cv::Mat &img,
const int levels, std::vector<cv::Mat> &pyramid);
117 void reconImgFromLaplacianPyramid(
const std::vector<cv::Mat> &pyramid,
const int levels, cv::Mat &dst);
118 void VideoManager::attenuate(cv::Mat &src, cv::Mat &dst);
119 void upsamplingFromGaussianPyramid(
const cv::Mat &src,
const int levels, cv::Mat &dst);
120 bool spatialFilter(
const cv::Mat &src, std::vector<cv::Mat> &pyramid);
121 void temporalFilter(
const cv::Mat &src, cv::Mat &dst);
126 void temporalIIRFilter(
const cv::Mat &src, cv::Mat &dst);
127 void temporalIdealFilter(
const cv::Mat &src, cv::Mat &dst);
128 void createIdealBandpassFilter(cv::Mat &filter,
double fl,
double fh,
double rate);
130 std::vector<cv::Mat> lowpass1;
131 std::vector<cv::Mat> lowpass2;
133 void amplify(
const cv::Mat &src, cv::Mat &dst);
143 float exaggeration_factor;
144 float chromAttenuation;
146 void concat(
const std::vector<cv::Mat> &frames, cv::Mat &dst);
147 void deConcat(
const cv::Mat &src,
const cv::Size &frameSize, std::vector<cv::Mat> &frames);
void setLowCutoff(float low)
Definition: VideoManager.cpp:882
void motionMagnification()
Definition: VideoManager.cpp:211
double getNumberOfFrames()
Definition: VideoManager.cpp:49
void setTemporalFilter(temporalFilterType type)
Definition: VideoManager.cpp:506
void setMask(float x1, float y1, float x2, float y2, bool masked)
Definition: VideoManager.cpp:54
bool setOutput(const std::string &filename, int codec=0, double framerate=0.0, bool isColor=true)
Definition: VideoManager.cpp:114
Definition: VideoManager.hpp:36
Definition: VideoManager.hpp:30
void setFrequencyCutoffs(float low, float high)
Definition: VideoManager.cpp:901
double getFrameRate()
Definition: VideoManager.cpp:787
bool isStopped()
Definition: VideoManager.cpp:758
temporalFilterType
Definition: VideoManager.hpp:34
void setLevels(int lvls)
Definition: VideoManager.cpp:860
void setAlpha(float amplification)
Definition: VideoManager.cpp:873
bool setInput(const std::string &fileName)
Definition: VideoManager.cpp:82
bool isOpened()
Definition: VideoManager.cpp:749
double getCurrentFrame()
Definition: VideoManager.cpp:44
VideoManager()
Definition: VideoManager.cpp:19
void setChromAttenuation(float attenuation)
Definition: VideoManager.cpp:940
Definition: VideoManager.hpp:31
void setHighCutoff(float high)
Definition: VideoManager.cpp:891
cv::Size getFrameSize()
Definition: VideoManager.cpp:814
Definition: VideoManager.hpp:41
void setSpatialFilter(spatialFilterType type)
Definition: VideoManager.cpp:497
void setExaggerationFactor(float factor)
Definition: VideoManager.cpp:931
void setMotionCutOffWavelength(float lambda)
Definition: VideoManager.cpp:921
Definition: VideoManager.hpp:35
void colorMagnification()
Definition: VideoManager.cpp:334
bool getNextFrame(cv::Mat &frame)
Definition: VideoManager.cpp:797
int getCodec(char codec[4])
Definition: VideoManager.cpp:769
spatialFilterType
Definition: VideoManager.hpp:29
void writeOutput()
Definition: VideoManager.cpp:133
bool jumpTo(long index)
Definition: VideoManager.cpp:835