Hi Umesh,
The function `_mask_filter_result` assigns all the boundary pixels to a 0 value. The reason for this is that applying filter kernels or edge-detection operators on an image may result in inconsistent values at boundary pixel because of padding mode used by
scipy.ndimage.filters.convolve. I hope that clears your doubt. Thank you.
Regards,
Ankit Agrawal,
Communication and Signal Processing,
IIT Bombay.