Vertical Sobel¶
Filters an image using a vertical sobel kernel of size 3x3 or 5x5.
Inputs¶
Image (Type: Image)¶
The input image.
KernelSize (Type: Int32)¶
The kernel size (3 -> 3x3, 5 -> 5x5).
Region (Type: Region)¶
Specifies an optional area of interest.
Comments¶
The function applies a vertical_sobel filter. The corresponding kernel is either a 3x3 matrix with the following values:
-1 0 1
-2 0 2
-1 0 1
or a 5x5 kernel with the following values:
-1 - 2 0 2 1
-4 -8 0 8 4
-6 -12 0 12 6
-4 -8 0 8 4
-1 - 2 0 2 1
The effect of a vertical sobel filter is that it amplifies vertical edges and attenuates everything else. The strength of the sobel filter depends on the size of the kernel.
Here are a few results of the vertical sobel filter with increasing kernel sizes:
Original:
KernelSize = 3:
KernelSize = 5:
Sample¶
Here is an example that shows how to use the vertical sobel filter.
Often, you want to combine the horizontal and the vertical sobel filter to create an edge map. A simple way to do this is shown in the following sample:
Here is an example image of such an edge map: