The Flutter Shutter Code Optimizer
 All Files Functions Macros Pages
Macros | Functions
demo_fluttercode.cpp File Reference

Flutter shutter code optimizer main file, that implements algorithm 1. More...

#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <math.h>
#include <fstream>
#include "flutter_optimiser_gaussian.h"
#include "flutter_optimiser_uniform.h"
#include "gain_evaluation.h"
#include "optimal_snapshot.h"
Include dependency graph for demo_fluttercode.cpp:

Go to the source code of this file.

Macros

#define ABS(x)   (((x) > 0) ? (x) : (-(x)))
 
#define M_PI   3.14159265358979323846
 

Functions

int main (int argc, char **argv)
 main function call More...
 

Detailed Description

Flutter shutter code optimizer main file, that implements algorithm 1.

Author
Yohann Tendero tende.nosp@m.ro@m.nosp@m.ath.u.nosp@m.cla..nosp@m.edu

Definition in file demo_fluttercode.cpp.

Macro Definition Documentation

#define ABS (   x)    (((x) > 0) ? (x) : (-(x)))

absolute value definition.

Definition at line 45 of file demo_fluttercode.cpp.

#define M_PI   3.14159265358979323846

M_PI is a POSIX definition for Pi

Definition at line 53 of file demo_fluttercode.cpp.

Function Documentation

int main ( int  argc,
char **  argv 
)

main function call

INPUTs: Motion model : 0: centered Gaussian (0,s) => argv[1] 1: centered Uniform on [-s,s] the s parameter. N : length of the code Deltat : time steps Outputs txt file containing the a_k. EPS file containing the stairs a_k EPS file containing the FT of the flutter function EPS file containing the comparative average_gain_in_terms_of_RMSE of the code and the corresoinding snapshot for velocity_max.

: Overall description: Step 1 : read parameter; Step 2 : Given the motion model : compute optimal snapshot on average (the optimal exposure time to use in a standard camera to ensure the optimal MSE aking the deconvolution into account); Step 3 : Given the motion model : compute the optimal flutter shutter camera design (the optimal aperture strategy); Step 4-5 : store results.

0 For Gaussian, 1 for uniform, 2 for handcrafted

motion model is N(0,) =motion_model_parameter; if Gaussian and [-motion_model_parameter,motion_model_parameter] if uniform.

WRITE the code to file : code_file_name

WRITE the Fourier transfor of the code to file : TF_code_file_name : This one contains (columns by columns) for [-\2pi velocity_max, 2 pi ] The ideal Fourier Transform The Fourier transform of the code

Flutter shutter codes are defined up to a constant renormalization, the following renormalize so (0)=[4] (0)=1.

Definition at line 79 of file demo_fluttercode.cpp.

Here is the call graph for this function: