<commit_before>//////////////****  Eulerian Motion Magnification  ****////////////////
//
//	File Name:	 Eulerian_MotionMag.cpp
//	Author:		 <NAME>
//	Date:		 8 July 2015
//
//	Description: This is The C++ implementation of the following paper
//				 using the OpenCV library: "Eulerian Video Magnification
//				 for Revealing Subtle Changes in the World"
//
//////////////////////////////////////////////////////////////////////

/*************************  Includes  *******************************/
#include <stdio.h>
#include <conio.h>
#include <iostream>
#include <vector>
#include <math.h>
#include <list>
#include "cv.h"			// Computer Vision Lib Header
#include "highgui.h"	// HighGUI Vision Lib Header
/********************************************************************/

using namespace cv;
using namespace std;

// Change the file/path definitions to actual files/path names
#define INPUT_FILE	"Videos\\Video_Input.mp4"
#define OUTPUT_FILE	"Videos\\Video_Magnified.avi"
#define OUT_WINDOW	"Output Window"

/*************************  Variables  *******************************/
float fl = 0.05, fh = 0.4;
float lambda_c = 80;
float alpha = 50, chromAttenuation = 0.1;
float exaggeration_factor = 2.0;
float delta = 0;
float lambda = 0;
int levels = 5;

std::vector<cv::Mat> lowpass1;
std::vector<cv::Mat> lowpass2;
int curLevel = 0;
/********************************************************************/


void mouseEvent (int evt, int x, int y, int flags, void* param)
{                    
     if (evt == CV_EVENT_LBUTTONDOWN)
     { 
     }         
}


Mat LaplacianPyr(Mat img)
{
	Mat down, up, lap;
	pyrDown(img, down);
	pyrUp(down, up);
	lap = img - up;
	return lap;
}
	

bool buildLaplacianPyramid(const Mat &img, const int levels, vector<Mat> &pyramid)
{
    if (levels < 1)
	{
        perror("Levels should be larger than 1");
        return false;
    }
    pyramid.clear();
    Mat currentImg = img;
    for (int l=0; l<levels; l++)<commit_msg>Eulerian Motion Magnification CPP file<commit_after>//////////////****  Eulerian Motion Magnification  ****////////////////
//
//	File Name:	 Eulerian_MotionMag.cpp
//	Author:		 <NAME>
//	Date:		 8 July 2015
//
//	Description: This is The C++ implementation of the following paper
//				 using the OpenCV library: "Eulerian Video Magnification
//				 for Revealing Subtle Changes in the World"
//
//////////////////////////////////////////////////////////////////////

/*************************  Includes  *******************************/
#include <stdio.h>
#include <conio.h>
#include <iostream>
#include <vector>
#include <math.h>
#include <list>
#include "cv.h"			// Computer Vision Lib Header
#include "highgui.h"	// HighGUI Vision Lib Header
/********************************************************************/

using namespace cv;
using namespace std;

// Change the file/path definitions to actual files/path names
#define INPUT_FILE	"Videos\\Video_Input.mp4"
#define OUTPUT_FILE	"Videos\\Video_Magnified.avi"
#define OUT_WINDOW	"Output Window"

/*************************  Variables  *******************************/
float fl = 0.05, fh = 0.4;
float lambda_c = 80;
float alpha = 50, chromAttenuation = 0.1;
float exaggeration_factor = 2.0;
float delta = 0;
float lambda = 0;
int levels = 5;

std::vector<cv::Mat> lowpass1;
std::vector<cv::Mat> lowpass2;
int curLevel = 0;
/********************************************************************/


Mat LaplacianPyr(Mat img)
{
	Mat down, up, lap;
	pyrDown(img, down);
	pyrUp(down, up);
	lap = img - up;
	return lap;
}
	

bool buildLaplacianPyramid(const Mat &img, const int levels, vector<Mat> &pyramid)
{
    if (levels < 1)
	{
        perror("Levels should be larger than 1");
        return false;
    }
    pyramid.clear();
    Mat currentImg = img;
    for (int l=0; l<levels; l++)
{'fraction_non_alphanumeric': 0.2882244951481773, 'fraction_numerical': 0.014686598478888015, 'mean_word_length': 3.1187904967602593, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1319908', 'n_tokens_mistral': 1251, 'n_tokens_neox': 1135, 'n_words': 346}