remove the holes in an image by average values of surrounding pixels
can any one please help me in filling these black holes by values taken from neighboring non-zero pixels. thanks There is a file on Matlab file exchange, - inpaint_nans that does exactly what you want. The author explains why and in which cases it is better than Delaunay triangulation. One nice way to do this is to is to solve the linear heat equation . What you do is fix the "temperature" (intensity) of the pixels in the good area and let the heat flow into the bad pixels. A passable, but somewhat slow, was to do this is repeatedly average the image then set the good pixels back to their