Computing an All-In-Focus Image from a Focal Stack
This example shows how we can compute an all-in-focus image from a focal stack. We propose to compute a weighted average of the images in the focal stack where the weights are chosen to mimic changing the distance between the lens and the detector at a constant speed. The average image should have approximately depth-independent defocus blur, and so deconvolution with a single blur kernel should give an all-in-focus image.
One of 28 Image of a Focal Stack (Focused on Ball 5)
One of 28 Image of a Focal Stack (Focused on Ball 7)
One of 28 Image of a Focal Stack (Focused on the Potted Plants in the Back)