creating that substitute image is essentially the problem of imputation in and of itself. I know how to place the pixel values once I have them, but generating them is the problem of imputation. I’m not sure what you mean by “using a smoothed image” because when there are empty pixels, there are no values to “smooth”
if you’re talking about bigger regions missing, the problem is not cheaply solveable with generic math operators (built-in kernels), look for noise reduction algorithm implementations. for small holes, using something like gaussian blur may suffice