Skip to content

Commit

Permalink
Update _gabor.py
Browse files Browse the repository at this point in the history
Refactoring ```gabor_filter```
  • Loading branch information
sumitbinnani committed Oct 2, 2015
1 parent f8d2ba8 commit 3345fa2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions skimage/filters/_gabor.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from .._shared.utils import assert_nD


__all__ = ['gabor_kernel', 'gabor_filter']
__all__ = ['gabor_kernel', 'gabor']


def _sigma_prefactor(bandwidth):
Expand Down Expand Up @@ -94,7 +94,7 @@ def gabor_kernel(frequency, theta=0, bandwidth=1, sigma_x=None, sigma_y=None,
return g


def gabor_filter(image, frequency, theta=0, bandwidth=1, sigma_x=None,
def gabor(image, frequency, theta=0, bandwidth=1, sigma_x=None,
sigma_y=None, n_stds=3, offset=0, mode='reflect', cval=0):
"""Return real and imaginary responses to Gabor filter.
Expand Down Expand Up @@ -148,19 +148,19 @@ def gabor_filter(image, frequency, theta=0, bandwidth=1, sigma_x=None,
Examples
--------
>>> from skimage.filter import gabor_filter
>>> from skimage.filter import gabor
>>> from skimage import data, io
>>> from matplotlib import pyplot as plt # doctest: +SKIP
>>> image = data.coins()
>>> # detecting edges in a coin image
>>> filt_real, filt_imag = gabor_filter(image, frequency=0.6)
>>> 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 kernel
>>> filt_real, filt_imag = gabor_filter(image, frequency=0.1)
>>> filt_real, filt_imag = gabor(image, frequency=0.1)
>>> plt.figure() # doctest: +SKIP
>>> io.imshow(filt_real) # doctest: +SKIP
>>> io.show() # doctest: +SKIP
Expand Down

0 comments on commit 3345fa2

Please sign in to comment.