This can be used not only to find the best focus, but also sharpest aperture of a lens, sharpest scaling algorithm etc.
Find an image with lots of fine detail - grass, sand, tree bark and the like. Scan a good size patch of it multiple times while changing the height, export to a compressed image format and sort the images by size. Biggest one wins.
Why does this work? Fine detail is a high frequency signal in the spatial domain. High frequencies are harder to compress, hence the sharpest version of an image will have the largest file size.
Make sure that the patch you are scanning is not too small, otherwise the small movements of the film between scans due to your moving the film holder around won't change the content of each file too much and you can be sure that most of the differences are due to changes in sharpness, not because a bit of flat sky is drifting in and out of view.
Find an image with lots of fine detail - grass, sand, tree bark and the like. Scan a good size patch of it multiple times while changing the height, export to a compressed image format and sort the images by size. Biggest one wins.
Why does this work? Fine detail is a high frequency signal in the spatial domain. High frequencies are harder to compress, hence the sharpest version of an image will have the largest file size.
Make sure that the patch you are scanning is not too small, otherwise the small movements of the film between scans due to your moving the film holder around won't change the content of each file too much and you can be sure that most of the differences are due to changes in sharpness, not because a bit of flat sky is drifting in and out of view.