I have image segmentation results that look like this:
As you can see there are small gaps in the segmentation map. These gap pixels have been assigned the value 0; all other, non-gap pixels have been assigned a non-0 class value.
Is there a method, perhaps somewhere in skimage
, which can perform something like k-nearest interpolation on just the null pixels, in order to assign them a value coherent with their neighborhood? I tried writing this function myself, but it too slow for my tastes.