Scipy Binary Closing - Edge Pixels lose value
Operations that involve information from neighboring pixels, such as closing will always have trouble at the edges.  In your case, this is very easy to get around: just process subimages that are slightly larger than your tiling, and keep the good parts when stitching together.
I am attempting to fill holes in a binary image.  The image is rather large so I have broken it into chunks for processing.
When I use the scipy.ndimage.morphology.binary_fill_holes functions, it fills larger holes that belong in the image.  So I tried using scipy.ndimage.morphology.binary_closing, which gave the desired results of filling small holes in the image.  However, when I put the chunks back together, to create the entire image, I end up with seamlines because the binary_closing function removes any values from the border pixels of each chunk.
Is there any way to avoid this effect?