scharr

scharr

skimage.filters.scharr(image, mask=None) [source]

Find the edge magnitude using the Scharr transform.

Parameters:

image : 2-D array

Image to process.

mask : 2-D array, optional

An optional mask to limit the application to a certain area. Note that pixels surrounding masked regions are also masked to prevent masked regions from affecting the result.

Returns:

output : 2-D array

The Scharr edge map.

See also

sobel, prewitt, canny

Notes

Take the square root of the sum of the squares of the horizontal and vertical Scharrs to get a magnitude that is somewhat insensitive to direction. The Scharr operator has a better rotation invariance than other edge filters such as the Sobel or the Prewitt operators.

References

[R193] D. Kroon, 2009, Short Paper University Twente, Numerical Optimization of Kernel Based Image Derivatives.
[R194] http://en.wikipedia.org/wiki/Sobel_operator#Alternative_operators

Examples

>>> from skimage import data
>>> camera = data.camera()
>>> from skimage import filters
>>> edges = filters.scharr(camera)
doc_scikit_image
2017-01-12 17:23:24
Comments
Leave a Comment

Please login to continue.