Gray Scale Image with Empty Black area

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.


closed as off topic by datageist Jul 5 '12 at 13:29

Questions on Signal Processing Stack Exchange are expected to relate to signal processing within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here. If this question can be reworded to fit the rules in the help center, please edit the question.

  • $\begingroup$ Duplicate on SO: stackoverflow.com/q/11338164/769220 $\endgroup$ – Chris Jul 5 '12 at 8:25
  • $\begingroup$ 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. $\endgroup$ – datageist Jul 5 '12 at 13:30

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

  • $\begingroup$ imfill fills with only one color. please suggest some other methods $\endgroup$ – crack_addict Jul 5 '12 at 5:23
  • $\begingroup$ Then to fill one black area, try to identify a sub-region containing the black area first, then creates a Delaunay triangulation of the non-black points in inside the sub-region. It will allow you to do the interpolation at the black points. $\endgroup$ – chaohuang Jul 5 '12 at 5:33
  • $\begingroup$ please explain in detail about what to do after I create the Delaunay Triangulation of non-black points. I can Identify the sub-Regions containing black area $\endgroup$ – crack_addict Jul 5 '12 at 5:37
  • $\begingroup$ see my answer on stackoverflow $\endgroup$ – chaohuang Jul 5 '12 at 6:00

Not the answer you're looking for? Browse other questions tagged or ask your own question.