2
$\begingroup$

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.

$\endgroup$
  • $\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
0
$\begingroup$

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

| improve this answer | |
$\endgroup$
  • $\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.