Correction of electron microscope imaging parameters is a problem that can be solved using automated procedures. However, due to their lack of reliability, corrections are still often performed manually. The purpose of this work is to implement selected methods for the correction of imaging aberrations in a scanning electron microscope. These methods are tested using virtual motion in pre-scanned datasets that contain different quality images of the same object. The tested method receives at the input any image from the data set, and its goal is to find the optimal image in this set in the shortest possible time. Part of the work is also the evaluation of accuracy and speed of the methods, evaluation of their advantages and disadvantages. I will also compare the conventional approach with methods using machine learning techniques.