def _compute_derivatives(image, mode='constant', cval=0):
"""Compute derivatives the way that scikit-image does it (for comparison).
This method is fully copied from the repository."""
imgy = ndimage.sobel(image, axis=0, mode=mode, cval=cval)
imgx = ndimage.sobel(image, axis=1, mode=mode, cval=cval)
return imgx, imgy
评论列表
文章目录