machinevisiontoolbox.ImageSpatial.Kernel.Sobel
- classmethod Kernel.Sobel()[source]
Sobel edge detector
- Returns:
3 x 3 Sobel kernel
- Return type:
Return the Sobel kernel for horizontal gradient
\[\begin{split}\mathbf{K} = \frac{1}{8} \begin{bmatrix} 1 & 0 & -1 \\ 2 & 0 & -2 \\ 1 & 0 & -1 \end{bmatrix}\end{split}\]Example:
>>> from machinevisiontoolbox import Kernel >>> Kernel.Sobel() <machinevisiontoolbox.ImageSpatial.Kernel object at 0x7fa39d5552b0>
- Note:
This kernel is an effective vertical-edge detector
The y-derivative (horizontal-edge) kernel is
K.T
- References:
Robotics, Vision & Control for Python, Section 11.5.1.3, P. Corke, Springer 2023.
- Seealso: