VidMag
Eulerian Video Magnification
Public Member Functions | List of all members
VideoManager Class Reference

#include <VideoManager.hpp>

Public Member Functions

 VideoManager ()
 
bool setInput (const std::string &fileName)
 
bool setOutput (const std::string &filename, int codec=0, double framerate=0.0, bool isColor=true)
 
void writeOutput ()
 
bool isOpened ()
 
bool isStopped ()
 
int getCodec (char codec[4])
 
cv::Size getFrameSize ()
 
double getFrameRate ()
 
bool getNextFrame (cv::Mat &frame)
 
bool jumpTo (long index)
 
double getCurrentFrame ()
 
double getNumberOfFrames ()
 
void motionMagnification ()
 
void colorMagnification ()
 
void setSpatialFilter (spatialFilterType type)
 
void setTemporalFilter (temporalFilterType type)
 
void setLevels (int lvls)
 
void setAlpha (float amplification)
 
void setLowCutoff (float low)
 
void setHighCutoff (float high)
 
void setFrequencyCutoffs (float low, float high)
 
void setMotionCutOffWavelength (float lambda)
 
void setExaggerationFactor (float factor)
 
void setChromAttenuation (float attenuation)
 
void setMask (float x1, float y1, float x2, float y2, bool masked)
 

Constructor & Destructor Documentation

VideoManager::VideoManager ( )
explicit

Member Function Documentation

void VideoManager::colorMagnification ( )

This method implements the color magnification on a newly created copy of the current video

int VideoManager::getCodec ( char  codec[4])

This method returns the codec of the currently open video

Parameters
codecarray for the codec
Returns
an integer identifying the codec
double VideoManager::getCurrentFrame ( )
double VideoManager::getFrameRate ( )

This method returns the framerate of the currently open video

Returns
framerate of the currently open video
cv::Size VideoManager::getFrameSize ( )

This method returns the size of a frame of the currently open video

Returns
framesize
bool VideoManager::getNextFrame ( cv::Mat &  frame)

This method returns the next frame of the current video if there are any

Returns
the next frame
double VideoManager::getNumberOfFrames ( )
bool VideoManager::isOpened ( )

This method returns whether a video has been openend

Returns
true if a video has been openend
bool VideoManager::isStopped ( )

This method returns whether the current video has been stopped

Returns
true if video has been stopped
bool VideoManager::jumpTo ( long  index)

This method jumps the current video to a given index

Parameters
indexthe index to be jumped to
Returns
true if the jump was successfull
void VideoManager::motionMagnification ( )

This method implements the motion magnification on a newly created copy of the current video

void VideoManager::setAlpha ( float  amplification)

This method sets the amplification for color magnification

Parameters
amplificationthe magnitude of the amplification
void VideoManager::setChromAttenuation ( float  attenuation)

This method sets the chromatic attenuation for motion magnification

Parameters
attenuationthe chromatic attentuation
void VideoManager::setExaggerationFactor ( float  factor)

This method sets the exaggeration factor for motion magnification

Parameters
factorthe exaggeration factor
void VideoManager::setFrequencyCutoffs ( float  low,
float  high 
)

This method sets the low and high cut-off frequencies for color magnification

Parameters
lowthe lower cut-off frequency, e.g. 0.8Hz (for 50 beats per minute)
highthe high cut-off frequency, e.g. 2.0Hz (for 120 beats per minute)
void VideoManager::setHighCutoff ( float  high)

This method sets the high cut-off frequency for color magnification

Parameters
highthe high cut-off frequency, e.g. 2.0Hz (for 120 beats per minute)
bool VideoManager::setInput ( const std::string &  fileName)

This method sets the filename and opens a new videofile, already open videos are closed

Parameters
fileNamethe filename of the video to be managed
Returns
true if new videofile could be opened
void VideoManager::setLevels ( int  lvls)
void VideoManager::setLowCutoff ( float  low)

This method sets the lower cut-off frequency for color magnification

Parameters
lowthe lower cut-off frequency, e.g. 0.8Hz (for 50 beats per minute)
void VideoManager::setMask ( float  x1,
float  y1,
float  x2,
float  y2,
bool  masked 
)
void VideoManager::setMotionCutOffWavelength ( float  lambda)

This method sets the cut-off frequencies for motion magnification

Parameters
lambdacut-off frequency
bool VideoManager::setOutput ( const std::string &  filename,
int  codec = 0,
double  framerate = 0.0,
bool  isColor = true 
)

This method sets the output variables for explicitly saving videofiles

Parameters
filenameoutputfilename
codeccodec to be used for saving, if 0 the inputcodec is used
framerateframerate the video should be saved, if 0.0f the inputframerate is used
isColorindicates whether the video should be saved as colorvideo
Returns
true if writer could be opened
void VideoManager::setSpatialFilter ( spatialFilterType  type)

This method sets the spatial filter for the magnifycation

Parameters
typethe type of the spatial filter
void VideoManager::setTemporalFilter ( temporalFilterType  type)

This method sets the temporal filter for the magnifycation

Parameters
typethe type of the temporal filter
void VideoManager::writeOutput ( )

This method saves a videofile with the parameters specified in VideoManager::setOutput


The documentation for this class was generated from the following files: