filter2 {EBImage}R Documentation

2D Convolution Filter

Description

2D convolution-based linear filter for images and matrix data.

Usage


  ## S4 methods for signatures 'x=Image' or 'x=array' and
  ## 'filter=matrix' or 'filter=missing'
  filter2(x, filter, ...)
  
  ## S4 method for signature 'Image':
  sharpen2(x, ...)
  
  mkball(n=15, pow=1)
  mkbox(n=15)

Arguments

x An object of Image in Grayscale mode, a numeric array or a matrix.
filter A square matrix with odd dimensions.
n The size of the filter matrix (odd number).
pow The power of the function used to fill in the matrix.
... Reserved.

Details

The convolution filter is based on fft transforms.

If x is an array, the filter is applied per frame (as to images).

sharpen2 uses filter2 to sharpen grayscale images by subtracting a slightly blurred image with the center pixel excluded.

Value

filter2 and return a transformed object of the same class as x.
mkball and mkbox return a square matrix that can be used for filter2.

Author(s)

filter2 author: Gregoire Pau, gpau@ebi.ac.uk, 2007

sharpen2 author: Oleg Sklyar, osklyar@ebi.ac.uk, 2007

See Also

Image, fft


[Package EBImage version 2.4.0 Index]