# Interpolation of a gray scale image in matlab [closed]

I want to fill the black areas with the value of neighboring pixels. Kind of interpolation. Can any one suggest me how Can I do in matlab.

• Duplicate on SO: stackoverflow.com/q/11338164/769220 – Chris Jul 5 '12 at 8:25
• This is technically on-topic, but it's an exact duplicate of a question on SO that already has a better answer (by the same user), so I'm closing it here. It's also a little more oriented towards MATLAB programming than DSP concepts, so it's only borderline on-topic. – datageist Jul 5 '12 at 13:30

Try the imfill function, see http://www.mathworks.com/help/toolbox/images/ref/imfill.html