The Flutter Shutter Code Optimizer
|
Go to the source code of this file.
Functions | |
double | best_snapshot_average (int flag_motion_model, double s, double proba_handcrafted_0) |
double | best_snapshot_average_energy (double deltat, int flag_motion_model, double s, double proba_handcrafted_0) |
Given a motion model compute the energy (noiseness on average of the restored taking the deconvolution into account). This fucntion computes : E()= E_v() (v) dv = {-}^{}{^2}{sin^2({ v }{2})} {v^2 }{4}(v) d dv. In other words using a snapshot with exposure time deltat and assuming a motion model will multiply the noise by a best_snapshot_average_energy(deltat, flag_motion_model, s) factor (on average on v). | |
double | best_snapshot_average_integrand (double v, double deltat) |
Given a motion model compute the energy (noiseness of the restored after deconvolution) In other words using a snapshot with exposure time deltat at velocity v will multiply the noise by a best_snapshot_average_integrand( v, deltat) factor on average (on ). This is the energy E_v()= {-}^{){4 ^2v^2}{sin^2({}{2})}d. | |
double | best_snapshot_integrand (double xi, double v, double deltat) |
Given a frequency, a velocity, an exposure time compute the noise multiplication factor In orther words using snaphot with exposure time of deltat at velocity v will multiply the noise of the frequency xi b y best_snapshot_integrand( xi, v, deltat):= {4 ^2 v^2 }{sin^2({ v }{2})}. | |
double | proba_motion_model (double v, double s, double proba_handcrafted_0, int flag_motion_model) |
Given a motion model compute the probability of the velocity v ((v)) |
double best_snapshot_average | ( | int | flag_motion_model, |
double | s, | ||
double | proba_handcrafted_0 | ||
) |
This function minimize by scanning on values.
Truncated gaussian at 4*sigma.
Definition at line 84 of file best_snapshot_average.cpp.
double best_snapshot_average_energy | ( | double | deltat, |
int | flag_motion_model, | ||
double | s, | ||
double | proba_handcrafted_0 | ||
) |
Given a motion model compute the energy (noiseness on average of the restored taking the deconvolution into account). This fucntion computes : E()= E_v() (v) dv = {-}^{}{^2}{sin^2({ v }{2})} {v^2 }{4}(v) d dv. In other words using a snapshot with exposure time deltat and assuming a motion model will multiply the noise by a best_snapshot_average_energy(deltat, flag_motion_model, s) factor (on average on v).
double | deltat : exposure time |
int | flag_motion_model : motion model selection -0 for truncated Gaussian of std-dev s; -1 For uniform of range s; -2 For replace distribution (s the probability of v=0). |
double | s : motion model parameter |
double | proba_handcrafted_0 probability of v==0 hancrafted motion model only |
Computes E() depending on (the motion model)
Initalization.
Main loop for evaluation of
When (v) is the handcrafted, compute the tegral as a mere sum (few non zero in the integral) (v)=proba_handcrafted_0*(v)+(1-proba_handcrafted_0)* (v) is the handcrafted, better to compute the integral as a mere sum.
Definition at line 143 of file best_snapshot_average.cpp.
double best_snapshot_average_integrand | ( | double | v, |
double | deltat | ||
) |
Given a motion model compute the energy (noiseness of the restored after deconvolution) In other words using a snapshot with exposure time deltat at velocity v will multiply the noise by a best_snapshot_average_integrand( v, deltat) factor on average (on ). This is the energy E_v()= {-}^{){4 ^2v^2}{sin^2({}{2})}d.
double | deltat : exposure time |
double | v : velocity. |
Compute E_v()= {-}^{) {4 ^2v^2}{sin^2({}{2})}d Avoiding the computation on [-, 0] because the integrand is even.
Main loop for evaluation of
Definition at line 226 of file best_snapshot_average.cpp.
double best_snapshot_integrand | ( | double | xi, |
double | v, | ||
double | deltat | ||
) |
Given a frequency, a velocity, an exposure time compute the noise multiplication factor In orther words using snaphot with exposure time of deltat at velocity v will multiply the noise of the frequency xi b y best_snapshot_integrand( xi, v, deltat):= {4 ^2 v^2 }{sin^2({ v }{2})}.
double | xi : frequency |
double | v : velocity |
double | deltat : exposure time |
Definition at line 283 of file best_snapshot_average.cpp.
double proba_motion_model | ( | double | v, |
double | s, | ||
double | proba_handcrafted_0, | ||
int | flag_motion_model | ||
) |
Given a motion model compute the probability of the velocity v ((v))
double | v : velocity |
int | flag_motion_model : motion model selection -0 for truncated Gaussian of std-dev s; -1 For uniform of range s; -2 For handcrafted distribution (s the probability of v=0). |
double | s : motion model parameter |
double | proba_handcrafted_0 probability of v==0 hancrafted motion model only |
Normalization is unnecessary; it'll lead to a constant multiplication
Only called with 0,1 or 2 if this line is reached the handscrafted distribution is selected.
Definition at line 324 of file best_snapshot_average.cpp.