Padding backend
Josh Warner
silvertrumpet999 at gmail.com
Thu Apr 18 20:41:08 EDT 2013
It appears there are several scikit-image functions which have need of
padding input. As far as I can see, these generally do so internally, with
functions or routines that aren't exposed. From a quick search, the
following functions in scikit-image all pad using their own internal
methods:
feature.match_template : mean value
filter.lpi_filter : asymmetric zeros
morphology.greyreconstruct : symmetric zeros or constant value
morphology.watershed : pad child function for symmetric zeros
transform.radon : symmetric zeros
More broadly, there doesn't appear to be a publicly exposed API for padding
NumPy image arrays in any packages I've come across. scipy.ndimage clearly
has this functionality, via the common mode parameters, but it isn't
exposed for general use.
I've put some effort into making a pure Python 2d / 3d capable padding
function for personal use, and most of the scipy.ndimage modes are
available. Preliminary gist here wouldn't be hard to wrap into a PR (likely
not optimal, but functional):
https://gist.github.com/JDWarner/a26f77dae983fa1faba9
Would such functionality be desirable?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-image/attachments/20130418/21485f0b/attachment.html>
More information about the scikit-image
mailing list