34 #define eps 0.001//epsilon definition, for integral evaluation.
41 #define ABS(x) (((x) > 0) ? (x) : (-(x)))
48 #define M_PI 3.14159265358979323846
79 double motion_model_parameter)
85 motion_model_parameter);
86 double current_Energy=optimal_Energy;
87 double velocity_max=motion_model_parameter;
89 if (flag_motion_model==0) velocity_max=4*motion_model_parameter;
94 for (
double T=(2/velocity_max)/100;
96 T=T+(2/velocity_max)/100)
100 motion_model_parameter);
101 if (current_Energy<optimal_Energy)
103 optimal_Energy=current_Energy;
130 double motion_model_parameter)
134 double velocity_max=motion_model_parameter;
135 if (flag_motion_model==0) velocity_max=4*motion_model_parameter;
143 double b=velocity_max;
155 double tn=h*(s1+4*s4)/3;
177 tn = h*(s1+2*s2+4*s4)/3;
212 double tn=h*(s1+4*s4)/3;
231 tn = h*(s1+2*s2+4*s4)/3;
256 double xivT_2=xi*velocity*T/2;
260 sinc=sin(xivT_2)/xivT_2;
264 return(1/(T*sinc*sinc));
291 int flag_motion_model)
294 if (flag_motion_model==0)
295 return(exp(-velocity*velocity/
296 (2*motion_model_parameter*motion_model_parameter)));
300 return(1/(2*motion_model_parameter));
double optimal_snapshot(int flag_motion_model, double motion_model_parameter)
Given a motion model compute the optimal exposure time for a snaphot. The minimization is done by sca...
double optimal_snapshot_energy(double T, int flag_motion_model, double motion_model_parameter)
Given a motion model computes the energy of Equation (20) for a given Tt.
double proba_motion_model(double velocity, double motion_model_parameter, int flag_motion_model)
Given a motion model compute the probability of the velocity velocity ((velocity)) ...
double optimal_snapshot_integrand(double velocity, double T)
Given a velocity v and T this function returns the integral in of equation (20), i...
double optimal_snapshot_integrand_part2(double xi, double velocity, double T)
This function implements a part of the integrand in (20).