Ferrography is a technology that can be applied in inspecting features of wear particles in machines and inferring their health status. With the development of online ferrography, which employs image processing to captured wear particle images, the inspection process has become automatic. However, it is found that images captured often contain out-of-focus degradations and low brightness. A restoration framework is here proposed to mitigate this problem. The main idea is to extract object edges, magnify with a non-linear gain factor, then combine with the input image to produce an enhanced image to facilitate further analysis. Parameters adopted in the process are optimized using a metaheuristic search where the image information content and brightness are maximized. Experimental results, obtained from processing real-world wear particle images in lubricant circuits, have shown qualitative and quantitative improvements over the input images.