[Insight-users] Naively/smoothly interpolating a hole in a grayscale image

Richard Beare richard.beare at gmail.com
Tue Jul 5 20:00:24 EDT 2011


Matlab has a function called roifill, which "smoothly interpolates
inward from the pixel values on the boundary of the polygon by solving
Laplace's equation". That is something that would be nice to add to
ITK.

Another alternative if the holes are small is to create a median
filtered image and replace the holes with the filter output.

On Wed, Jul 6, 2011 at 9:48 AM, David Doria <daviddoria at gmail.com> wrote:
> Consider a grayscale image with a hole (undefined pixels) in the
> middle. ITK has some nearest-neighbor interpolation classes, and some
> "better" interpolation classes (WindowedSincInterpolateImageFunction),
> but all of these seem to rely on all of the information around a pixel
> being known. Is there any filter that will fill a hole like that
> reasonably? I guess something like an iterative "fill pixels who have
> defined boundary pixels, then repeat now that there are new undefined
> pixels near pixels determined in the previous step, repeat"? Or is
> there a better way to do this in one step?
>
> Thanks,
>
> David
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>


More information about the Insight-users mailing list