This isn’t exactly my area of expertise, but I have some information that might be helpful. Here’s the description of the frame selection from a paper on a lucky imaging system:
The frame selection algorithm, implemented (currently) as a post-processing step, is summarised below:
- A Point Spread Function (PSF) guide star is selected as a reference to the turbulence induced blurring of each frame.
- The guide star image in each frame is sinc-resampled by a factor of 4 to give a sub-pixel estimate of the position of the brightest speckle.
- A quality factor (currently the fraction of light concentrated in the brightest pixel of the PSF) is calculated for each frame.
- A fraction of the frames are then selected according to their quality factors. The fraction is chosen to optimise the trade- off between the resolution and the target signal-to-noise ra- tio required.
- The selected frames are shifted-and-added to align their brightest speckle positions.
If you want all the gory details, the best place to look is probably the thesis the same author wrote on this work. That’s available here PDF warning.