This study introduces a passive autofocus method based on image analysis calculating the Bayes spectral entropy (BSE). The method is applied to optical microscopy and together with the specific construction of the opto-mechanical unit, it allows the analysis of large samples with complicated surfaces without subsampling. This paper will provide a short overview of the relevant theory of calculating the normalized discrete cosine transform when analyzing obtained images, in order to find the BSE measure. Furthermore, it will be shown that the BSE measure is a strong indicator, helping to determine the focal position of the optical microscope. To demonstrate the strength and robustness of the microscope system, tests have been performed using a 1951 USAF test pattern resolution chart determining the in focus position of the microscope. Finally, this method and the optical microscope system is applied to analyze an optical grating (100 lines/mm) demonstrating the detection of the focal position. The paper concludes with an outlook of potential applications of the presented system within quality control and surface analysis.