gabor(image, frequency, theta=0, bandwidth=1, sigma_x=None, sigma_y=None, n_stds=3, offset=0, mode='reflect', cval=0)
The real and imaginary parts of the Gabor filter kernel are applied to the image and the response is returned as a pair of arrays.
Gabor filter is a linear filter with a Gaussian kernel which is modulated by a sinusoidal plane wave. Frequency and orientation representations of the Gabor filter are similar to those of the human visual system. Gabor filter banks are commonly used in computer vision and image processing. They are especially suitable for edge detection and texture classification.
Input image.
Spatial frequency of the harmonic function. Specified in pixels.
Orientation in radians. If 0, the harmonic is in the x-direction.
The bandwidth captured by the filter. For fixed bandwidth, sigma_x
and sigma_y
will decrease with increasing frequency. This value is ignored if sigma_x
and sigma_y
are set by the user.
Standard deviation in x- and y-directions. These directions apply to the kernel before rotation. If :None:None:`theta = pi/2`
, then the kernel is rotated 90 degrees so that sigma_x
controls the vertical direction.
The linear size of the kernel is n_stds (3 by default) standard deviations.
Phase offset of harmonic function in radians.
Mode used to convolve image with a kernel, passed to :None:None:`ndi.convolve`
Value to fill past edges of input if mode
of convolution is 'constant'. The parameter is passed to :None:None:`ndi.convolve`
.
Filtered images using the real and imaginary parts of the Gabor filter kernel. Images are of the same dimensions as the input one.
Return real and imaginary responses to Gabor filter.
>>> from skimage.filters import gaborThis example is valid syntax, but we were not able to check execution
... from skimage import data, io
... from matplotlib import pyplot as plt # doctest: +SKIP
>>> image = data.coins()This example is valid syntax, but we were not able to check execution
... # detecting edges in a coin image
... filt_real, filt_imag = gabor(image, frequency=0.6)
... plt.figure() # doctest: +SKIP
... io.imshow(filt_real) # doctest: +SKIP
... io.show() # doctest: +SKIP
>>> # less sensitivity to finer details with the lower frequency kernelSee :
... filt_real, filt_imag = gabor(image, frequency=0.1)
... plt.figure() # doctest: +SKIP
... io.imshow(filt_real) # doctest: +SKIP
... io.show() # doctest: +SKIP
The following pages refer to to this document either explicitly or contain code examples using this.
skimage.filters._gabor.gabor
Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.
Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)
SVG is more flexible but power hungry; and does not scale well to 50 + nodes.
All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them