FUNCTION REFERENCE
imfilter
Filter an image with a 2-D kernel.
Filter an image with a 2-D kernel.
Syntax
B = imfilter(A, h)Syntax
B = imfilter(A, h, options...)Correlation by default ('conv' turns the kernel by 180 degrees). The kernel centre is floor((size(h)+1)/2). Boundary: a numeric value X (default 0), 'symmetric' (mirror including the edge pixel), 'replicate' (repeat the edge pixel) or 'circular' (periodic). Size: 'same' (default) or 'full' (size(A) + size(h) - 1). Each plane of an M-by-N-by-C image is filtered with the 2-D kernel. The output class is the input class: integers rounded half away from zero and saturated, logical results true where nonzero.
Example
imfilter([1 2 3; 4 5 6; 7 8 9], ones(3)/9)Example
imfilter(uint8([200 50 5]), 2) % uint8 [255 100 10]Example
imfilter(magic(4), [1 -1], 'replicate', 'full')Differences from MATLAB: N-D kernels and the GPU and frequency options are not supported yet.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.