medianfilter

Syntax: medianfilter(input image, output image, radius, neighbourhood type, boundary condition)

Median filtering. Replaces pixel by median of pixels in its neighbourhood. Removes noise from the image while preserving sharp edges.

This command can be used in the distributed processing mode. Use distribute command to change processing mode from local to distributed.

Arguments

input image [input]

Data type: uint8 image, uint16 image, uint32 image, uint64 image, int8 image, int16 image, int32 image, int64 image, float32 image

Input image.

output image [output]

Data type: uint8 image, uint16 image, uint32 image, uint64 image, int8 image, int16 image, int32 image, int64 image, float32 image

Output image.

radius [input]

Data type: 3-component integer vector

Default value: “[1, 1, 1]”

Radius of neighbourhood. Diameter will be \(2r+1\).

neighbourhood type [input]

Data type: neighbourhood type

Default value: Ellipsoidal

Type of neighbourhood. Can be Ellipsoidal for ellipsoidal or spherical neighbourhood; or Rectangular for rectangular neighbourhood.

boundary condition [input]

Data type: boundary condition

Default value: Nearest

Type of boundary condition. Zero indicates that values outside of image bounds are taken to be zero. Nearest indicates that the nearest value inside the image is to be used in place of values outside of image bounds.