I am trying to find the image which has the optimum focus of a focus stack (10 images). I am able to find the best two images by using the minimum gray intensity values but now the problematic part comes.
All standard methods fail because I have a very strong background with sharp edges which are laying under my object, the green cell.
Best image for human eye:
Best image choose by CV methods:
I tried already many things like FFT, filters, edge detection but most of the time it fails...
Any hints would be very much appreciated.