Back to Adaptive Vision Studio website

You are here: Start » Filter Reference » Image Local Transforms » SmoothImage_Median

SmoothImage_Median


Replaces each pixel with the median of pixels within a kernel.

Name Type Range Description
inImage Image Input image
inRoi Region* Range of outImage pixels being written
inSourceRoi Region* Range of inImage pixels being read
inKernel SmoothImageMedianKernel
inRadius Integer 0 - Nearly half of the kernel's size (2*R+1)
outImage Image Output image

Only the following inImage pixel formats are supported: uint8

Applications

Edge-preserving noise removal (but slow).

Hints

  • Define the kernel size by setting the inRadius input.
  • For small kernels consider switching to SmoothImage_Median_Mask to achieve higher performance.

Examples

SmoothImage_Median performed on a sample image with inRadius = 4.

Errors

This filter can throw an exception to report error. Read how to deal with errors here: Error Handling

Error type Description
DomainError inRoi exceeds image dimensions in SmoothImage_Median.
DomainError inSourceRoi exceeds image dimensions in SmoothImage_Median.
DomainError Not supported pixel format in SmoothImage_Median.
DomainError Not supported kernel in SmoothImage_Median.

Complexity Level

This filter is available on Basic Complexity Level.

Filter Group

This filters is member of SmoothImage filter group.