Many image-processing applications heavily depend on the quality of medical images. Due to the unpredictable variation in the captured images, medical images frequently have problems with noise or low contrast; therefore, improving medical imaging is a challenging task. For better treatment, physicians need images with good contrast to provide the most detailed picture of the disease. The generalized k-differential equation based on the k-Caputo fractional differential operator (K-CFDO) is used in this study to determine the energy of the image pixels to improve the visual quality and provide a clearly defined problem. The logic behind using the K-CFDO approach in image enhancement is the ability of K-CFDO to efficiently capture high-frequency details using the probability of pixels as well as preserve the fine image details. Moreover, the visual quality of X-ray images is improved by performing a low-contrast X-ray image enhancement.•Determine the energy of the image pixels for better pixel intensity enhancement.•Capture high frequency image details using the image probability of pixels.The findings of this study indicate that the average Brisque, Niqe, and Piqe values for the provided chest X-ray were found to be (Brisque=23.25, Niqe=2.8, Piqe21.58), and for the dental X-ray, they were (Brisque=21.12, Niqe=3.77, Piqe=23.49). The results of this study show potential improvements with the proposed enhancement methods that may contribute to increasing efficiency in healthcare processes at rural clinics. Generally, this model improves the details of medical images, which may aid medical staff throughout the diagnostic process by increasing the efficiency and accuracy of clinical decisions. Due to the improper setting of the suggested enhancing parameters, the current study included a limitation on image over-enhancement.