Purpose: Finite focal spot size in X‐ray imaging equipment has a blurring effect on acquired images. For practical reasons, it is neither possible nor desirable to reduce the spot size of medical linacs below a certain diameter. This affects task performance in IGRT, where the blurring of the edges of structures reduces positioning accuracy. Since the focal spot size and shape of linacs vary, the filter must be customized to a particular linac. We have developed an algorithm that learns to deblur portal images by comparing actual images to their Monte Carlo (MC) generated ideal counterparts. Method and Materials: A training object containing sharp edges of all orientations is imaged to capture the blurring and noise characteristics of the system. MC simulations in which a point source irradiates a digital version of the training object are used to generate ideal images. These are used as training data to optimize the convolution kernel that effects deblurring. Owing to the nature of the training data, the kernel will deblur the image as well as enhance edges. We assume since the object is 1m from the source, blurring is uniform for all transverse object planes. Results: Large samples of phantom and patient images were used to evaluate filter performance. A marked improvement in image quality is apparent. Evaluation of spatial resolution (MTF) and contrast‐to‐noise ratio (CNR) reveals a dramatic improvement in MTF but reduction in CNR. However, since the CNR remains above 70 at doses of 1MU, the increase in noise will not effect IGRT task performance. Conclusion: This work indicates the utility of this novel image enhancement technique in clinical images. In particular, visibility of small objects in images, such as prostate seeds, is remarkably enhanced.Conflict of Interest: Sponsored by Siemens.