mirror of
https://github.com/wassname/scikit-image.git
synced 2026-06-29 02:30:48 +08:00
Add reference for scharr operator
This commit is contained in:
@@ -156,6 +156,11 @@ def scharr(image, mask=None):
|
||||
vertical Scharrs to get a magnitude that's somewhat insensitive to
|
||||
direction.
|
||||
|
||||
References
|
||||
----------
|
||||
.. [1] D. Kroon, 2009, Short Paper University Twente, Numerical Optimization
|
||||
of Kernel Based Image Derivatives.
|
||||
|
||||
"""
|
||||
return np.sqrt(hscharr(image, mask)**2 + vscharr(image, mask)**2)
|
||||
|
||||
@@ -186,6 +191,11 @@ def hscharr(image, mask=None):
|
||||
0 0 0
|
||||
-3 -10 -3
|
||||
|
||||
References
|
||||
----------
|
||||
.. [1] D. Kroon, 2009, Short Paper University Twente, Numerical Optimization
|
||||
of Kernel Based Image Derivatives.
|
||||
|
||||
"""
|
||||
image = img_as_float(image)
|
||||
result = np.abs(convolve(image,
|
||||
@@ -221,6 +231,11 @@ def vscharr(image, mask=None):
|
||||
10 0 -10
|
||||
3 0 -3
|
||||
|
||||
References
|
||||
----------
|
||||
.. [1] D. Kroon, 2009, Short Paper University Twente, Numerical Optimization
|
||||
of Kernel Based Image Derivatives.
|
||||
|
||||
"""
|
||||
image = img_as_float(image)
|
||||
result = np.abs(convolve(image,
|
||||
|
||||
Reference in New Issue
Block a user