Main Content

Image Filtering

Convolution and correlation, predefined and custom filters, nonlinear filtering, edge-preserving filters

Filtering is a technique for modifying or enhancing an image. For example, you can filter an image to emphasize certain features or remove other features. Image processing operations implemented with filtering include smoothing, sharpening, and edge enhancement.

Apps

Image Region AnalyzerBrowse and filter connected components in image

Functions

expand all

imfilterN-D filtering of multidimensional images
roifilt2Filter region of interest (ROI) in grayscale image
nlfilterGeneral sliding-neighborhood operations
imgaussfilt2-D Gaussian filtering of images
imgaussfilt33-D Gaussian filtering of 3-D images
wiener22-D adaptive noise-removal filtering
medfilt22-D median filtering
medfilt33-D median filtering
modefilt2-D and 3-D mode filtering (Since R2020a)
ordfilt22-D order-statistic filtering
stdfiltLocal standard deviation of image
rangefiltLocal range of image
entropyfiltLocal entropy of grayscale image
imboxfilt2-D box filtering of images
imboxfilt33-D box filtering of 3-D images
fibermetricEnhance elongated or tubular structures in image using Frangi vesselness filter
maxhessiannormMaximum of Frobenius norm of Hessian of matrix
padarrayPad array
imbilatfiltBilateral filtering of images with Gaussian kernels
imdiffuseestEstimate parameters for anisotropic diffusion filtering
imdiffusefiltAnisotropic diffusion filtering of images
imguidedfilterGuided filtering of images
imnlmfiltNon-local means filtering of image
burstinterpolantCreate high-resolution image from set of low-resolution burst mode images
gaborCreate Gabor filter or Gabor filter bank
imgaborfiltApply Gabor filter or filter bank to 2-D image
bwareafiltExtract objects from binary image by size
bwpropfiltExtract objects from binary image using properties
integralImageCalculate 2-D integral image
integralImage3Calculate 3-D integral image
integralBoxFilter2-D box filtering of integral images
integralBoxFilter33-D box filtering of 3-D integral images
fspecialCreate predefined 2-D filter
fspecial3Create predefined 3-D filter
convmtx22-D convolution matrix
freqz22-D frequency response
fsamp22-D FIR filter using frequency sampling
ftrans22-D FIR filter using frequency transformation
fwind12-D FIR filter using 1-D window method
fwind22-D FIR filter using 2-D window method
freqspaceFrequency spacing for frequency response

Topics

Getting Started with Image Filtering in the Spatial Domain

Denoising Filtering

  • Noise Removal
    Remove image noise by using techniques such as averaging filtering, median filtering, and adaptive filtering based on local image variance.
  • Apply Gaussian Smoothing Filters to Images
    Reduce image noise by blurring the image using isotropic and anisotropic Gaussian smoothing filters of different strengths.
  • Reduce Noise in Image Gradients
    Reduce noise associated with computing image gradients so that features can be more accurately detected.

Edge-Preserving Filtering

Integral Image Domain Filtering

  • Integral Image
    Integral images are a quick way to represent images for filtering. In an integral image, the value of each pixel is the summation of the pixels above and to the left of it.
  • Apply Multiple Filters to Integral Image
    Smooth an image by different amounts by applying box filters of varying sizes to the integral image.

Frequency Domain Filtering

Featured Examples