Similar Items: The development of a predictive autofocus algorithm using a general image formation model