This files constains the code that implements equations (21), (22), (23), (24) and (25) that are used to compute the gain of the flutter shutter method with respect to the optimal snapshot, in terms of RMSE. More...
Go to the source code of this file.
Macros | |
#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 (21) up to a 1 factor: {0}^{} {|u|_{L^1()}} {T {sinc}^2( { v T}{2 })}d. More... | |
double | MSE_snapshot_of_velocity_integrand (double velocity, double tilde_deltat, double xi) |
This function computes the integrand of equation (21): {1}{T {sinc}^2( { v T}{2 })}. More... | |
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 (22) up to a 1 factor: {0}^{} {| |^2_{L^2()} |u|_{L^1()}}{| ( v)|^2}d. More... | |
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): {| |^2_{L^2()} |u|_{L^1()}}{| ( v)|^2}d. More... | |
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): ()= t {sinc}({ t}{2}) e^{-{i t}{2}} {k=0}^{L-1} e^{-ik t}. More... | |
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 (23): G(v)&={ {{0}^{} {1} {T^* {sinc}^2( { v T^*}{2 })}d} { {0}^{} {| |^2_{L^2()}} {| ( v)|^2}d }}. More... | |
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. More... | |
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 *G_of_v, double *average_gain_mu) |
This function implements equation (24): := G(v) (v) dv. More... | |
void | std_dev_gain_in_terms_of_RMSE (int flag_motion_model, double motion_model_parameter, int num_plot_points, double *G_of_v, double *average_gain_mu, double *std_dev_gain_sigma) |
This function implements equation (25): :={ |G(v)- G(u) (u) du|^2 (v) dv}. More... | |
This files constains the code that implements equations (21), (22), (23), (24) and (25) that are used to compute the gain of the flutter shutter method with respect to the optimal snapshot, in terms of RMSE.
Definition in file gain_evaluation.cpp.
#define ABS | ( | x | ) | (((x) > 0) ? (x) : (-(x))) |
absolute value definition.
Definition at line 35 of file gain_evaluation.cpp.
#define M_PI 3.14159265358979323846 |
M_PI is a POSIX definition for Pi
Definition at line 44 of file gain_evaluation.cpp.
#define N_RESOLUTION 1000; |
RIEMANN SUM PRECISION
Definition at line 57 of file gain_evaluation.cpp.
#define SQRT_TWOPI 2.506628274631000 |
{2} definition.
Definition at line 51 of file gain_evaluation.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): ()= t {sinc}({ t}{2}) e^{-{i t}{2}} {k=0}^{L-1} e^{-ik t}.
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 234 of file gain_evaluation.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 * | G_of_v, | ||
double * | average_gain_mu | ||
) |
This function implements equation (24): := G(v) (v) dv.
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-dev 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 | *G_of_v : will contain G(v), see equation (23); |
double | *_average_gain_mu : will contain equation (24); |
Initialization.
Computation of equation (24).
Definition at line 353 of file gain_evaluation.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 (23): G(v)&={ {{0}^{} {1} {T^* {sinc}^2( { v T^*}{2 })}d} { {0}^{} {| |^2_{L^2()}} {| ( v)|^2}d }}.
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 284 of file gain_evaluation.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 (22) up to a 1 factor: {0}^{} {| |^2_{L^2()} |u|_{L^1()}}{| ( v)|^2}d.
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 158 of file gain_evaluation.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): {| |^2_{L^2()} |u|_{L^1()}}{| ( v)|^2}d.
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 200 of file gain_evaluation.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 (21) up to a 1 factor: {0}^{} {|u|_{L^1()}} {T {sinc}^2( { v T}{2 })}d.
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 80 of file gain_evaluation.cpp.
double MSE_snapshot_of_velocity_integrand | ( | double | velocity, |
double | tilde_deltat, | ||
double | xi | ||
) |
This function computes the integrand of equation (21): {1}{T {sinc}^2( { v T}{2 })}.
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 119 of file gain_evaluation.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.
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 310 of file gain_evaluation.cpp.
std_dev_gain_in_terms_of_RMSE | ( | int | flag_motion_model, |
double | motion_model_parameter, | ||
int | num_plot_points, | ||
double * | G_of_v, | ||
double * | average_gain_mu, | ||
double * | std_dev_gain_sigma | ||
) |
This function implements equation (25): :={ |G(v)- G(u) (u) du|^2 (v) dv}.
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-dev 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 | *G_of_v : contains G(v), see equation (23); |
double | *_average_gain_mu : contains equation (24); |
double | *std_dev_gain_sigma : will contains equation (25). |
Initialization.
Computation of equation (25), knowing equations (23) and (24)
Definition at line 446 of file gain_evaluation.cpp.