The Flutter Shutter Code Optimizer
|
Go to the source code of this file.
Defines | |
#define | ABS(x) (((x) > 0) ? (x) : (-(x))) |
#define | M_PI 3.14159265358979323846 |
#define | SQRT_TWOPI 2.506628274631000 |
#define | N_RESOLUTION 1000; |
Functions | |
double | MSE_snapshot_of_velocity (double velocity, double tilde_deltat) |
This function computes the MSE of a snapshot for a given velocity. This is equation (20) up to a 1 factor. | |
double | MSE_snapshot_of_velocity_integrand (double velocity, double tilde_deltat, double xi) |
This function computes the integrand of equation (20). | |
double | MSE_flutter_of_velocity (double *code, int code_length, double velocity, double deltat) |
This function computes the MSE of flutter shutter for a given velocity. This is equation (21) up to a 1 factor. | |
double | MSE_flutter_of_velocity_integrand (double *code, int code_length, double velocity, double deltat, double xi) |
This function computes the integrand of equation (21). | |
double | abs_hat_alpha (double *code, int code_length, double xi, double deltat) |
Given a code compute the modulus of the Fourier transform of the Flutter-Shutter function, see equation (2). | |
double | gain_in_terms_of_RMSE_at_velocity_v (double *code, int code_length, double tilde_deltat, double velocity, double deltat) |
This function implements equation (22). | |
double | probability_density (double velocity, int flag_motion_model, double motion_model_parameter) |
Given a velocity velocity, the motion model and its parameters the function computes the probability. Used onfy for velocityisualization with the R(velocity) function, to display the probability density of the motion mode. | |
void | average_gain_in_terms_of_RMSE (double *code, int code_length, double tilde_deltat_star, int flag_motion_model, double motion_model_parameter, double deltat, int num_plot_points, double *gain_of_v_equation_22, double *average_gain_equation_23) |
This function implements equation (23) | |
void | std_dev_gain_in_terms_of_RMSE (int flag_motion_model, double motion_model_parameter, int num_plot_points, double *gain_of_v_equation_22, double *average_gain_equation_23, double *std_dev_gain_equation_24) |
This function implements equation (24). |
#define ABS | ( | x | ) | (((x) > 0) ? (x) : (-(x))) |
absolute velocityalue definition.
Definition at line 36 of file code_comparison.cpp.
#define M_PI 3.14159265358979323846 |
M_PI is a POSIX definition for Pi
Definition at line 45 of file code_comparison.cpp.
#define N_RESOLUTION 1000; |
RIEMANN SUM PRECISION
Definition at line 58 of file code_comparison.cpp.
#define SQRT_TWOPI 2.506628274631000 |
{2} definition.
Definition at line 52 of file code_comparison.cpp.
abs_hat_alpha | ( | double * | code, |
int | code_length, | ||
double | xi, | ||
double | deltat | ||
) |
Given a code compute the modulus of the Fourier transform of the Flutter-Shutter function, see equation (2).
double* | code : array of doubles where code[k] contains the ; |
int | code_length : length of the code; |
double | xi : frequency; |
double | deltat : the temporal sampling of the flutter shutter function; |
Gives back the modulus of the Fourier transform, see equation (2)
Definition at line 225 of file code_comparison.cpp.
average_gain_in_terms_of_RMSE | ( | double * | code, |
int | code_length, | ||
double | tilde_deltat_star, | ||
int | flag_motion_model, | ||
double | motion_model_parameter, | ||
double | deltat, | ||
int | num_plot_points, | ||
double * | gain_of_v_equation_22, | ||
double * | average_gain_equation_23 | ||
) |
This function implements equation (23)
double* | code : array of doubles where code[k] contains the |
int | code_length : length of the code L; |
double | tilde_deltat_star : the optimal exposure time for the snapshot |
int | flag_motion_model : motion model selection -0 for truncated Gaussian of std-develocity s; -1 For uniform of range s; |
double | motion_model_parameter : motion model parameter; |
double | deltat : the temporal sampling of the flutter shutter function; |
int | num_plot_point : the lengt of output array for plot; |
double | *gain_of_v_equation_22 : will contain G(v), see equation (22); |
double | *_average_gain_equation_23 : will contain equation (23); |
double* | code : array of doubles where code[k] contains the |
int | code_length : length of the code L; |
double | tilde_deltat_star : the optimal exposure time for the snapshot |
int | flag_motion_model : motion model selection -0 for truncated Gaussian of std-develocity s; -1 For uniform of range s; |
double | motion_model_parameter : motion model parameter; |
double | deltat : the of the numerical flutter shutter; |
int | num_plot_point : the lengt of output array for plot; |
double | *gain_of_v_equation_22 : will contain G(v), see equation (22); |
double | *_average_gain_equation_23 : will contain equation (23); |
Initialization.
Computation of equation (23).
Definition at line 340 of file code_comparison.cpp.
gain_in_terms_of_RMSE_at_velocity_v | ( | double * | code, |
int | code_length, | ||
double | tilde_deltat, | ||
double | velocity, | ||
double | deltat | ||
) |
This function implements equation (22).
double* | code : array of doubles where code[k] contains the |
int | code_length : length of the code L; |
double | tilde_deltat : the of the snapshot (best snapshot on average); |
double | velocity : velocity; |
double | deltat : the temporal sampling of the flutter shutter function; |
Definition at line 270 of file code_comparison.cpp.
double MSE_flutter_of_velocity | ( | double * | code, |
int | code_length, | ||
double | velocity, | ||
double | deltat | ||
) |
This function computes the MSE of flutter shutter for a given velocity. This is equation (21) up to a 1 factor.
double MSE_flutter_of_velocity(double* code, int code_length,double velocity, double tilde_deltat)
double* | code : array of doubles where code[k] contains the |
int | code_length : length of the code L; |
double | velocity : the velocity; |
double | deltat : the temporal sampling of the flutter shutter function; |
Initalization.
Definition at line 153 of file code_comparison.cpp.
double MSE_flutter_of_velocity_integrand | ( | double * | code, |
int | code_length, | ||
double | velocity, | ||
double | deltat, | ||
double | xi | ||
) |
This function computes the integrand of equation (21).
double MSE_flutter_of_velocity_integrand(double* code, int code_length, double velocity, double tilde_deltat, double xi)
double* | code : array of doubles where code[k] contains the |
int | code_length : length of the code L; |
double | velocity : the velocity; |
double | deltat : the temporal sampling of the flutter shutter function; |
doule | xi: the frequency; |
Step1 compute | ( v)|
Step2 : compute ||||_{l2}^2
Definition at line 194 of file code_comparison.cpp.
double MSE_snapshot_of_velocity | ( | double | velocity, |
double | tilde_deltat | ||
) |
This function computes the MSE of a snapshot for a given velocity. This is equation (20) up to a 1 factor.
double MSE_snapshot_of_velocity(double velocity,double tilde_deltat)
double | velocity : the velocity; |
double | tilde_deltat: the exposure time of the snapshot; |
Initalization.
Definition at line 79 of file code_comparison.cpp.
double MSE_snapshot_of_velocity_integrand | ( | double | velocity, |
double | tilde_deltat, | ||
double | xi | ||
) |
This function computes the integrand of equation (20).
double MSE_snapshot_of_velocity_integrand(double velocity, double tilde_deltat, double xi)
double | velocity : the velocity; |
double | tilde_deltat: the exposure time of the snapshot; |
doule | xi: the frequency; |
Definition at line 117 of file code_comparison.cpp.
double probability_density | ( | double | velocity, |
int | flag_motion_model, | ||
double | motion_model_parameter | ||
) |
Given a velocity velocity, the motion model and its parameters the function computes the probability. Used onfy for velocityisualization with the R(velocity) function, to display the probability density of the motion mode.
double probability_density(double velocity, int flag_motion_model, double motion_model_parameter)
double | velocity : the velocity; |
int | flag_motion_model : motion model selection -0 for Gaussian motion model -1 For uniform motion model |
double | motion_model_parameter : motion model parameter; |
Definition at line 297 of file code_comparison.cpp.
std_dev_gain_in_terms_of_RMSE | ( | int | flag_motion_model, |
double | motion_model_parameter, | ||
int | num_plot_points, | ||
double * | gain_of_v_equation_22, | ||
double * | average_gain_equation_23, | ||
double * | std_dev_gain_equation_24 | ||
) |
This function implements equation (24).
double* | code : array of doubles where code[k] contains the |
int | code_length : length of the code L; |
double | tilde_deltat_star : the optimal exposure time for the snapshot |
int | flag_motion_model : motion model selection -0 for truncated Gaussian of std-develocity s; -1 For uniform of range s; |
double | motion_model_parameter : motion model parameter; |
double | deltat : the of the numerical flutter shutter; |
int | num_plot_point : the lengt of output array for plot; |
double | *gain_of_v_equation_22 : contains G(v), see equation (22); |
double | *_average_gain_equation_23 : contains equation (23); |
double | *std_dev_gain_equation_24 : will contains equation (24). |
Initialization.
Computation of equation (24), knowing equations (22) and (23)
Definition at line 431 of file code_comparison.cpp.