To create a Gabor filter in MATLAB, you can use the function gabor from the Image Processing Toolbox. The function takes six arguments:
image: The image you want to filtertheta: The orientation of the filter (in radians)lambda: The wavelength of the sinusoidal factor of the filterpsi: The phase offset of the filtergamma: The spatial aspect ratiosigma: The standard deviation of the Gaussian envelopeHere's an example of how to create a Gabor filter with the parameters specified above and apply it to an image:
main.m287 chars16 lines
The output variable will contain the filtered image. You can adjust the parameters of the filter to achieve different results.
gistlibby LogSnag